Commit 11e52eee authored by GoshaZotov's avatar GoshaZotov

remove argumentsCurrent from formulas functions

parent 35e00d55
......@@ -278,7 +278,7 @@
break;
}
}
if (i === this.argumentsCurrent - 1) {
if (i === arg.length - 1) {
res = new cError(cErrorType.not_available);
break;
}
......
......@@ -269,7 +269,7 @@ function (window, undefined) {
cCOLUMN.prototype.argumentsMax = 1;
cCOLUMN.prototype.Calculate = function (arg) {
var bbox;
if (0 === this.argumentsCurrent) {
if (0 === arg.length) {
bbox = arguments[1];
} else {
var arg0 = arg[0];
......@@ -538,7 +538,7 @@ function (window, undefined) {
cLOOKUP.prototype.argumentsMin = 2;
cLOOKUP.prototype.argumentsMax = 3;
cLOOKUP.prototype.Calculate = function (arg) {
var arg0 = arg[0], arg1 = arg[1], arg2 = 2 === this.argumentsCurrent ? arg1 : arg[2], resC = -1, resR = -1,
var arg0 = arg[0], arg1 = arg[1], arg2 = 2 === arg.length ? arg1 : arg[2], resC = -1, resR = -1,
t = this;
if (cElementType.error === arg0.type) {
......@@ -657,7 +657,7 @@ function (window, undefined) {
}
var b = arg2.getBBox0();
if (2 === this.argumentsCurrent) {
if (2 === arg.length) {
if (arg1Range[0].length >= 2) {
return new cRef(ws.getCell3(b.r1 + index, b.c2 + 0).getName(), ws);
} else {
......@@ -865,7 +865,7 @@ function (window, undefined) {
cROW.prototype.argumentsMax = 1;
cROW.prototype.Calculate = function (arg) {
var bbox;
if (0 === this.argumentsCurrent) {
if (0 === arg.length) {
bbox = arguments[1];
} else {
var arg0 = arg[0];
......
......@@ -4445,9 +4445,6 @@
return new cNumber(_sum);
};
cSUMIFS.prototype.checkArguments = function (countArguments) {
if(undefined === countArguments){
countArguments = this.argumentsCurrent;
}
return 1 === countArguments % 2 && cBaseFunction.prototype.checkArguments.apply(this, arguments);
};
......
......@@ -4041,9 +4041,6 @@ function (window, undefined) {
}
};
cAVERAGEIFS.prototype.checkArguments = function (countArguments) {
if(undefined === countArguments){
countArguments = this.argumentsCurrent;
}
return 1 === countArguments % 2 && cBaseFunction.prototype.checkArguments.apply(this, arguments);
};
......@@ -5070,9 +5067,6 @@ function (window, undefined) {
return new cNumber(_count);
};
cCOUNTIFS.prototype.checkArguments = function (countArguments) {
if(undefined === countArguments){
countArguments = this.argumentsCurrent;
}
return 0 === countArguments % 2 && cBaseFunction.prototype.checkArguments.apply(this, arguments);
};
......@@ -7769,9 +7763,6 @@ function (window, undefined) {
return new cNumber(resArr[0]);
};
cMAXIFS.prototype.checkArguments = function (countArguments) {
if(undefined === countArguments){
countArguments = this.argumentsCurrent;
}
return 1 === countArguments % 2 && cBaseFunction.prototype.checkArguments.apply(this, arguments);
};
......@@ -7876,9 +7867,6 @@ function (window, undefined) {
return new cNumber(resArr[0]);
};
cMINIFS.prototype.checkArguments = function (countArguments) {
if(undefined === countArguments){
countArguments = this.argumentsCurrent;
}
return 1 === countArguments % 2 && cBaseFunction.prototype.checkArguments.apply(this, arguments);
};
......
......@@ -858,7 +858,7 @@ function (window, undefined) {
cLEFT.prototype.argumentsMin = 1;
cLEFT.prototype.argumentsMax = 2;
cLEFT.prototype.Calculate = function (arg) {
var arg0 = arg[0], arg1 = this.argumentsCurrent == 1 ? new cNumber(1) : arg[1];
var arg0 = arg[0], arg1 = arg.length == 1 ? new cNumber(1) : arg[1];
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1]);
}
......@@ -1417,7 +1417,7 @@ function (window, undefined) {
cRIGHT.prototype.argumentsMin = 1;
cRIGHT.prototype.argumentsMax = 2;
cRIGHT.prototype.Calculate = function (arg) {
var arg0 = arg[0], arg1 = this.argumentsCurrent == 1 ? new cNumber(1) : arg[1];
var arg0 = arg[0], arg1 = arg.length === 1 ? new cNumber(1) : arg[1];
if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
arg0 = arg0.cross(arguments[1]);
}
......
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