Commit b2b8cad1 authored by GoshaZotov's avatar GoshaZotov

move name function into prototype

formatted functions
parent f5868984
...@@ -66,118 +66,138 @@ ...@@ -66,118 +66,138 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cDBCS() { function cDBCS() {
cBaseFunction.call(this, "DBCS"); this.value = null;
this.isXLFN = true; this.argumentsCurrent = 0;
} }
cDBCS.prototype = Object.create(cBaseFunction.prototype); cDBCS.prototype = Object.create(cBaseFunction.prototype);
cDBCS.prototype.constructor = cDBCS; cDBCS.prototype.constructor = cDBCS;
cDBCS.prototype.name = "DBCS";
cDBCS.prototype.isXLFN = true;
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cFILTERXML() { function cFILTERXML() {
cBaseFunction.call(this, "FILTERXML"); this.value = null;
this.isXLFN = true; this.argumentsCurrent = 0;
} }
cFILTERXML.prototype = Object.create(cBaseFunction.prototype); cFILTERXML.prototype = Object.create(cBaseFunction.prototype);
cFILTERXML.prototype.constructor = cFILTERXML; cFILTERXML.prototype.constructor = cFILTERXML;
cFILTERXML.prototype.name = "FILTERXML";
cFILTERXML.prototype.isXLFN = true;
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cFORECAST_ETS() { function cFORECAST_ETS() {
cBaseFunction.call(this, "FORECAST.ETS"); this.value = null;
this.isXLFN = true; this.argumentsCurrent = 0;
} }
cFORECAST_ETS.prototype = Object.create(cBaseFunction.prototype); cFORECAST_ETS.prototype = Object.create(cBaseFunction.prototype);
cFORECAST_ETS.prototype.constructor = cFORECAST_ETS; cFORECAST_ETS.prototype.constructor = cFORECAST_ETS;
cFORECAST_ETS.prototype.name = "FORECAST.ETS";
cFORECAST_ETS.prototype.isXLFN = true;
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cFORECAST_ETS_CONFINT() { function cFORECAST_ETS_CONFINT() {
cBaseFunction.call(this, "FORECAST.ETS.CONFINT"); this.value = null;
this.isXLFN = true; this.argumentsCurrent = 0;
} }
cFORECAST_ETS_CONFINT.prototype = Object.create(cBaseFunction.prototype); cFORECAST_ETS_CONFINT.prototype = Object.create(cBaseFunction.prototype);
cFORECAST_ETS_CONFINT.prototype.constructor = cFORECAST_ETS_CONFINT; cFORECAST_ETS_CONFINT.prototype.constructor = cFORECAST_ETS_CONFINT;
cFORECAST_ETS_CONFINT.prototype.name = "FORECAST.ETS.CONFINT";
cFORECAST_ETS_CONFINT.prototype.isXLFN = true;
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cFORECAST_ETS_SEASONALITY() { function cFORECAST_ETS_SEASONALITY() {
cBaseFunction.call(this, "FORECAST.ETS.SEASONALITY"); this.value = null;
this.isXLFN = true; this.argumentsCurrent = 0;
} }
cFORECAST_ETS_SEASONALITY.prototype = Object.create(cBaseFunction.prototype); cFORECAST_ETS_SEASONALITY.prototype = Object.create(cBaseFunction.prototype);
cFORECAST_ETS_SEASONALITY.prototype.constructor = cFORECAST_ETS_SEASONALITY; cFORECAST_ETS_SEASONALITY.prototype.constructor = cFORECAST_ETS_SEASONALITY;
cFORECAST_ETS_SEASONALITY.prototype.name = "FORECAST.ETS.SEASONALITY";
cFORECAST_ETS_SEASONALITY.prototype.isXLFN = true;
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cFORECAST_ETS_STAT() { function cFORECAST_ETS_STAT() {
cBaseFunction.call(this, "FORECAST.ETS.STAT"); this.value = null;
this.isXLFN = true; this.argumentsCurrent = 0;
} }
cFORECAST_ETS_STAT.prototype = Object.create(cBaseFunction.prototype); cFORECAST_ETS_STAT.prototype = Object.create(cBaseFunction.prototype);
cFORECAST_ETS_STAT.prototype.constructor = cFORECAST_ETS_STAT; cFORECAST_ETS_STAT.prototype.constructor = cFORECAST_ETS_STAT;
cFORECAST_ETS_STAT.prototype.name = "FORECAST.ETS.STAT";
cFORECAST_ETS_STAT.prototype.isXLFN = true;
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cHYPGEOM_DIST() { function cHYPGEOM_DIST() {
cBaseFunction.call(this, "HYPGEOM.DIST"); this.value = null;
this.isXLFN = true; this.argumentsCurrent = 0;
} }
cHYPGEOM_DIST.prototype = Object.create(cBaseFunction.prototype); cHYPGEOM_DIST.prototype = Object.create(cBaseFunction.prototype);
cHYPGEOM_DIST.prototype.constructor = cHYPGEOM_DIST; cHYPGEOM_DIST.prototype.constructor = cHYPGEOM_DIST;
cHYPGEOM_DIST.prototype.name = "HYPGEOM.DIST";
cHYPGEOM_DIST.prototype.isXLFN = true;
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cMUNIT() { function cMUNIT() {
cBaseFunction.call(this, "MUNIT"); this.value = null;
this.isXLFN = true; this.argumentsCurrent = 0;
} }
cMUNIT.prototype = Object.create(cBaseFunction.prototype); cMUNIT.prototype = Object.create(cBaseFunction.prototype);
cMUNIT.prototype.constructor = cMUNIT; cMUNIT.prototype.constructor = cMUNIT;
cMUNIT.prototype.name = "MUNIT";
cMUNIT.prototype.isXLFN = true;
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cQUERYSTRING() { function cQUERYSTRING() {
cBaseFunction.call(this, "QUERYSTRING"); this.value = null;
this.isXLFN = true; this.argumentsCurrent = 0;
} }
cQUERYSTRING.prototype = Object.create(cBaseFunction.prototype); cQUERYSTRING.prototype = Object.create(cBaseFunction.prototype);
cQUERYSTRING.prototype.constructor = cQUERYSTRING; cQUERYSTRING.prototype.constructor = cQUERYSTRING;
cQUERYSTRING.prototype.name = "QUERYSTRING";
cQUERYSTRING.prototype.isXLFN = true;
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cWEBSERVICE() { function cWEBSERVICE() {
cBaseFunction.call(this, "WEBSERVICE"); this.value = null;
this.isXLFN = true; this.argumentsCurrent = 0;
} }
cWEBSERVICE.prototype = Object.create(cBaseFunction.prototype); cWEBSERVICE.prototype = Object.create(cBaseFunction.prototype);
cWEBSERVICE.prototype.constructor = cWEBSERVICE; cWEBSERVICE.prototype.constructor = cWEBSERVICE;
cWEBSERVICE.prototype.name = "WEBSERVICE";
cWEBSERVICE.prototype.isXLFN = true;
})(window); })(window);
...@@ -53,89 +53,89 @@ ...@@ -53,89 +53,89 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cCUBEKPIMEMBER() { function cCUBEKPIMEMBER() {
this.name = "CUBEKPIMEMBER";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cCUBEKPIMEMBER.prototype = Object.create(cBaseFunction.prototype); cCUBEKPIMEMBER.prototype = Object.create(cBaseFunction.prototype);
cCUBEKPIMEMBER.prototype.constructor = cCUBEKPIMEMBER; cCUBEKPIMEMBER.prototype.constructor = cCUBEKPIMEMBER;
cCUBEKPIMEMBER.prototype.name = 'CUBEKPIMEMBER';
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cCUBEMEMBER() { function cCUBEMEMBER() {
this.name = "CUBEMEMBER";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cCUBEMEMBER.prototype = Object.create(cBaseFunction.prototype); cCUBEMEMBER.prototype = Object.create(cBaseFunction.prototype);
cCUBEMEMBER.prototype.constructor = cCUBEMEMBER; cCUBEMEMBER.prototype.constructor = cCUBEMEMBER;
cCUBEMEMBER.prototype.name = 'CUBEMEMBER';
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cCUBEMEMBERPROPERTY() { function cCUBEMEMBERPROPERTY() {
this.name = "CUBEMEMBERPROPERTY";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cCUBEMEMBERPROPERTY.prototype = Object.create(cBaseFunction.prototype); cCUBEMEMBERPROPERTY.prototype = Object.create(cBaseFunction.prototype);
cCUBEMEMBERPROPERTY.prototype.constructor = cCUBEMEMBERPROPERTY; cCUBEMEMBERPROPERTY.prototype.constructor = cCUBEMEMBERPROPERTY;
cCUBEMEMBERPROPERTY.prototype.name = 'CUBEMEMBERPROPERTY';
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cCUBERANKEDMEMBER() { function cCUBERANKEDMEMBER() {
this.name = "CUBERANKEDMEMBER";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cCUBERANKEDMEMBER.prototype = Object.create(cBaseFunction.prototype); cCUBERANKEDMEMBER.prototype = Object.create(cBaseFunction.prototype);
cCUBERANKEDMEMBER.prototype.constructor = cCUBERANKEDMEMBER; cCUBERANKEDMEMBER.prototype.constructor = cCUBERANKEDMEMBER;
cCUBERANKEDMEMBER.prototype.name = 'CUBERANKEDMEMBER';
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cCUBESET() { function cCUBESET() {
this.name = "CUBESET";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cCUBESET.prototype = Object.create(cBaseFunction.prototype); cCUBESET.prototype = Object.create(cBaseFunction.prototype);
cCUBESET.prototype.constructor = cCUBESET; cCUBESET.prototype.constructor = cCUBESET;
cCUBESET.prototype.name = 'CUBESET';
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cCUBESETCOUNT() { function cCUBESETCOUNT() {
this.name = "CUBESETCOUNT";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cCUBESETCOUNT.prototype = Object.create(cBaseFunction.prototype); cCUBESETCOUNT.prototype = Object.create(cBaseFunction.prototype);
cCUBESETCOUNT.prototype.constructor = cCUBESETCOUNT; cCUBESETCOUNT.prototype.constructor = cCUBESETCOUNT;
cCUBESETCOUNT.prototype.name = 'CUBESETCOUNT';
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cCUBEVALUE() { function cCUBEVALUE() {
this.name = "CUBEVALUE";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cCUBEVALUE.prototype = Object.create(cBaseFunction.prototype); cCUBEVALUE.prototype = Object.create(cBaseFunction.prototype);
cCUBEVALUE.prototype.constructor = cCUBEVALUE; cCUBEVALUE.prototype.constructor = cCUBEVALUE;
cCUBEVALUE.prototype.name = 'CUBEVALUE';
})(window); })(window);
...@@ -207,11 +207,13 @@ ...@@ -207,11 +207,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cDAVERAGE() { function cDAVERAGE() {
cBaseFunction.call(this, "DAVERAGE"); this.value = null;
this.argumentsCurrent = 0;
} }
cDAVERAGE.prototype = Object.create(cBaseFunction.prototype); cDAVERAGE.prototype = Object.create(cBaseFunction.prototype);
cDAVERAGE.prototype.constructor = cDAVERAGE; cDAVERAGE.prototype.constructor = cDAVERAGE;
cDAVERAGE.prototype.name = "DAVERAGE";
cDAVERAGE.prototype.argumentsMin = 3; cDAVERAGE.prototype.argumentsMin = 3;
cDAVERAGE.prototype.argumentsMax = 3; cDAVERAGE.prototype.argumentsMax = 3;
cDAVERAGE.prototype.Calculate = function (arg) { cDAVERAGE.prototype.Calculate = function (arg) {
...@@ -259,11 +261,13 @@ ...@@ -259,11 +261,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cDCOUNT() { function cDCOUNT() {
cBaseFunction.call(this, "DCOUNT"); this.value = null;
this.argumentsCurrent = 0;
} }
cDCOUNT.prototype = Object.create(cBaseFunction.prototype); cDCOUNT.prototype = Object.create(cBaseFunction.prototype);
cDCOUNT.prototype.constructor = cDCOUNT; cDCOUNT.prototype.constructor = cDCOUNT;
cDCOUNT.prototype.name = "DCOUNT";
cDCOUNT.prototype.argumentsMin = 3; cDCOUNT.prototype.argumentsMin = 3;
cDCOUNT.prototype.argumentsMax = 3; cDCOUNT.prototype.argumentsMax = 3;
cDCOUNT.prototype.Calculate = function (arg) { cDCOUNT.prototype.Calculate = function (arg) {
...@@ -300,11 +304,13 @@ ...@@ -300,11 +304,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cDCOUNTA() { function cDCOUNTA() {
cBaseFunction.call(this, "DCOUNTA"); this.value = null;
this.argumentsCurrent = 0;
} }
cDCOUNTA.prototype = Object.create(cBaseFunction.prototype); cDCOUNTA.prototype = Object.create(cBaseFunction.prototype);
cDCOUNTA.prototype.constructor = cDCOUNTA; cDCOUNTA.prototype.constructor = cDCOUNTA;
cDCOUNTA.prototype.name = "DCOUNTA";
cDCOUNTA.prototype.argumentsMin = 3; cDCOUNTA.prototype.argumentsMin = 3;
cDCOUNTA.prototype.argumentsMax = 3; cDCOUNTA.prototype.argumentsMax = 3;
cDCOUNTA.prototype.Calculate = function (arg) { cDCOUNTA.prototype.Calculate = function (arg) {
...@@ -339,11 +345,13 @@ ...@@ -339,11 +345,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cDGET() { function cDGET() {
cBaseFunction.call(this, "DGET"); this.value = null;
this.argumentsCurrent = 0;
} }
cDGET.prototype = Object.create(cBaseFunction.prototype); cDGET.prototype = Object.create(cBaseFunction.prototype);
cDGET.prototype.constructor = cDGET; cDGET.prototype.constructor = cDGET;
cDGET.prototype.name = "DGET";
cDGET.prototype.argumentsMin = 3; cDGET.prototype.argumentsMin = 3;
cDGET.prototype.argumentsMax = 3; cDGET.prototype.argumentsMax = 3;
cDGET.prototype.Calculate = function (arg) { cDGET.prototype.Calculate = function (arg) {
...@@ -379,11 +387,13 @@ ...@@ -379,11 +387,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cDMAX() { function cDMAX() {
cBaseFunction.call(this, "DMAX"); this.value = null;
this.argumentsCurrent = 0;
} }
cDMAX.prototype = Object.create(cBaseFunction.prototype); cDMAX.prototype = Object.create(cBaseFunction.prototype);
cDMAX.prototype.constructor = cDMAX; cDMAX.prototype.constructor = cDMAX;
cDMAX.prototype.name = "DMAX";
cDMAX.prototype.argumentsMin = 3; cDMAX.prototype.argumentsMin = 3;
cDMAX.prototype.argumentsMax = 3; cDMAX.prototype.argumentsMax = 3;
cDMAX.prototype.Calculate = function (arg) { cDMAX.prototype.Calculate = function (arg) {
...@@ -420,11 +430,13 @@ ...@@ -420,11 +430,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cDMIN() { function cDMIN() {
cBaseFunction.call(this, "DMIN"); this.value = null;
this.argumentsCurrent = 0;
} }
cDMIN.prototype = Object.create(cBaseFunction.prototype); cDMIN.prototype = Object.create(cBaseFunction.prototype);
cDMIN.prototype.constructor = cDMIN; cDMIN.prototype.constructor = cDMIN;
cDMIN.prototype.name = "DMIN";
cDMIN.prototype.argumentsMin = 3; cDMIN.prototype.argumentsMin = 3;
cDMIN.prototype.argumentsMax = 3; cDMIN.prototype.argumentsMax = 3;
cDMIN.prototype.Calculate = function (arg) { cDMIN.prototype.Calculate = function (arg) {
...@@ -462,11 +474,13 @@ ...@@ -462,11 +474,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cDPRODUCT() { function cDPRODUCT() {
cBaseFunction.call(this, "DPRODUCT"); this.value = null;
this.argumentsCurrent = 0;
} }
cDPRODUCT.prototype = Object.create(cBaseFunction.prototype); cDPRODUCT.prototype = Object.create(cBaseFunction.prototype);
cDPRODUCT.prototype.constructor = cDPRODUCT; cDPRODUCT.prototype.constructor = cDPRODUCT;
cDPRODUCT.prototype.name = "DPRODUCT";
cDPRODUCT.prototype.argumentsMin = 3; cDPRODUCT.prototype.argumentsMin = 3;
cDPRODUCT.prototype.argumentsMax = 3; cDPRODUCT.prototype.argumentsMax = 3;
cDPRODUCT.prototype.Calculate = function (arg) { cDPRODUCT.prototype.Calculate = function (arg) {
...@@ -511,11 +525,13 @@ ...@@ -511,11 +525,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cDSTDEV() { function cDSTDEV() {
cBaseFunction.call(this, "DSTDEV"); this.value = null;
this.argumentsCurrent = 0;
} }
cDSTDEV.prototype = Object.create(cBaseFunction.prototype); cDSTDEV.prototype = Object.create(cBaseFunction.prototype);
cDSTDEV.prototype.constructor = cDSTDEV; cDSTDEV.prototype.constructor = cDSTDEV;
cDSTDEV.prototype.name = "DSTDEV";
cDSTDEV.prototype.argumentsMin = 3; cDSTDEV.prototype.argumentsMin = 3;
cDSTDEV.prototype.argumentsMax = 3; cDSTDEV.prototype.argumentsMax = 3;
cDSTDEV.prototype.Calculate = function (arg) { cDSTDEV.prototype.Calculate = function (arg) {
...@@ -568,11 +584,13 @@ ...@@ -568,11 +584,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cDSTDEVP() { function cDSTDEVP() {
cBaseFunction.call(this, "DSTDEVP"); this.value = null;
this.argumentsCurrent = 0;
} }
cDSTDEVP.prototype = Object.create(cBaseFunction.prototype); cDSTDEVP.prototype = Object.create(cBaseFunction.prototype);
cDSTDEVP.prototype.constructor = cDSTDEVP; cDSTDEVP.prototype.constructor = cDSTDEVP;
cDSTDEVP.prototype.name = "DSTDEVP";
cDSTDEVP.prototype.argumentsMin = 3; cDSTDEVP.prototype.argumentsMin = 3;
cDSTDEVP.prototype.argumentsMax = 3; cDSTDEVP.prototype.argumentsMax = 3;
cDSTDEVP.prototype.Calculate = function (arg) { cDSTDEVP.prototype.Calculate = function (arg) {
...@@ -626,11 +644,13 @@ ...@@ -626,11 +644,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cDSUM() { function cDSUM() {
cBaseFunction.call(this, "DSUM"); this.value = null;
this.argumentsCurrent = 0;
} }
cDSUM.prototype = Object.create(cBaseFunction.prototype); cDSUM.prototype = Object.create(cBaseFunction.prototype);
cDSUM.prototype.constructor = cDSUM; cDSUM.prototype.constructor = cDSUM;
cDSUM.prototype.name = "DSUM";
cDSUM.prototype.argumentsMin = 3; cDSUM.prototype.argumentsMin = 3;
cDSUM.prototype.argumentsMax = 3; cDSUM.prototype.argumentsMax = 3;
cDSUM.prototype.Calculate = function (arg) { cDSUM.prototype.Calculate = function (arg) {
...@@ -671,11 +691,13 @@ ...@@ -671,11 +691,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cDVAR() { function cDVAR() {
cBaseFunction.call(this, "DVAR"); this.value = null;
this.argumentsCurrent = 0;
} }
cDVAR.prototype = Object.create(cBaseFunction.prototype); cDVAR.prototype = Object.create(cBaseFunction.prototype);
cDVAR.prototype.constructor = cDVAR; cDVAR.prototype.constructor = cDVAR;
cDVAR.prototype.name = "DVAR";
cDVAR.prototype.argumentsMin = 3; cDVAR.prototype.argumentsMin = 3;
cDVAR.prototype.argumentsMax = 3; cDVAR.prototype.argumentsMax = 3;
cDVAR.prototype.Calculate = function (arg) { cDVAR.prototype.Calculate = function (arg) {
...@@ -735,11 +757,13 @@ ...@@ -735,11 +757,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cDVARP() { function cDVARP() {
cBaseFunction.call(this, "DVARP"); this.value = null;
this.argumentsCurrent = 0;
} }
cDVARP.prototype = Object.create(cBaseFunction.prototype); cDVARP.prototype = Object.create(cBaseFunction.prototype);
cDVARP.prototype.constructor = cDVARP; cDVARP.prototype.constructor = cDVARP;
cDVARP.prototype.name = "DVARP";
cDVARP.prototype.argumentsMin = 3; cDVARP.prototype.argumentsMin = 3;
cDVARP.prototype.argumentsMax = 3; cDVARP.prototype.argumentsMax = 3;
cDVARP.prototype.Calculate = function (arg) { cDVARP.prototype.Calculate = function (arg) {
......
...@@ -58,13 +58,13 @@ ...@@ -58,13 +58,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cAND() { function cAND() {
this.name = "AND";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cAND.prototype = Object.create(cBaseFunction.prototype); cAND.prototype = Object.create(cBaseFunction.prototype);
cAND.prototype.constructor = cAND; cAND.prototype.constructor = cAND;
cAND.prototype.name = 'AND';
cAND.prototype.argumentsMin = 1; cAND.prototype.argumentsMin = 1;
cAND.prototype.Calculate = function (arg) { cAND.prototype.Calculate = function (arg) {
var argResult = null; var argResult = null;
...@@ -131,13 +131,13 @@ ...@@ -131,13 +131,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cFALSE() { function cFALSE() {
this.name = "FALSE";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cFALSE.prototype = Object.create(cBaseFunction.prototype); cFALSE.prototype = Object.create(cBaseFunction.prototype);
cFALSE.prototype.constructor = cFALSE; cFALSE.prototype.constructor = cFALSE;
cFALSE.prototype.name = 'FALSE';
cFALSE.prototype.argumentsMax = 0; cFALSE.prototype.argumentsMax = 0;
cFALSE.prototype.Calculate = function () { cFALSE.prototype.Calculate = function () {
return this.value = new cBool(false); return this.value = new cBool(false);
...@@ -148,13 +148,13 @@ ...@@ -148,13 +148,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cIF() { function cIF() {
this.name = "IF";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cIF.prototype = Object.create(cBaseFunction.prototype); cIF.prototype = Object.create(cBaseFunction.prototype);
cIF.prototype.constructor = cIF; cIF.prototype.constructor = cIF;
cIF.prototype.name = 'IF';
cIF.prototype.argumentsMin = 1; cIF.prototype.argumentsMin = 1;
cIF.prototype.argumentsMax = 3; cIF.prototype.argumentsMax = 3;
cIF.prototype.numFormat = AscCommonExcel.cNumFormatNone; cIF.prototype.numFormat = AscCommonExcel.cNumFormatNone;
...@@ -188,13 +188,13 @@ ...@@ -188,13 +188,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cIFERROR() { function cIFERROR() {
this.name = "IFERROR";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cIFERROR.prototype = Object.create(cBaseFunction.prototype); cIFERROR.prototype = Object.create(cBaseFunction.prototype);
cIFERROR.prototype.constructor = cIFERROR; cIFERROR.prototype.constructor = cIFERROR;
cIFERROR.prototype.name = 'IFERROR';
cIFERROR.prototype.argumentsMin = 2; cIFERROR.prototype.argumentsMin = 2;
cIFERROR.prototype.argumentsMax = 2; cIFERROR.prototype.argumentsMax = 2;
cIFERROR.prototype.Calculate = function (arg) { cIFERROR.prototype.Calculate = function (arg) {
...@@ -221,13 +221,13 @@ ...@@ -221,13 +221,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cIFNA() { function cIFNA() {
this.name = "IFNA";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cIFNA.prototype = Object.create(cBaseFunction.prototype); cIFNA.prototype = Object.create(cBaseFunction.prototype);
cIFNA.prototype.constructor = cIFNA; cIFNA.prototype.constructor = cIFNA;
cIFNA.prototype.name = 'IFNA';
cIFNA.prototype.argumentsMin = 2; cIFNA.prototype.argumentsMin = 2;
cIFNA.prototype.argumentsMax = 2; cIFNA.prototype.argumentsMax = 2;
cIFNA.prototype.isXLFN = true; cIFNA.prototype.isXLFN = true;
...@@ -255,13 +255,13 @@ ...@@ -255,13 +255,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cIFS() { function cIFS() {
this.name = "IFS";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cIFS.prototype = Object.create(cBaseFunction.prototype); cIFS.prototype = Object.create(cBaseFunction.prototype);
cIFS.prototype.constructor = cIFS; cIFS.prototype.constructor = cIFS;
cIFS.prototype.name = 'IFS';
cIFS.prototype.argumentsMin = 2; cIFS.prototype.argumentsMin = 2;
cIFS.prototype.Calculate = function (arg) { cIFS.prototype.Calculate = function (arg) {
var oArguments = this._prepareArguments(arg, arguments[1], true); var oArguments = this._prepareArguments(arg, arguments[1], true);
...@@ -273,31 +273,31 @@ ...@@ -273,31 +273,31 @@
} }
var res = null; var res = null;
for(var i = 0; i < this.argumentsCurrent; i++){ for (var i = 0; i < this.argumentsCurrent; i++) {
var argN = argClone[i]; var argN = argClone[i];
if(cElementType.string === argN.type){ if (cElementType.string === argN.type) {
res = new cError(cErrorType.wrong_value_type); res = new cError(cErrorType.wrong_value_type);
break; break;
} else if(cElementType.number === argN.type || cElementType.bool === argN.type){ } else if (cElementType.number === argN.type || cElementType.bool === argN.type) {
if(!argClone[i + 1]){ if (!argClone[i + 1]) {
res = new cError(cErrorType.not_available); res = new cError(cErrorType.not_available);
break; break;
} }
argN = argN.tocBool(); argN = argN.tocBool();
if(true === argN.value){ if (true === argN.value) {
res = argClone[i + 1]; res = argClone[i + 1];
break; break;
} }
} }
if(i === this.argumentsCurrent - 1){ if (i === this.argumentsCurrent - 1) {
res = new cError(cErrorType.not_available); res = new cError(cErrorType.not_available);
break; break;
} }
i++; i++;
} }
if(null === res){ if (null === res) {
return this.value = new cError(cErrorType.not_available); return this.value = new cError(cErrorType.not_available);
} }
...@@ -309,13 +309,13 @@ ...@@ -309,13 +309,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cNOT() { function cNOT() {
this.name = "NOT";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cNOT.prototype = Object.create(cBaseFunction.prototype); cNOT.prototype = Object.create(cBaseFunction.prototype);
cNOT.prototype.constructor = cNOT; cNOT.prototype.constructor = cNOT;
cNOT.prototype.name = 'NOT';
cNOT.prototype.argumentsMin = 1; cNOT.prototype.argumentsMin = 1;
cNOT.prototype.argumentsMax = 1; cNOT.prototype.argumentsMax = 1;
cNOT.prototype.Calculate = function (arg) { cNOT.prototype.Calculate = function (arg) {
...@@ -347,13 +347,13 @@ ...@@ -347,13 +347,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cOR() { function cOR() {
this.name = "OR";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cOR.prototype = Object.create(cBaseFunction.prototype); cOR.prototype = Object.create(cBaseFunction.prototype);
cOR.prototype.constructor = cOR; cOR.prototype.constructor = cOR;
cOR.prototype.name = 'OR';
cOR.prototype.argumentsMin = 1; cOR.prototype.argumentsMin = 1;
cOR.prototype.Calculate = function (arg) { cOR.prototype.Calculate = function (arg) {
var argResult = null; var argResult = null;
...@@ -417,13 +417,13 @@ ...@@ -417,13 +417,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cSWITCH() { function cSWITCH() {
this.name = "SWITCH";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cSWITCH.prototype = Object.create(cBaseFunction.prototype); cSWITCH.prototype = Object.create(cBaseFunction.prototype);
cSWITCH.prototype.constructor = cSWITCH; cSWITCH.prototype.constructor = cSWITCH;
cSWITCH.prototype.name = 'SWITCH';
cSWITCH.prototype.argumentsMin = 3; cSWITCH.prototype.argumentsMin = 3;
cSWITCH.prototype.argumentsMax = 126; cSWITCH.prototype.argumentsMax = 126;
cSWITCH.prototype.isXLFN = true; cSWITCH.prototype.isXLFN = true;
...@@ -437,28 +437,28 @@ ...@@ -437,28 +437,28 @@
} }
var arg0 = argClone[0].getValue(); var arg0 = argClone[0].getValue();
if(cElementType.cell === argClone[0].type || cElementType.cell3D === argClone[0].type){ if (cElementType.cell === argClone[0].type || cElementType.cell3D === argClone[0].type) {
arg0 = arg0.getValue() arg0 = arg0.getValue()
} }
var res = null; var res = null;
for(var i = 1; i < this.argumentsCurrent; i++){ for (var i = 1; i < this.argumentsCurrent; i++) {
var argN = argClone[i].getValue(); var argN = argClone[i].getValue();
if(arg0 === argN){ if (arg0 === argN) {
if(!argClone[i + 1]){ if (!argClone[i + 1]) {
return this.value = cErrorType.not_available; return this.value = cErrorType.not_available;
}else{ } else {
res = argClone[i + 1]; res = argClone[i + 1];
break; break;
} }
} }
if(i === this.argumentsCurrent - 1){ if (i === this.argumentsCurrent - 1) {
res = argClone[i]; res = argClone[i];
} }
i++; i++;
} }
if(null === res){ if (null === res) {
return this.value = new cError(cErrorType.not_available); return this.value = new cError(cErrorType.not_available);
} }
...@@ -470,13 +470,13 @@ ...@@ -470,13 +470,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cTRUE() { function cTRUE() {
this.name = "TRUE";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cTRUE.prototype = Object.create(cBaseFunction.prototype); cTRUE.prototype = Object.create(cBaseFunction.prototype);
cTRUE.prototype.constructor = cTRUE; cTRUE.prototype.constructor = cTRUE;
cTRUE.prototype.name = 'TRUE';
cTRUE.prototype.argumentsMax = 0; cTRUE.prototype.argumentsMax = 0;
cTRUE.prototype.Calculate = function () { cTRUE.prototype.Calculate = function () {
return this.value = new cBool(true); return this.value = new cBool(true);
...@@ -487,13 +487,13 @@ ...@@ -487,13 +487,13 @@
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
*/ */
function cXOR() { function cXOR() {
this.name = "XOR";
this.value = null; this.value = null;
this.argumentsCurrent = 0; this.argumentsCurrent = 0;
} }
cXOR.prototype = Object.create(cBaseFunction.prototype); cXOR.prototype = Object.create(cBaseFunction.prototype);
cXOR.prototype.constructor = cXOR; cXOR.prototype.constructor = cXOR;
cXOR.prototype.name = 'XOR';
cXOR.prototype.argumentsMin = 1; cXOR.prototype.argumentsMin = 1;
cXOR.prototype.argumentsMax = 254; cXOR.prototype.argumentsMax = 254;
cXOR.prototype.isXLFN = true; cXOR.prototype.isXLFN = true;
...@@ -556,10 +556,10 @@ ...@@ -556,10 +556,10 @@
} }
if (argResult == null) { if (argResult == null) {
return this.value = new cError(cErrorType.wrong_value_type); return this.value = new cError(cErrorType.wrong_value_type);
}else{ } else {
if(nTrueValues % 2){ if (nTrueValues % 2) {
argResult = new cBool(true); argResult = new cBool(true);
}else{ } else {
argResult = new cBool(false); argResult = new cBool(false);
} }
} }
......
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