Commit 48d70ed3 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

Asc.ECustomFilter -> c_oAscCustomAutoFilter

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57164 954022d7-b5bf-4e40-9824-e11837661b57
parent 3fd17575
...@@ -272,11 +272,11 @@ var c_oAscLayoutPageType = { ...@@ -272,11 +272,11 @@ var c_oAscLayoutPageType = {
var c_oAscCustomAutoFilter = { var c_oAscCustomAutoFilter = {
equals: 1, equals: 1,
doesNotEqual: 6,
isGreaterThan: 2, isGreaterThan: 2,
isGreaterThanOrEqualTo: 3, isGreaterThanOrEqualTo: 3,
isLessThan: 4, isLessThan: 4,
isLessThanOrEqualTo: 5, isLessThanOrEqualTo: 5,
doesNotEqual: 6,
beginsWith: 7, beginsWith: 7,
doesNotBeginWith: 8, doesNotBeginWith: 8,
endsWith: 9, endsWith: 9,
......
...@@ -3484,22 +3484,22 @@ var gUndoInsDelCellsFlag = true; ...@@ -3484,22 +3484,22 @@ var gUndoInsDelCellsFlag = true;
result[s] = checkComplexSymbols; result[s] = checkComplexSymbols;
else else
{ {
if (arrLog[s] == Asc.ECustomFilter.customfilterEqual || arrLog[s] == Asc.ECustomFilter.customfilterNotEqual)//общие для числа и текста if (arrLog[s] == c_oAscCustomAutoFilter.equals || arrLog[s] == c_oAscCustomAutoFilter.doesNotEqual)//общие для числа и текста
{ {
val = val.toString(); val = val.toString();
filterVal = valLog[s].toString(); filterVal = valLog[s].toString();
if (arrLog[s] == Asc.ECustomFilter.customfilterEqual)//equals if (arrLog[s] == c_oAscCustomAutoFilter.equals)//equals
{ {
if(val == filterVal || valWithFormat == filterVal) if(val == filterVal || valWithFormat == filterVal)
result[s] = true; result[s] = true;
} }
else if (arrLog[s] == Asc.ECustomFilter.customfilterNotEqual)//doesNotEqual else if (arrLog[s] == c_oAscCustomAutoFilter.doesNotEqual)//doesNotEqual
{ {
if(val != filterVal || valWithFormat != filterVal) if(val != filterVal || valWithFormat != filterVal)
result[s] = true; result[s] = true;
} }
} }
else if (arrLog[s] == Asc.ECustomFilter.customfilterGreaterThan || arrLog[s] == Asc.ECustomFilter.customfilterGreaterThanOrEqual || arrLog[s] == Asc.ECustomFilter.customfilterLessThan || arrLog[s] == Asc.ECustomFilter.customfilterLessThanOrEqual)//только для чисел else if (arrLog[s] == c_oAscCustomAutoFilter.isGreaterThan || arrLog[s] == c_oAscCustomAutoFilter.isGreaterThanOrEqualTo || arrLog[s] == c_oAscCustomAutoFilter.isLessThan || arrLog[s] == c_oAscCustomAutoFilter.isLessThanOrEqualTo)//только для чисел
{ {
filterVal = parseFloat(valLog[s]); filterVal = parseFloat(valLog[s]);
if(g_oFormatParser && g_oFormatParser.parse && g_oFormatParser.parse(valLog[s]) != null) if(g_oFormatParser && g_oFormatParser.parse && g_oFormatParser.parse(valLog[s]) != null)
...@@ -3510,26 +3510,26 @@ var gUndoInsDelCellsFlag = true; ...@@ -3510,26 +3510,26 @@ var gUndoInsDelCellsFlag = true;
{ {
switch (arrLog[s]) switch (arrLog[s])
{ {
case Asc.ECustomFilter.customfilterGreaterThan: case c_oAscCustomAutoFilter.isGreaterThan:
if(val > filterVal)//isGreaterThan if(val > filterVal)//isGreaterThan
result[s] = true; result[s] = true;
break; break;
case Asc.ECustomFilter.customfilterGreaterThanOrEqual: case c_oAscCustomAutoFilter.isGreaterThanOrEqualTo:
if(val >= filterVal)//isGreaterThanOrEqualTo if(val >= filterVal)//isGreaterThanOrEqualTo
result[s] = true; result[s] = true;
break; break;
case Asc.ECustomFilter.customfilterLessThan: case c_oAscCustomAutoFilter.isLessThan:
if(val < valLog[s])//isLessThan if(val < valLog[s])//isLessThan
result[s] = true; result[s] = true;
break; break;
case Asc.ECustomFilter.customfilterLessThanOrEqual: case c_oAscCustomAutoFilter.isLessThanOrEqualTo:
if(val <= filterVal)//isLessThanOrEqualTo if(val <= filterVal)//isLessThanOrEqualTo
result[s] = true; result[s] = true;
break; break;
} }
} }
} }
else if(arrLog[s] == 7 || arrLog[s] == 8 || arrLog[s] == 9 || arrLog[s] == 10 || arrLog[s] == 11 || arrLog[s] == 12 || arrLog[s] == 13)//только для текста else if(arrLog[s] == c_oAscCustomAutoFilter.beginsWith || arrLog[s] == c_oAscCustomAutoFilter.doesNotBeginWith || arrLog[s] == c_oAscCustomAutoFilter.endsWith || arrLog[s] == c_oAscCustomAutoFilter.doesNotEndWith || arrLog[s] == c_oAscCustomAutoFilter.contains || arrLog[s] == c_oAscCustomAutoFilter.doesNotContain)//только для текста
{ {
filterVal = valLog[s]; filterVal = valLog[s];
...@@ -3539,7 +3539,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -3539,7 +3539,7 @@ var gUndoInsDelCellsFlag = true;
var position; var position;
switch (arrLog[s]) switch (arrLog[s])
{ {
case 7: case c_oAscCustomAutoFilter.beginsWith:
if(type == 1) if(type == 1)
{ {
//if(newVal.search("?") || newVal.search("*")) //if(newVal.search("?") || newVal.search("*"))
...@@ -3547,7 +3547,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -3547,7 +3547,7 @@ var gUndoInsDelCellsFlag = true;
result[s] = true; result[s] = true;
} }
break; break;
case 8: case c_oAscCustomAutoFilter.doesNotBeginWith:
if(type == 1) if(type == 1)
{ {
if(newVal.search(filterVal) != 0)//doesNotBeginWith if(newVal.search(filterVal) != 0)//doesNotBeginWith
...@@ -3556,7 +3556,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -3556,7 +3556,7 @@ var gUndoInsDelCellsFlag = true;
else else
result[s] = true; result[s] = true;
break; break;
case 9: case c_oAscCustomAutoFilter.endsWith:
position = newVal.length - filterVal.length; position = newVal.length - filterVal.length;
if(type == 1) if(type == 1)
{ {
...@@ -3564,7 +3564,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -3564,7 +3564,7 @@ var gUndoInsDelCellsFlag = true;
result[s] = true; result[s] = true;
} }
break; break;
case 10: case c_oAscCustomAutoFilter.doesNotEndWith:
position = newVal.length - filterVal.length; position = newVal.length - filterVal.length;
if(type == 1) if(type == 1)
{ {
...@@ -3574,14 +3574,14 @@ var gUndoInsDelCellsFlag = true; ...@@ -3574,14 +3574,14 @@ var gUndoInsDelCellsFlag = true;
else else
result[s] = true; result[s] = true;
break; break;
case 11: case c_oAscCustomAutoFilter.contains:
if(type == 1) if(type == 1)
{ {
if(newVal.search(filterVal) != -1)//contains if(newVal.search(filterVal) != -1)//contains
result[s] = true; result[s] = true;
} }
break; break;
case 12: case c_oAscCustomAutoFilter.doesNotContain:
if(type == 1) if(type == 1)
{ {
if(newVal.search(filterVal) == -1)//doesNotContain if(newVal.search(filterVal) == -1)//doesNotContain
......
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