Commit b7697768 authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov Committed by Alexander.Trofimov

добавление и измененич именованных диапазонов через одну функцию.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62567 954022d7-b5bf-4e40-9824-e11837661b57
parent 866a1876
...@@ -2859,7 +2859,7 @@ UndoRedoWorkbook.prototype = { ...@@ -2859,7 +2859,7 @@ UndoRedoWorkbook.prototype = {
this.wb.delDefinesNames( Data.newName ); this.wb.delDefinesNames( Data.newName );
} }
else{ else{
this.wb.setDefinesNames( Data.newName ); this.wb.editDefinesNames( null, Data.newName );
} }
/*TODO /*TODO
* Ввели формулу в которой есть именованный диапазон, но ИД нет в списке ИД. Результат формулы #NAME!. * Ввели формулу в которой есть именованный диапазон, но ИД нет в списке ИД. Результат формулы #NAME!.
...@@ -2881,7 +2881,7 @@ UndoRedoWorkbook.prototype = { ...@@ -2881,7 +2881,7 @@ UndoRedoWorkbook.prototype = {
} }
else if(historyitem_Workbook_DefinedNamesDelete === Type ){ else if(historyitem_Workbook_DefinedNamesDelete === Type ){
if(bUndo){ if(bUndo){
this.wb.setDefinesNames( Data ); this.wb.editDefinesNames( null, Data );
if( Data.slaveEdge ){ if( Data.slaveEdge ){
var n; var n;
for(var i = 0; i < Data.slaveEdge.length; i++){ for(var i = 0; i < Data.slaveEdge.length; i++){
......
...@@ -6885,10 +6885,9 @@ ...@@ -6885,10 +6885,9 @@
} else { } else {
// move active range to offset x,y // move active range to offset x,y
this._moveActiveCellToOffset(x, y); this._moveActiveCellToOffset(x, y);
// var x1 = this.getCellLeftRelative(this.activeRange.c1, /*pt*/0 ), var x1 = this.getCellLeftRelative(this.activeRange.c1, /*pt*/0 ),
// y1 = this.getCellTopRelative(this.activeRange.r1, /*pt*/0); y1 = this.getCellTopRelative(this.activeRange.r1, /*pt*/0);
// ret = this._calcActiveRangeOffset(x1,y1);
// ret = this._calcActiveRangeOffset(x1,y1);
} }
if (this.isSelectionDialogMode) { if (this.isSelectionDialogMode) {
...@@ -9959,7 +9958,10 @@ ...@@ -9959,7 +9958,10 @@
this._fixSelectionOfHiddenCells(); this._fixSelectionOfHiddenCells();
this._drawSelection(); this._drawSelection();
offs = this._calcActiveRangeOffset(); var x1 = this.getCellLeftRelative(this.activeRange.c1, /*pt*/0 ),
y1 = this.getCellTopRelative(this.activeRange.r1, /*pt*/0);
offs = this._calcActiveRangeOffset(x1,y1);
if (sc !== ar.startCol || sr !== ar.startRow) { if (sc !== ar.startCol || sr !== ar.startRow) {
this.handlers.trigger("selectionNameChanged", this.getSelectionName(/*bRangeText*/false)); this.handlers.trigger("selectionNameChanged", this.getSelectionName(/*bRangeText*/false));
this.handlers.trigger("selectionChanged", this.getSelectionInfo()); this.handlers.trigger("selectionChanged", this.getSelectionInfo());
...@@ -10188,7 +10190,7 @@ ...@@ -10188,7 +10190,7 @@
ascRange = new asc_Range(c1, r1, c2, r2 ); ascRange = new asc_Range(c1, r1, c2, r2 );
var defName = new Asc.asc_CDefName( reference, this.model.getName()+"!"+ascRange.getAbsName(), null ), var defName = new Asc.asc_CDefName( reference, this.model.getName()+"!"+ascRange.getAbsName(), null ),
_C2H50H_ = this.model.workbook.setDefinesNames(defName), sheetName = "", ref = ""; _C2H50H_ = this.model.workbook.editDefinesNames( null, defName ), sheetName = "", ref = "";
if(_C2H50H_){ if(_C2H50H_){
sheetName = _C2H50H_.Ref.split("!"); sheetName = _C2H50H_.Ref.split("!");
ref = sheetName[1]; ref = sheetName[1];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment