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

Удалил лишние вызовы отрисовки. Баг http://bugzserver/show_bug.cgi?id=26896

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58776 954022d7-b5bf-4e40-9824-e11837661b57
parent f59a0abd
...@@ -1653,7 +1653,6 @@ var gUndoInsDelCellsFlag = true; ...@@ -1653,7 +1653,6 @@ var gUndoInsDelCellsFlag = true;
isApplyAutoFilterInCell: function(activeCell, clean) isApplyAutoFilterInCell: function(activeCell, clean)
{ {
var aWs = this._getCurrentWS(); var aWs = this._getCurrentWS();
var tableRange;
if(aWs.TableParts) if(aWs.TableParts)
{ {
var tablePart; var tablePart;
...@@ -1676,9 +1675,9 @@ var gUndoInsDelCellsFlag = true; ...@@ -1676,9 +1675,9 @@ var gUndoInsDelCellsFlag = true;
{ {
if(tablePart.Ref.containsRange(activeCell, activeCell)) if(tablePart.Ref.containsRange(activeCell, activeCell))
return false; return false;
}; }
}; }
}; }
if(aWs.AutoFilter && ((aWs.AutoFilter.FilterColumns && aWs.AutoFilter.FilterColumns.length) || (aWs.AutoFilter.SortState && aWs.AutoFilter.SortState.SortConditions && aWs.AutoFilter.SortState.SortConditions[0]))) if(aWs.AutoFilter && ((aWs.AutoFilter.FilterColumns && aWs.AutoFilter.FilterColumns.length) || (aWs.AutoFilter.SortState && aWs.AutoFilter.SortState.SortConditions && aWs.AutoFilter.SortState.SortConditions[0])))
{ {
...@@ -1838,7 +1837,6 @@ var gUndoInsDelCellsFlag = true; ...@@ -1838,7 +1837,6 @@ var gUndoInsDelCellsFlag = true;
// Undo // Undo
Undo: function (type, data) { Undo: function (type, data) {
var ws = data.worksheet;
var aWs = this._getCurrentWS(); var aWs = this._getCurrentWS();
data = data.undo; data = data.undo;
var cloneData; var cloneData;
...@@ -1929,7 +1927,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -1929,7 +1927,7 @@ var gUndoInsDelCellsFlag = true;
break; break;
} }
} }
}; }
if(!isEn)//добавляем фильтр if(!isEn)//добавляем фильтр
{ {
...@@ -1961,9 +1959,9 @@ var gUndoInsDelCellsFlag = true; ...@@ -1961,9 +1959,9 @@ var gUndoInsDelCellsFlag = true;
{ {
aWs.AutoFilter = cloneData; aWs.AutoFilter = cloneData;
this._addButtonAF({result: cloneData.result,isVis: true}); this._addButtonAF({result: cloneData.result,isVis: true});
}; }
}; }
}; }
} }
else if(cloneData.oldFilter)//в случае удаления/добавления строк else if(cloneData.oldFilter)//в случае удаления/добавления строк
{ {
...@@ -1992,7 +1990,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -1992,7 +1990,7 @@ var gUndoInsDelCellsFlag = true;
break; break;
} }
} }
}; }
} }
else else
{ {
...@@ -2022,10 +2020,6 @@ var gUndoInsDelCellsFlag = true; ...@@ -2022,10 +2020,6 @@ var gUndoInsDelCellsFlag = true;
} }
} }
} }
ws.changeWorksheet("update");
ws.handlers.trigger("selectionChanged", ws.getSelectionInfo());
ws.isChanged = true;
}, },
getSizeButton: function(range) getSizeButton: function(range)
...@@ -2072,16 +2066,6 @@ var gUndoInsDelCellsFlag = true; ...@@ -2072,16 +2066,6 @@ var gUndoInsDelCellsFlag = true;
var currentFilter = tableParts[i]; var currentFilter = tableParts[i];
if(currentFilter && currentFilter.Ref) if(currentFilter && currentFilter.Ref)
{ {
/*var ref = currentFilter.Ref.split(':');
var startId = this._idToRange(ref[0]);
var endId = this._idToRange(ref[1]);
var tableRange =
{
r1: startId.r1,
c1: startId.c1,
r2: endId.r1,
c2: endId.c1
};*/
var tableRange = currentFilter.Ref; var tableRange = currentFilter.Ref;
//проверяем, попадает хотя бы одна ячейка из диапазона в область фильтра //проверяем, попадает хотя бы одна ячейка из диапазона в область фильтра
...@@ -4026,7 +4010,6 @@ var gUndoInsDelCellsFlag = true; ...@@ -4026,7 +4010,6 @@ var gUndoInsDelCellsFlag = true;
{ {
if(arr.result) if(arr.result)
{ {
var ws = this.worksheet;
if(!this.allButtonAF) if(!this.allButtonAF)
this.allButtonAF = []; this.allButtonAF = [];
if(arr.isVis) if(arr.isVis)
...@@ -4089,14 +4072,8 @@ var gUndoInsDelCellsFlag = true; ...@@ -4089,14 +4072,8 @@ var gUndoInsDelCellsFlag = true;
if(!this.allButtonAF[0] && this.allButtonAF.length) if(!this.allButtonAF[0] && this.allButtonAF.length)
this.allButtonAF.length = 0; this.allButtonAF.length = 0;
}
if (!bIsOpenFilter) {
ws.changeWorksheet("update");
ws.isChanged = true;
} }
} }
}, },
_cleanStyleTable : function(aWs, sRef) _cleanStyleTable : function(aWs, sRef)
...@@ -5343,7 +5320,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -5343,7 +5320,7 @@ var gUndoInsDelCellsFlag = true;
//filter.Ref = this._rangeToId(cRange.start) + ":" + this._rangeToId(cRange.end); //filter.Ref = this._rangeToId(cRange.start) + ":" + this._rangeToId(cRange.end);
//change result into filter and change info in button //change result into filter and change info in button
filter = this._changeInfoFilterAfterInsertCols(filter, type, col, cRange, val, filterColums, activeCells); filter = this._changeInfoFilterAfterInsertCols(filter, type, col, cRange, val, filterColums);
//записываем в историю, если активная область касается данных фильтров //записываем в историю, если активная область касается данных фильтров
if(!bUndoChanges && !bRedoChanges && val < 0) if(!bUndoChanges && !bRedoChanges && val < 0)
...@@ -5354,11 +5331,11 @@ var gUndoInsDelCellsFlag = true; ...@@ -5354,11 +5331,11 @@ var gUndoInsDelCellsFlag = true;
var changeElement = var changeElement =
{ {
oldFilter: oldFilter oldFilter: oldFilter
} };
this._addHistoryObj(changeElement, null, null, true); this._addHistoryObj(changeElement, null, null, true);
History.EndTransaction(); History.EndTransaction();
} }
}; }
if(cRange.index == 'all') if(cRange.index == 'all')
{ {
...@@ -5367,10 +5344,10 @@ var gUndoInsDelCellsFlag = true; ...@@ -5367,10 +5344,10 @@ var gUndoInsDelCellsFlag = true;
else else
{ {
aWs.TableParts[cRange.index] = filter; aWs.TableParts[cRange.index] = filter;
}; }
}, },
_changeInfoFilterAfterInsertCols: function(filter, type, col, cRange, val, filterColums, activeCells) _changeInfoFilterAfterInsertCols: function(filter, type, col, cRange, val, filterColums)
{ {
var ws = this.worksheet; var ws = this.worksheet;
var inFilter = Asc.Range(cRange.start.c1, cRange.start.r1, cRange.end.c1, cRange.end.r1); var inFilter = Asc.Range(cRange.start.c1, cRange.start.r1, cRange.end.c1, cRange.end.r1);
...@@ -5383,16 +5360,13 @@ var gUndoInsDelCellsFlag = true; ...@@ -5383,16 +5360,13 @@ var gUndoInsDelCellsFlag = true;
{ {
cloneFilterColums[k] = filterColums[k].clone(); cloneFilterColums[k] = filterColums[k].clone();
} }
}; }
if(filter.result && filter.result.length > 0) if(filter.result && filter.result.length > 0)
{ {
//change array //change array
var changeNum = [];
var newResult = []; var newResult = [];
var n = 0; var n = 0;
var isChangeColumn = false;
var insertIndexes = [];
for(var filR = 0; filR < filter.result.length; filR++) for(var filR = 0; filR < filter.result.length; filR++)
{ {
var endCount = 0; var endCount = 0;
...@@ -5435,7 +5409,6 @@ var gUndoInsDelCellsFlag = true; ...@@ -5435,7 +5409,6 @@ var gUndoInsDelCellsFlag = true;
var num = 1; var num = 1;
if(filter.AutoFilter !== null) if(filter.AutoFilter !== null)
this._changeContentButton(newResult[n],num,'add',inFilter); this._changeContentButton(newResult[n],num,'add',inFilter);
//changeNum[insCol - 1] = n;
n++; n++;
} }
...@@ -5555,7 +5528,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -5555,7 +5528,7 @@ var gUndoInsDelCellsFlag = true;
n++; n++;
} }
}; }
if(type == 'insCol' && filter.AutoFilter !== null) if(type == 'insCol' && filter.AutoFilter !== null)
{ {
...@@ -5563,7 +5536,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -5563,7 +5536,7 @@ var gUndoInsDelCellsFlag = true;
{ {
this._changeContentButton(newResult[n], 1, 'add', inFilter); this._changeContentButton(newResult[n], 1, 'add', inFilter);
} }
}; }
if(cloneFilterColums) if(cloneFilterColums)
{ {
...@@ -5578,9 +5551,9 @@ var gUndoInsDelCellsFlag = true; ...@@ -5578,9 +5551,9 @@ var gUndoInsDelCellsFlag = true;
{ {
filter.AutoFilter.FilterColumns = cloneFilterColums; filter.AutoFilter.FilterColumns = cloneFilterColums;
filter.AutoFilter.Ref = inFilter; filter.AutoFilter.Ref = inFilter;
}; }
}; }
}; }
//change tableColumn //change tableColumn
if(filter.TableColumns && type != 'insRow') if(filter.TableColumns && type != 'insRow')
...@@ -5622,7 +5595,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -5622,7 +5595,7 @@ var gUndoInsDelCellsFlag = true;
} }
filter.TableColumns = newTableColumn; filter.TableColumns = newTableColumn;
} }
}; }
filter.result = newResult; filter.result = newResult;
filter.Ref = inFilter; filter.Ref = inFilter;
...@@ -5631,7 +5604,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -5631,7 +5604,7 @@ var gUndoInsDelCellsFlag = true;
this._addButtonAF(newResult); this._addButtonAF(newResult);
return filter; return filter;
}; }
}, },
_changeContentButton: function(array, val, type, inFilter, oldId) _changeContentButton: function(array, val, type, inFilter, oldId)
......
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