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

fix bug 32501

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