Commit 14b892ad authored by Sergey Konovalov's avatar Sergey Konovalov

instead of Range use bbox for Calculate

parent 0bb5843e
......@@ -311,17 +311,17 @@
var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2], year, month, day;
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
}
if (arg1 instanceof cArea || arg1 instanceof cArea3D) {
arg1 = arg1.cross(arguments[1].bbox);
arg1 = arg1.cross(arguments[1]);
} else if (arg1 instanceof cArray) {
arg1 = arg1.getElement(0);
}
if (arg2 instanceof cArea || arg2 instanceof cArea3D) {
arg2 = arg2.cross(arguments[1].bbox);
arg2 = arg2.cross(arguments[1]);
} else if (arg2 instanceof cArray) {
arg2 = arg2.getElement(0);
}
......@@ -383,19 +383,19 @@
cDATEDIF.prototype.Calculate = function (arg) {
var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cArray) {
arg0 = arg0.getElementRowCol(0, 0);
}
if (arg1 instanceof cArea || arg1 instanceof cArea3D) {
arg1 = arg1.cross(arguments[1].bbox);
arg1 = arg1.cross(arguments[1]);
} else if (arg1 instanceof cArray) {
arg1 = arg1.getElementRowCol(0, 0);
}
if (arg2 instanceof cArea || arg2 instanceof cArea3D) {
arg2 = arg2.cross(arguments[1].bbox);
arg2 = arg2.cross(arguments[1]);
} else if (arg2 instanceof cArray) {
arg2 = arg2.getElementRowCol(0, 0);
}
......@@ -505,7 +505,7 @@
var arg0 = arg[0];
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cArray) {
arg0 = arg0.getElementRowCol(0, 0);
}
......@@ -549,7 +549,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox).tocNumber();
arg0 = arg0.cross(arguments[1]).tocNumber();
val = arg0.tocNumber().getValue();
}
if (arg0 instanceof cError) {
......@@ -622,19 +622,19 @@
var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2] ? arg[2] : new cBool(false);
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cArray) {
arg0 = arg0.getElementRowCol(0, 0);
}
if (arg1 instanceof cArea || arg1 instanceof cArea3D) {
arg1 = arg1.cross(arguments[1].bbox);
arg1 = arg1.cross(arguments[1]);
} else if (arg1 instanceof cArray) {
arg1 = arg1.getElementRowCol(0, 0);
}
if (arg2 instanceof cArea || arg2 instanceof cArea3D) {
arg2 = arg2.cross(arguments[1].bbox);
arg2 = arg2.cross(arguments[1]);
} else if (arg2 instanceof cArray) {
arg2 = arg2.getElementRowCol(0, 0);
}
......@@ -691,13 +691,13 @@
var arg0 = arg[0], arg1 = arg[1];
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cArray) {
arg0 = arg0.getElementRowCol(0, 0);
}
if (arg1 instanceof cArea || arg1 instanceof cArea3D) {
arg1 = arg1.cross(arguments[1].bbox);
arg1 = arg1.cross(arguments[1]);
} else if (arg1 instanceof cArray) {
arg1 = arg1.getElementRowCol(0, 0);
}
......@@ -769,13 +769,13 @@
var arg0 = arg[0], arg1 = arg[1];
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cArray) {
arg0 = arg0.getElementRowCol(0, 0);
}
if (arg1 instanceof cArea || arg1 instanceof cArea3D) {
arg1 = arg1.cross(arguments[1].bbox);
arg1 = arg1.cross(arguments[1]);
} else if (arg1 instanceof cArray) {
arg1 = arg1.getElementRowCol(0, 0);
}
......@@ -839,7 +839,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox).tocNumber();
arg0 = arg0.cross(arguments[1]).tocNumber();
}
if (arg0 instanceof cError) {
......@@ -907,7 +907,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox).tocNumber();
arg0 = arg0.cross(arguments[1]).tocNumber();
}
if (arg0 instanceof cError) {
......@@ -974,7 +974,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox).tocNumber();
arg0 = arg0.cross(arguments[1]).tocNumber();
}
if (arg0 instanceof cError) {
......@@ -1045,13 +1045,13 @@
var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cArray) {
arg0 = arg0.getElementRowCol(0, 0);
}
if (arg1 instanceof cArea || arg1 instanceof cArea3D) {
arg1 = arg1.cross(arguments[1].bbox);
arg1 = arg1.cross(arguments[1]);
} else if (arg1 instanceof cArray) {
arg1 = arg1.getElementRowCol(0, 0);
}
......@@ -1213,7 +1213,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox).tocNumber();
arg0 = arg0.cross(arguments[1]).tocNumber();
}
if (arg0 instanceof cError) {
......@@ -1278,17 +1278,17 @@
var hour = arg[0], minute = arg[1], second = arg[2];
if (hour instanceof cArea || hour instanceof cArea3D) {
hour = hour.cross(arguments[1].bbox);
hour = hour.cross(arguments[1]);
} else if (hour instanceof cArray) {
hour = hour.getElement(0);
}
if (minute instanceof cArea || minute instanceof cArea3D) {
minute = minute.cross(arguments[1].bbox);
minute = minute.cross(arguments[1]);
} else if (minute instanceof cArray) {
minute = minute.getElement(0);
}
if (second instanceof cArea || second instanceof cArea3D) {
second = second.cross(arguments[1].bbox);
second = second.cross(arguments[1]);
} else if (second instanceof cArray) {
second = second.getElement(0);
}
......@@ -1341,7 +1341,7 @@
var arg0 = arg[0];
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cArray) {
arg0 = arg0.getElementRowCol(0, 0);
}
......@@ -1410,13 +1410,13 @@
var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cNumber(1);
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cArray) {
arg0 = arg0.getElementRowCol(0, 0);
}
if (arg1 instanceof cArea || arg1 instanceof cArea3D) {
arg1 = arg1.cross(arguments[1].bbox);
arg1 = arg1.cross(arguments[1]);
} else if (arg1 instanceof cArray) {
arg1 = arg1.getElementRowCol(0, 0);
}
......@@ -1525,13 +1525,13 @@
}
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cArray) {
arg0 = arg0.getElementRowCol(0, 0);
}
if (arg1 instanceof cArea || arg1 instanceof cArea3D) {
arg1 = arg1.cross(arguments[1].bbox);
arg1 = arg1.cross(arguments[1]);
} else if (arg1 instanceof cArray) {
arg1 = arg1.getElementRowCol(0, 0);
}
......@@ -1615,13 +1615,13 @@
var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cArray) {
arg0 = arg0.getElementRowCol(0, 0);
}
if (arg1 instanceof cArea || arg1 instanceof cArea3D) {
arg1 = arg1.cross(arguments[1].bbox);
arg1 = arg1.cross(arguments[1]);
} else if (arg1 instanceof cArray) {
arg1 = arg1.getElementRowCol(0, 0);
}
......@@ -1753,7 +1753,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox).tocNumber();
arg0 = arg0.cross(arguments[1]).tocNumber();
}
if (arg0 instanceof cError) {
......@@ -1817,19 +1817,19 @@
cYEARFRAC.prototype.Calculate = function (arg) {
var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2] ? arg[2] : new cNumber(0);
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cArray) {
arg0 = arg0.getElementRowCol(0, 0);
}
if (arg1 instanceof cArea || arg1 instanceof cArea3D) {
arg1 = arg1.cross(arguments[1].bbox);
arg1 = arg1.cross(arguments[1]);
} else if (arg1 instanceof cArray) {
arg1 = arg1.getElementRowCol(0, 0);
}
if (arg2 instanceof cArea || arg2 instanceof cArea3D) {
arg2 = arg2.cross(arguments[1].bbox);
arg2 = arg2.cross(arguments[1]);
} else if (arg2 instanceof cArray) {
arg2 = arg2.getElementRowCol(0, 0);
}
......
......@@ -100,7 +100,7 @@
if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
arg0 = arg0.getValue();
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cArray) {
var ret = new cArray();
arg0.foreach(function (elem, r, c) {
......@@ -136,7 +136,7 @@
cISBLANK.prototype.Calculate = function (arg) {
var arg0 = arg[0];
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
arg0 = arg0.getValue();
}
......@@ -171,7 +171,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
arg0 = arg0.getValue();
}
......@@ -207,7 +207,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
arg0 = arg0.getValue();
}
......@@ -243,7 +243,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
arg0 = arg0.getValue();
}
......@@ -284,7 +284,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
arg0 = arg0.getValue();
}
......@@ -320,7 +320,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
arg0 = arg0.getValue();
}
......@@ -356,7 +356,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
arg0 = arg0.getValue();
}
......@@ -391,7 +391,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
arg0 = arg0.getValue();
}
......@@ -427,7 +427,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
arg0 = arg0.getValue();
}
......@@ -496,7 +496,7 @@
if (arg0 instanceof cArray) {
arg0 = arg0.getElement(0);
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
arg0 = arg0.getValue();
}
......@@ -543,7 +543,7 @@
});
return this.value = arr;
} else if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
arg0 = arg0.getValue();
}
......@@ -602,7 +602,7 @@
cTYPE.prototype.Calculate = function (arg) {
var arg0 = arg[0];
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
} else if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
arg0 = arg0.getValue();
}
......
......@@ -222,7 +222,7 @@
arg0 = arg0.getValue();
}
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
}
if (arg0 instanceof cError) {
......@@ -258,7 +258,7 @@
}
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
}
if (arg0 instanceof cString) {
......
......@@ -113,31 +113,31 @@
arg[3] : new cBool(true), sheetName = arg[4] ? arg[4] : new cEmpty();
if (cElementType.cellsRange === rowNumber.type || cElementType.cellsRange3D === rowNumber.type) {
rowNumber = rowNumber.cross(arguments[1].bbox);
rowNumber = rowNumber.cross(arguments[1]);
} else if (cElementType.array === rowNumber.type) {
rowNumber = rowNumber.getElementRowCol(0, 0);
}
if (cElementType.cellsRange === colNumber.type || cElementType.cellsRange3D === colNumber.type) {
colNumber = colNumber.cross(arguments[1].bbox);
colNumber = colNumber.cross(arguments[1]);
} else if (cElementType.array === colNumber.type) {
colNumber = colNumber.getElementRowCol(0, 0);
}
if (cElementType.cellsRange === refType.type || cElementType.cellsRange3D === refType.type) {
refType = refType.cross(arguments[1].bbox);
refType = refType.cross(arguments[1]);
} else if (cElementType.array === refType.type) {
refType = refType.getElementRowCol(0, 0);
}
if (cElementType.cellsRange === A1RefType.type || cElementType.cellsRange3D === A1RefType.type) {
A1RefType = A1RefType.cross(arguments[1].bbox);
A1RefType = A1RefType.cross(arguments[1]);
} else if (cElementType.array === A1RefType.type) {
A1RefType = A1RefType.getElementRowCol(0, 0);
}
if (cElementType.cellsRange === sheetName.type || cElementType.cellsRange3D === sheetName.type) {
sheetName = sheetName.cross(arguments[1].bbox);
sheetName = sheetName.cross(arguments[1]);
} else if (cElementType.array === sheetName.type) {
sheetName = sheetName.getElementRowCol(0, 0);
}
......@@ -243,7 +243,7 @@
var arg0 = arg[0];
if (cElementType.cellsRange === arg0.type || cElementType.cellsRange3D === arg0.type) {
arg0 = arg0.cross(arguments[1].bbox);
arg0 = arg0.cross(arguments[1]);
}
arg0 = arg0.tocNumber();
......
This diff is collapsed.
......@@ -5314,7 +5314,7 @@ Woorksheet.prototype.isApplyFilterBySheet = function(){
if (AscCommon.c_oNotifyParentType.CanDo === type) {
return true;
} else if (AscCommon.c_oNotifyParentType.GetRangeCell === type) {
return this.ws.getCell3(this.nRow, this.nCol);
return new Asc.Range(this.nCol, this.nRow, this.nCol, this.nRow);
} else if (AscCommon.c_oNotifyParentType.Change === type) {
this.ws.workbook.dependencyFormulas.addToChangedCell(this);
} else if (AscCommon.c_oNotifyParentType.ChangeFormula === type) {
......
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