Commit 9b8e00c8 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix bug 32501

parent 32e5a04c
......@@ -3810,7 +3810,7 @@ function cSUBTOTAL() {
cSUBTOTAL.prototype = Object.create( cBaseFunction.prototype )
cSUBTOTAL.prototype.Calculate = function ( arg ) {
var arg0 = arg[0];
var f, arg0 = arg[0];
if ( arg0 instanceof cArea || arg0 instanceof cArea3D ) {
arg0 = arg0.cross( arguments[1].first );
......@@ -3836,11 +3836,15 @@ cSUBTOTAL.prototype.Calculate = function ( arg ) {
break;
case cSubTotalFunctionType.includes.MAX:
case cSubTotalFunctionType.excludes.MAX:
this.value = (new AscCommonExcel.cMAX()).Calculate(arg.slice(1));
f = new AscCommonExcel.cMAX();
f.setArgumentsCount(arg.length - 1);
this.value = f.Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.MIN:
case cSubTotalFunctionType.excludes.MIN:
this.value = (new AscCommonExcel.cMIN()).Calculate(arg.slice(1));
f = new AscCommonExcel.cMIN();
f.setArgumentsCount(arg.length - 1);
this.value = f.Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.PRODUCT:
case cSubTotalFunctionType.excludes.PRODUCT:
......
......@@ -5199,13 +5199,13 @@ function cTRIMMEAN() {
cBaseFunction.call( this, "TRIMMEAN" );
}
cTRIMMEAN.prototype = Object.create( cBaseFunction.prototype )
cTRIMMEAN.prototype = Object.create( cBaseFunction.prototype );
function cTTEST() {
cBaseFunction.call( this, "TTEST" );
}
cTTEST.prototype = Object.create( cBaseFunction.prototype )
cTTEST.prototype = Object.create( cBaseFunction.prototype );
function cVAR() {
// cBaseFunction.call( this, "VAR" );
......@@ -5298,13 +5298,13 @@ cVAR.prototype.Calculate = function ( arg ) {
}
return this.value = _var( arr0 );
}
};
cVAR.prototype.getInfo = function () {
return {
name:this.name,
args:"( argument-list )"
};
}
};
function cVARA() {
// cBaseFunction.call( this, "VARA" );
......@@ -5323,7 +5323,7 @@ function cVARA() {
}
cVARA.prototype = Object.create( cBaseFunction.prototype )
cVARA.prototype = Object.create( cBaseFunction.prototype );
cVARA.prototype.Calculate = function ( arg ) {
function _var( x ) {
......@@ -5412,13 +5412,13 @@ cVARA.prototype.Calculate = function ( arg ) {
}
return this.value = _var( arr0 );
}
};
cVARA.prototype.getInfo = function () {
return {
name:this.name,
args:"( argument-list )"
};
}
};
function cVARP() {
// cBaseFunction.call( this, "VARP" );
......@@ -5507,13 +5507,13 @@ cVARP.prototype.Calculate = function ( arg ) {
}
return this.value = _var( arr0 );
}
};
cVARP.prototype.getInfo = function () {
return {
name:this.name,
args:"( argument-list )"
};
}
};
function cVARdotP() {
// cBaseFunction.call( this, "VARP" );
......@@ -5532,14 +5532,14 @@ function cVARdotP() {
}
cVARdotP.prototype = Object.create( cBaseFunction.prototype )
cVARdotP.prototype = Object.create( cBaseFunction.prototype );
cVARdotP.prototype.Calculate = cVARP.prototype.Calculate;
cVARdotP.prototype.getInfo = function () {
return {
name:this.name,
args:"( argument-list )"
};
}
};
function cVARPA() {
// cBaseFunction.call( this, "VARPA" );
......@@ -5558,7 +5558,7 @@ function cVARPA() {
}
cVARPA.prototype = Object.create( cBaseFunction.prototype )
cVARPA.prototype = Object.create( cBaseFunction.prototype );
cVARPA.prototype.Calculate = function ( arg ) {
function _var( x ) {
......@@ -5647,19 +5647,19 @@ cVARPA.prototype.Calculate = function ( arg ) {
}
return this.value = _var( arr0 );
}
};
cVARPA.prototype.getInfo = function () {
return {
name:this.name,
args:"( argument-list )"
};
}
};
function cWEIBULL() {
cBaseFunction.call( this, "WEIBULL" );
}
cWEIBULL.prototype = Object.create( cBaseFunction.prototype )
cWEIBULL.prototype = Object.create( cBaseFunction.prototype );
function cZTEST() {
cBaseFunction.call( this, "ZTEST" );
......@@ -5681,4 +5681,5 @@ cZTEST.prototype = Object.create( cBaseFunction.prototype );
window['AscCommonExcel'].cSTDEV = cSTDEV;
window['AscCommonExcel'].cSTDEVP = cSTDEVP;
window['AscCommonExcel'].cVAR = cVAR;
window['AscCommonExcel'].cVARP = cVARP;
})(window);
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