Commit 2b57e6a8 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

http://bugzserver/show_bug.cgi?id=27337 - Потеря выбора данных в окне...

http://bugzserver/show_bug.cgi?id=27337 - Потеря выбора данных в окне автофильтра после скрытия значений фильтрованного диапазона, у которых формат отличен от General, Integer и Text

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60513 954022d7-b5bf-4e40-9824-e11837661b57
parent 51aee8ce
...@@ -2950,6 +2950,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -2950,6 +2950,7 @@ var gUndoInsDelCellsFlag = true;
break; break;
var cell = ws.model.getCell3(activeCells.r1 + i + 1, activeCells.c1); var cell = ws.model.getCell3(activeCells.r1 + i + 1, activeCells.c1);
var valActive = cell.getValueWithFormat(); var valActive = cell.getValueWithFormat();
var valWithoutFormat = cell.getValueWithoutFormat();
var arrVal; var arrVal;
if(isCurFilter == undefined || !currentFilter[isCurFilter].Filters)//создаём, если его ещё нет if(isCurFilter == undefined || !currentFilter[isCurFilter].Filters)//создаём, если его ещё нет
{ {
...@@ -2978,13 +2979,13 @@ var gUndoInsDelCellsFlag = true; ...@@ -2978,13 +2979,13 @@ var gUndoInsDelCellsFlag = true;
var isConsist = undefined; var isConsist = undefined;
for(var h = 0; h < arrVal.length; h++) for(var h = 0; h < arrVal.length; h++)
{ {
if(this._dataFilterParse(arrVal[h],valActive)) if(this._dataFilterParse(arrVal[h], valWithoutFormat))
isConsist = h; isConsist = h;
} }
if(isConsist == undefined)//создаём новый элемент дата if(isConsist == undefined)//создаём новый элемент дата
{ {
var dataVal = NumFormat.prototype.parseDate(valActive); var dataVal = NumFormat.prototype.parseDate(valWithoutFormat);
valActive = new DateGroupItem(); valActive = new DateGroupItem();
valActive.DateTimeGrouping = 1; valActive.DateTimeGrouping = 1;
valActive.Day = dataVal.d; valActive.Day = dataVal.d;
...@@ -4517,6 +4518,9 @@ var gUndoInsDelCellsFlag = true; ...@@ -4517,6 +4518,9 @@ var gUndoInsDelCellsFlag = true;
var cell = ws.model.getCell3(nRow,col); var cell = ws.model.getCell3(nRow,col);
var val, val2; var val, val2;
val = val2 = cell.getValueWithFormat(); val = val2 = cell.getValueWithFormat();
var isDateFormatCell = cell.getNumFormat().isDateTimeFormat();
var valueWithoutFormat = cell.getValueWithoutFormat();
if(!result[nC]) if(!result[nC])
result[nC] = new AutoFiltersOptionsElements(); result[nC] = new AutoFiltersOptionsElements();
if(curFilter.ColId == numFilter)//щёлкнули по кнопке данного фильтра if(curFilter.ColId == numFilter)//щёлкнули по кнопке данного фильтра
...@@ -4567,18 +4571,16 @@ var gUndoInsDelCellsFlag = true; ...@@ -4567,18 +4571,16 @@ var gUndoInsDelCellsFlag = true;
{ {
for(var nVal = 0; nVal < dataValues.length; nVal++) for(var nVal = 0; nVal < dataValues.length; nVal++)
{ {
if(this._dataFilterParse(dataValues[nVal],val2)) result[nC].val = val;
result[nC].val2 = val2;
if(isDateFormatCell && this._dataFilterParse(dataValues[nVal], valueWithoutFormat))
{ {
result[nC].val = val;
result[nC].val2 = val2;
if(result[nC].visible != 'hidden') if(result[nC].visible != 'hidden')
result[nC].visible = true; result[nC].visible = true;
break; break;
} }
else else
{ {
result[nC].val = val;
result[nC].val2 = val2;
if(result[nC].visible != 'hidden') if(result[nC].visible != 'hidden')
result[nC].visible = false; result[nC].visible = false;
} }
...@@ -4602,7 +4604,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -4602,7 +4604,7 @@ var gUndoInsDelCellsFlag = true;
{ {
for(var nVal = 0; nVal < dataValues.length; nVal++) for(var nVal = 0; nVal < dataValues.length; nVal++)
{ {
if(this._dataFilterParse(dataValues[nVal],val2)) if(isDateFormatCell && this._dataFilterParse(dataValues[nVal], valueWithoutFormat))
{ {
check = true; check = true;
break; break;
......
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