Commit 7513bcbe authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

http://bugzserver/show_bug.cgi?id=29037 - [CoEdit] Рассинхронизация данных...

http://bugzserver/show_bug.cgi?id=29037 -  [CoEdit] Рассинхронизация данных при скрытии значений автофильтра пользователями

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62755 954022d7-b5bf-4e40-9824-e11837661b57
parent 60e7070d
...@@ -482,10 +482,10 @@ var maxIndividualValues = 10000; ...@@ -482,10 +482,10 @@ var maxIndividualValues = 10000;
}, },
applyAutoFilter: function (autoFiltersObject, ar) { applyAutoFilter: function (autoFiltersObject, ar) {
console.time("_applyMainFilter2");
var ws = this.worksheet; var ws = this.worksheet;
var aWs = this._getCurrentWS(); var aWs = this._getCurrentWS();
var bUndoChanges = aWs.workbook.bUndoChanges;
var bRedoChanges = aWs.workbook.bRedoChanges;
//**get filter** //**get filter**
var filterObj = this._getPressedFilter(ar, autoFiltersObject.cellId); var filterObj = this._getPressedFilter(ar, autoFiltersObject.cellId);
...@@ -519,21 +519,24 @@ var maxIndividualValues = 10000; ...@@ -519,21 +519,24 @@ var maxIndividualValues = 10000;
//open/close rows //open/close rows
for(var i = currentFilter.Ref.r1 + 1; i <= currentFilter.Ref.r2; i++) if(!bUndoChanges && !bRedoChanges)
{ {
var isHidden = false; for(var i = currentFilter.Ref.r1 + 1; i <= currentFilter.Ref.r2; i++)
if(currentFilter.FilterColumns && currentFilter.FilterColumns.length)
isHidden = this._hiddenAnotherFilter(currentFilter.FilterColumns, filterObj.ColId, i, currentFilter.Ref.c1);
if(!isHidden)
{ {
var cell = aWs.getCell3(i, filterObj.activeRange.c1); var isHidden = false;
var currentValue = cell.getValueWithFormat(); if(currentFilter.FilterColumns && currentFilter.FilterColumns.length)
var isDateTimeFormat = cell.getNumFormat().isDateTimeFormat(); isHidden = this._hiddenAnotherFilter(currentFilter.FilterColumns, filterObj.ColId, i, currentFilter.Ref.c1);
if(isDateTimeFormat)
currentValue = cell.getValueWithoutFormat(); if(!isHidden)
{
var cell = aWs.getCell3(i, filterObj.activeRange.c1);
var currentValue = cell.getValueWithFormat();
var isDateTimeFormat = cell.getNumFormat().isDateTimeFormat();
if(isDateTimeFormat)
currentValue = cell.getValueWithoutFormat();
aWs.setRowHidden(newFilterColumn.isHideValue(currentValue, isDateTimeFormat), i, i); aWs.setRowHidden(newFilterColumn.isHideValue(currentValue, isDateTimeFormat), i, i);
}
} }
} }
...@@ -546,8 +549,6 @@ var maxIndividualValues = 10000; ...@@ -546,8 +549,6 @@ var maxIndividualValues = 10000;
this._reDrawFilters(); this._reDrawFilters();
if(!aWs.workbook.bUndoChanges && !aWs.workbook.bRedoChanges) if(!aWs.workbook.bUndoChanges && !aWs.workbook.bRedoChanges)
ws._onUpdateFormatTable(oldFilter.Ref, false, true); ws._onUpdateFormatTable(oldFilter.Ref, false, true);
console.timeEnd("_applyMainFilter2");
}, },
checkAddAutoFilter: function(activeRange, styleName) checkAddAutoFilter: function(activeRange, styleName)
......
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