Commit ea6b2f1f authored by Alexander.Trofimov's avatar Alexander.Trofimov

delete obscure check

fix #32273
parent 251415e0
...@@ -3302,8 +3302,8 @@ ...@@ -3302,8 +3302,8 @@
var worksheet = this.worksheet, temp = {}, isDateTimeFormat, /*dataValue,*/ values = []; var worksheet = this.worksheet, temp = {}, isDateTimeFormat, /*dataValue,*/ values = [];
colId = this._getTrueColId(filter, colId); colId = this._getTrueColId(filter, colId);
var currentElemArray = this._getFilterColumnNum(filterColumns, colId);//номер данного фильтра в массиве фильтров var currentFilterColumn = this._getFilterColumn(filter, colId);
var addValueToMenuObj = function(tempResult, count) var addValueToMenuObj = function(tempResult, count)
{ {
...@@ -3343,10 +3343,8 @@ ...@@ -3343,10 +3343,8 @@
} }
var individualCount, count, tempResult; var individualCount, count, tempResult;
var isCustomFilters = currentElemArray !== null && filterColumns[currentElemArray] && filterColumns[currentElemArray].CustomFiltersObj; // ToDo Нужно проверить, я не очень понял, зачем тут была проверка...
var isColorFilter = currentElemArray !== null && filterColumns[currentElemArray] && filterColumns[currentElemArray].ColorFilter; if (true) {
if(currentElemArray === null || (filterColumns[currentElemArray] && (filterColumns[currentElemArray].Filters || filterColumns[currentElemArray].Top10 || filterColumns[currentElemArray].ShowButton === false) || isCustomFilters || isColorFilter))
{
individualCount = 0; individualCount = 0;
count = 0; count = 0;
for(var i = ref.r1 + 1; i <= maxFilterRow; i++) for(var i = ref.r1 + 1; i <= maxFilterRow; i++)
...@@ -3356,7 +3354,7 @@ ...@@ -3356,7 +3354,7 @@
break; break;
//not apply filter by current button //not apply filter by current button
if(currentElemArray === null && worksheet.getRowHidden(i) === true) if(null === currentFilterColumn && worksheet.getRowHidden(i) === true)
{ {
individualCount++; individualCount++;
continue; continue;
...@@ -3376,7 +3374,7 @@ ...@@ -3376,7 +3374,7 @@
continue; continue;
//apply filter by current button //apply filter by current button
if(currentElemArray !== null) if(null !== currentFilterColumn)
{ {
if(!this._hiddenAnotherFilter(filterColumns, colId, i, ref.c1))//filter another button if(!this._hiddenAnotherFilter(filterColumns, colId, i, ref.c1))//filter another button
{ {
...@@ -3387,7 +3385,8 @@ ...@@ -3387,7 +3385,8 @@
//filter current button //filter current button
var checkValue = isDateTimeFormat ? val : text; var checkValue = isDateTimeFormat ? val : text;
if(!filterColumns[currentElemArray].Top10 && !isCustomFilters && !isColorFilter && !filterColumns[currentElemArray].isHideValue(checkValue, isDateTimeFormat)) if (!currentFilterColumn.Top10 && !currentFilterColumn.CustomFiltersObj &&
!currentFilterColumn.ColorFilter && !currentFilterColumn.isHideValue(checkValue, isDateTimeFormat))
{ {
if(isOpenHiddenRows) if(isOpenHiddenRows)
worksheet.setRowHidden(false, i, i); worksheet.setRowHidden(false, i, i);
...@@ -4286,6 +4285,7 @@ ...@@ -4286,6 +4285,7 @@
_getFilterColumn: function(autoFilter, colId) _getFilterColumn: function(autoFilter, colId)
{ {
var res = null;
var filters; var filters;
if(autoFilter && autoFilter.FilterColumns) if(autoFilter && autoFilter.FilterColumns)
{ {
...@@ -4294,29 +4294,12 @@ ...@@ -4294,29 +4294,12 @@
{ {
if(filters[k].ColId == colId) if(filters[k].ColId == colId)
{ {
filters = filters[k]; res = filters[k];
break;
}
}
}
return filters;
},
_getFilterColumnNum: function(filterColumns, colId)
{
var currentElemArray = null;
if(filterColumns && filterColumns.length)
{
for(var i = 0; i < filterColumns.length; i++)
{
if(colId === filterColumns[i].ColId)
{
currentElemArray = i;
break; break;
} }
} }
} }
return currentElemArray; return res;
}, },
_isEmptyCellsUnderRange: function(range) _isEmptyCellsUnderRange: function(range)
......
...@@ -12609,7 +12609,7 @@ ...@@ -12609,7 +12609,7 @@
var colId = filterProp.colId; var colId = filterProp.colId;
var openAndClosedValues = ws.autoFilters._getOpenAndClosedValues(autoFilter, colId); var openAndClosedValues = ws.autoFilters._getOpenAndClosedValues(autoFilter, colId);
var values = openAndClosedValues.values; var values = openAndClosedValues.values;
var automaticRowCount = openAndClosedValues.automaticRowCount var automaticRowCount = openAndClosedValues.automaticRowCount;
var filters = ws.autoFilters._getFilterColumn(autoFilter, colId); var filters = ws.autoFilters._getFilterColumn(autoFilter, colId);
var rangeButton = Asc.Range(autoFilter.Ref.c1 + colId, autoFilter.Ref.r1, autoFilter.Ref.c1 + colId, autoFilter.Ref.r1); var rangeButton = Asc.Range(autoFilter.Ref.c1 + colId, autoFilter.Ref.r1, autoFilter.Ref.c1 + colId, autoFilter.Ref.r1);
......
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