From 20627c3435bbf7509c57f4ac144b7b650015a941 Mon Sep 17 00:00:00 2001 From: "Alexander.Trofimov" <Alexander.Trofimov@onlyoffice.com> Date: Thu, 16 Jun 2016 13:42:01 +0300 Subject: [PATCH] update cArea getValue method --- cell/model/FormulaObjects/parserFormula.js | 27 +------------------ .../FormulaObjects/statisticalFunctions.js | 6 ----- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/cell/model/FormulaObjects/parserFormula.js b/cell/model/FormulaObjects/parserFormula.js index 55af354c4..df12649fd 100644 --- a/cell/model/FormulaObjects/parserFormula.js +++ b/cell/model/FormulaObjects/parserFormula.js @@ -595,32 +595,7 @@ cArea.prototype.getValue = function () { val.push( new cError( cErrorType.bad_reference ) ); } else { r._foreachNoEmpty( function ( cell ) { - var cellType = cell.getType(); - switch ( cellType ) { - case CellValueType.Number: - cell.getValueWithoutFormat() === "" ? val.push(new cEmpty()) : - val.push(new cNumber(cell.getValueWithoutFormat())); - break; - - case CellValueType.Bool: - val.push( new cBool( cell.getValueWithoutFormat() ) ); - break; - - case CellValueType.Error: - val.push( new cError( cell.getValueWithoutFormat() ) ); - break; - - case CellValueType.String: - val.push( new cString( cell.getValueWithoutFormat() ) ); - break; - - default: - if ( cell.getValueWithoutFormat() && cell.getValueWithoutFormat() !== "" ) { - val.push( new cNumber( cell.getValueWithoutFormat() ) ); - } else { - val.push( checkTypeCell( "" + cell.getValueWithoutFormat() ) ); - } - } + val.push(checkTypeCell2(cell)); } ); } return val; diff --git a/cell/model/FormulaObjects/statisticalFunctions.js b/cell/model/FormulaObjects/statisticalFunctions.js index b5a695c8e..8d58fe0ea 100644 --- a/cell/model/FormulaObjects/statisticalFunctions.js +++ b/cell/model/FormulaObjects/statisticalFunctions.js @@ -959,11 +959,6 @@ cCORREL.prototype.getInfo = function () { }; function cCOUNT() { -// cBaseFunction.call( this, "COUNT" ); -// this.setArgumentsMin( 1 ); -// this.setArgumentsMax( 255 ); -// this.setFormat( this.formatType.noneFormat ); - this.name = "COUNT"; this.type = cElementType.func; this.value = null; @@ -975,7 +970,6 @@ function cCOUNT() { noneFormat:-2 }; this.numFormat = this.formatType.noneFormat; - } cCOUNT.prototype = Object.create( cBaseFunction.prototype ); -- 2.30.9