Commit be0ab4a6 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

asc.clone -> range.clone

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54192 954022d7-b5bf-4e40-9824-e11837661b57
parent 4271a1db
...@@ -202,7 +202,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -202,7 +202,7 @@ var gUndoInsDelCellsFlag = true;
this.range = null; this.range = null;
this.isTitle = null; this.isTitle = null;
return this; return this;
}; }
AddFormatTableOptions.prototype = { AddFormatTableOptions.prototype = {
constructor: AddFormatTableOptions, constructor: AddFormatTableOptions,
...@@ -265,7 +265,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -265,7 +265,7 @@ var gUndoInsDelCellsFlag = true;
var ws = this.worksheet; var ws = this.worksheet;
var bIsActiveSheet = this._isActiveSheet(); var bIsActiveSheet = this._isActiveSheet();
var bIsOpenFilter = undefined !== openFilter; var bIsOpenFilter = undefined !== openFilter;
var activeCells = Asc.clone(ar); var activeCells = null === ar ? null : ar.clone(); // ToDo Слишком много клонирования, это долгая операция
var aWs = this._getCurrentWS(); var aWs = this._getCurrentWS();
var paramsForCallBack; var paramsForCallBack;
var paramsForCallBackAdd; var paramsForCallBackAdd;
...@@ -455,7 +455,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -455,7 +455,7 @@ var gUndoInsDelCellsFlag = true;
j++; j++;
} }
var cloneAC = Asc.clone(activeCells); var cloneAC = activeCells.clone();
if(addNameColumn) if(addNameColumn)
{ {
...@@ -536,8 +536,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -536,8 +536,7 @@ var gUndoInsDelCellsFlag = true;
arn.r2 = arn.r2 - 1; arn.r2 = arn.r2 - 1;
ws.setSelection(arn,true); ws.setSelection(arn,true);
} }
rangeFilter = new Asc.Range(activeCells.c1, activeCells.r1, activeCells.c2, activeCells.r2); ws._updateCellsRange(activeCells, /*canChangeColWidth*/ c_oAscCanChangeColWidth.none);
ws._updateCellsRange(rangeFilter, /*canChangeColWidth*/ c_oAscCanChangeColWidth.none);
} }
History.EndTransaction(); History.EndTransaction();
if(isTurnOffHistory) if(isTurnOffHistory)
...@@ -562,7 +561,6 @@ var gUndoInsDelCellsFlag = true; ...@@ -562,7 +561,6 @@ var gUndoInsDelCellsFlag = true;
if(isTurnOffHistory) if(isTurnOffHistory)
History.TurnOn(); History.TurnOn();
return true; return true;
break
} }
case 'setStyleTableForAutoFilter': case 'setStyleTableForAutoFilter':
{ {
...@@ -634,7 +632,6 @@ var gUndoInsDelCellsFlag = true; ...@@ -634,7 +632,6 @@ var gUndoInsDelCellsFlag = true;
for(col = mainAdjacentCells.c1; col <= mainAdjacentCells.c2; col++) for(col = mainAdjacentCells.c1; col <= mainAdjacentCells.c2; col++)
{ {
var cell = new CellAddress(mainAdjacentCells.r1, col, 0); var cell = new CellAddress(mainAdjacentCells.r1, col, 0);
var strNum = null;
var range = ws.model.getCell(cell); var range = ws.model.getCell(cell);
var strNum = "Column" + (col - mainAdjacentCells.c1 + 1).toString(); var strNum = "Column" + (col - mainAdjacentCells.c1 + 1).toString();
if(!isTurnOffHistory) if(!isTurnOffHistory)
...@@ -674,7 +671,6 @@ var gUndoInsDelCellsFlag = true; ...@@ -674,7 +671,6 @@ var gUndoInsDelCellsFlag = true;
for(col = activeCells.c1; col <= activeCells.c2; col++) for(col = activeCells.c1; col <= activeCells.c2; col++)
{ {
var cell = new CellAddress(activeCells.r1, col, 0); var cell = new CellAddress(activeCells.r1, col, 0);
var strNum = null;
var range = ws.model.getCell(cell); var range = ws.model.getCell(cell);
var strNum = "Column" + (col - activeCells.c1 + 1).toString(); var strNum = "Column" + (col - activeCells.c1 + 1).toString();
if(!isTurnOffHistory) if(!isTurnOffHistory)
...@@ -702,7 +698,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -702,7 +698,7 @@ var gUndoInsDelCellsFlag = true;
{ {
ws.model.workbook.handlers.trigger("asc_onError", c_oAscError.ID.AutoFilterDataRangeError, c_oAscError.Level.NoCritical); ws.model.workbook.handlers.trigger("asc_onError", c_oAscError.ID.AutoFilterDataRangeError, c_oAscError.Level.NoCritical);
return; return;
}; }
result = []; result = [];
//в случае если добавляем фильтр общий, то откидываем пустую строку или столбец в конце //в случае если добавляем фильтр общий, то откидываем пустую строку или столбец в конце
var isEndRowEmpty = true; var isEndRowEmpty = true;
...@@ -782,7 +778,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -782,7 +778,7 @@ var gUndoInsDelCellsFlag = true;
{ {
ws.model.workbook.handlers.trigger("asc_onError", c_oAscError.ID.AutoFilterDataRangeError, c_oAscError.Level.NoCritical); ws.model.workbook.handlers.trigger("asc_onError", c_oAscError.ID.AutoFilterDataRangeError, c_oAscError.Level.NoCritical);
return; return;
}; }
var n = 0; var n = 0;
result = []; result = [];
for(col = activeCells.c1; col <= activeCells.c2; col++) for(col = activeCells.c1; col <= activeCells.c2; col++)
...@@ -4450,11 +4446,9 @@ var gUndoInsDelCellsFlag = true; ...@@ -4450,11 +4446,9 @@ var gUndoInsDelCellsFlag = true;
{ {
History.TurnOff(); History.TurnOff();
var aWs = this._getCurrentWS(); var aWs = this._getCurrentWS();
var bUndoChanges = this.worksheet.model.workbook.bUndoChanges;
if(aWs.AutoFilter) if(aWs.AutoFilter)
{ {
var ref = aWs.AutoFilter.Ref.split(':'); var ref = aWs.AutoFilter.Ref.split(':');
var doNotChangesHeadString = false;
var options = { var options = {
ref:ref, ref:ref,
val:val, val:val,
...@@ -5533,7 +5527,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -5533,7 +5527,7 @@ var gUndoInsDelCellsFlag = true;
if(redoObject) if(redoObject)
{ {
oHistoryObject.activeCells = Asc.clone(redoObject.activeCells); oHistoryObject.activeCells = redoObject.activeCells.clone(); // ToDo Слишком много клонирования, это долгая операция
oHistoryObject.lTable = redoObject.lTable; oHistoryObject.lTable = redoObject.lTable;
oHistoryObject.type = redoObject.type; oHistoryObject.type = redoObject.type;
oHistoryObject.cellId = redoObject.cellId; oHistoryObject.cellId = redoObject.cellId;
...@@ -5544,7 +5538,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -5544,7 +5538,7 @@ var gUndoInsDelCellsFlag = true;
} }
else else
{ {
oHistoryObject.activeCells = Asc.clone(ws.activeRange); oHistoryObject.activeCells = ws.activeRange.clone();
type = null; type = null;
} }
......
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