Commit d9b75ebd authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov Committed by Alexander.Trofimov

переделана инициализация функций

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54726 954022d7-b5bf-4e40-9824-e11837661b57
parent 3c7f1dc8
...@@ -19,36 +19,127 @@ cFormulaFunction.Cube = { ...@@ -19,36 +19,127 @@ cFormulaFunction.Cube = {
} }
function cCUBEKPIMEMBER() { function cCUBEKPIMEMBER() {
cBaseFunction.call( this, "CUBEKPIMEMBER" ); // cBaseFunction.call( this, "CUBEKPIMEMBER" );
this.name = "CUBEKPIMEMBER";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 0;
this.argumentsCurrent = 0;
this.argumentsMax = 255;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cCUBEKPIMEMBER.prototype = Object.create( cBaseFunction.prototype ) cCUBEKPIMEMBER.prototype = Object.create( cBaseFunction.prototype )
function cCUBEMEMBER() { function cCUBEMEMBER() {
cBaseFunction.call( this, "CUBEMEMBER" ); // cBaseFunction.call( this, "CUBEMEMBER" );
this.name = "CUBEMEMBER";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 0;
this.argumentsCurrent = 0;
this.argumentsMax = 255;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cCUBEMEMBER.prototype = Object.create( cBaseFunction.prototype ) cCUBEMEMBER.prototype = Object.create( cBaseFunction.prototype )
function cCUBEMEMBERPROPERTY() { function cCUBEMEMBERPROPERTY() {
cBaseFunction.call( this, "CUBEMEMBERPROPERTY" ); // cBaseFunction.call( this, "CUBEMEMBERPROPERTY" );
this.name = "CUBEMEMBERPROPERTY";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 0;
this.argumentsCurrent = 0;
this.argumentsMax = 255;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cCUBEMEMBERPROPERTY.prototype = Object.create( cBaseFunction.prototype ) cCUBEMEMBERPROPERTY.prototype = Object.create( cBaseFunction.prototype )
function cCUBERANKEDMEMBER() { function cCUBERANKEDMEMBER() {
cBaseFunction.call( this, "CUBERANKEDMEMBER" ); // cBaseFunction.call( this, "CUBERANKEDMEMBER" );
this.name = "CUBERANKEDMEMBER";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 0;
this.argumentsCurrent = 0;
this.argumentsMax = 255;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cCUBERANKEDMEMBER.prototype = Object.create( cBaseFunction.prototype ) cCUBERANKEDMEMBER.prototype = Object.create( cBaseFunction.prototype )
function cCUBESET() { function cCUBESET() {
cBaseFunction.call( this, "CUBESET" ); // cBaseFunction.call( this, "CUBESET" );
this.name = "CUBESET";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 0;
this.argumentsCurrent = 0;
this.argumentsMax = 255;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cCUBESET.prototype = Object.create( cBaseFunction.prototype ) cCUBESET.prototype = Object.create( cBaseFunction.prototype )
function cCUBESETCOUNT() { function cCUBESETCOUNT() {
cBaseFunction.call( this, "CUBESETCOUNT" ); // cBaseFunction.call( this, "CUBESETCOUNT" );
this.name = "CUBESETCOUNT";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 0;
this.argumentsCurrent = 0;
this.argumentsMax = 255;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cCUBESETCOUNT.prototype = Object.create( cBaseFunction.prototype ) cCUBESETCOUNT.prototype = Object.create( cBaseFunction.prototype )
function cCUBEVALUE() { function cCUBEVALUE() {
cBaseFunction.call( this, "CUBEVALUE" ); // cBaseFunction.call( this, "CUBEVALUE" );
this.name = "CUBEVALUE";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 0;
this.argumentsCurrent = 0;
this.argumentsMax = 255;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cCUBEVALUE.prototype = Object.create( cBaseFunction.prototype ) cCUBEVALUE.prototype = Object.create( cBaseFunction.prototype )
...@@ -160,10 +160,23 @@ function cEFFECT() { ...@@ -160,10 +160,23 @@ function cEFFECT() {
cEFFECT.prototype = Object.create( cBaseFunction.prototype ) cEFFECT.prototype = Object.create( cBaseFunction.prototype )
function cFV() { function cFV() {
cBaseFunction.call( this, "FV" ); // cBaseFunction.call( this, "FV" );
this.setArgumentsMin( 3 ); // this.setArgumentsMin( 3 );
this.setArgumentsMax( 5 ); // this.setArgumentsMax( 5 );
this.setFormat( this.formatType.noneFormat ); // this.setFormat( this.formatType.noneFormat );
this.name = "FV";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 3;
this.argumentsCurrent = 0;
this.argumentsMax = 5;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.noneFormat;
} }
cFV.prototype = Object.create( cBaseFunction.prototype ) cFV.prototype = Object.create( cBaseFunction.prototype )
cFV.prototype.Calculate = function ( arg ) { cFV.prototype.Calculate = function ( arg ) {
...@@ -276,10 +289,23 @@ function cNOMINAL() { ...@@ -276,10 +289,23 @@ function cNOMINAL() {
cNOMINAL.prototype = Object.create( cBaseFunction.prototype ) cNOMINAL.prototype = Object.create( cBaseFunction.prototype )
function cNPER() { function cNPER() {
cBaseFunction.call( this, "NPER" ); // cBaseFunction.call( this, "NPER" );
this.setArgumentsMin( 3 ); // this.setArgumentsMin( 3 );
this.setArgumentsMax( 5 ); // this.setArgumentsMax( 5 );
this.setFormat( this.formatType.noneFormat ); // this.setFormat( this.formatType.noneFormat );
this.name = "NPER";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 3;
this.argumentsCurrent = 0;
this.argumentsMax = 5;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.noneFormat;
} }
cNPER.prototype = Object.create( cBaseFunction.prototype ) cNPER.prototype = Object.create( cBaseFunction.prototype )
cNPER.prototype.Calculate = function ( arg ) { cNPER.prototype.Calculate = function ( arg ) {
...@@ -358,10 +384,23 @@ cNPER.prototype.getInfo = function () { ...@@ -358,10 +384,23 @@ cNPER.prototype.getInfo = function () {
} }
function cNPV() { function cNPV() {
cBaseFunction.call( this, "NPV" ); // cBaseFunction.call( this, "NPV" );
this.setArgumentsMin( 2 ); // this.setArgumentsMin( 2 );
this.setArgumentsMax( 255 ); // this.setArgumentsMax( 255 );
this.setFormat( this.formatType.noneFormat ); // this.setFormat( this.formatType.noneFormat );
this.name = "NPV";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 2;
this.argumentsCurrent = 0;
this.argumentsMax = 255;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.noneFormat;
} }
cNPV.prototype = Object.create( cBaseFunction.prototype ) cNPV.prototype = Object.create( cBaseFunction.prototype )
cNPV.prototype.Calculate = function ( arg ) { cNPV.prototype.Calculate = function ( arg ) {
...@@ -449,10 +488,23 @@ function cODDLYIELD() { ...@@ -449,10 +488,23 @@ function cODDLYIELD() {
cODDLYIELD.prototype = Object.create( cBaseFunction.prototype ) cODDLYIELD.prototype = Object.create( cBaseFunction.prototype )
function cPMT() { function cPMT() {
cBaseFunction.call( this, "PMT" ); // cBaseFunction.call( this, "PMT" );
this.setArgumentsMin( 3 ); // this.setArgumentsMin( 3 );
this.setArgumentsMax( 5 ); // this.setArgumentsMax( 5 );
this.setFormat( this.formatType.noneFormat ); // this.setFormat( this.formatType.noneFormat );
this.name = "PMT";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 3;
this.argumentsCurrent = 0;
this.argumentsMax = 5;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.noneFormat;
} }
cPMT.prototype = Object.create( cBaseFunction.prototype ) cPMT.prototype = Object.create( cBaseFunction.prototype )
cPMT.prototype.Calculate = function ( arg ) { cPMT.prototype.Calculate = function ( arg ) {
...@@ -549,10 +601,23 @@ function cPRICEMAT() { ...@@ -549,10 +601,23 @@ function cPRICEMAT() {
cPRICEMAT.prototype = Object.create( cBaseFunction.prototype ) cPRICEMAT.prototype = Object.create( cBaseFunction.prototype )
function cPV() { function cPV() {
cBaseFunction.call( this, "PV" ); // cBaseFunction.call( this, "PV" );
this.setArgumentsMin( 3 ); // this.setArgumentsMin( 3 );
this.setArgumentsMax( 5 ); // this.setArgumentsMax( 5 );
this.setFormat( this.formatType.noneFormat ); // this.setFormat( this.formatType.noneFormat );
this.name = "PV";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 3;
this.argumentsCurrent = 0;
this.argumentsMax = 5;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.noneFormat;
} }
cPV.prototype = Object.create( cBaseFunction.prototype ) cPV.prototype = Object.create( cBaseFunction.prototype )
cPV.prototype.Calculate = function ( arg ) { cPV.prototype.Calculate = function ( arg ) {
......
...@@ -20,9 +20,22 @@ cFormulaFunction.Logical = { ...@@ -20,9 +20,22 @@ cFormulaFunction.Logical = {
} }
function cAND() { function cAND() {
cBaseFunction.call( this, "AND" ); // cBaseFunction.call( this, "AND" );
this.setArgumentsMin( 1 ); // this.setArgumentsMin( 1 );
this.setArgumentsMax( 255 ); // this.setArgumentsMax( 255 );
this.name = "AND";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 1;
this.argumentsCurrent = 0;
this.argumentsMax = 255;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cAND.prototype = Object.create( cBaseFunction.prototype ) cAND.prototype = Object.create( cBaseFunction.prototype )
cAND.prototype.Calculate = function ( arg ) { cAND.prototype.Calculate = function ( arg ) {
...@@ -89,9 +102,21 @@ cAND.prototype.getInfo = function () { ...@@ -89,9 +102,21 @@ cAND.prototype.getInfo = function () {
} }
function cFALSE() { function cFALSE() {
cBaseFunction.call( this, "FALSE" ); // cBaseFunction.call( this, "FALSE" );
this.setArgumentsMin( 0 ); // this.setArgumentsMin( 0 );
this.setArgumentsMax( 0 ); // this.setArgumentsMax( 0 );
this.name = "FALSE";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 0;
this.argumentsCurrent = 0;
this.argumentsMax = 0;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cFALSE.prototype = Object.create( cBaseFunction.prototype ) cFALSE.prototype = Object.create( cBaseFunction.prototype )
cFALSE.prototype.Calculate = function () { cFALSE.prototype.Calculate = function () {
...@@ -105,9 +130,22 @@ cFALSE.prototype.getInfo = function () { ...@@ -105,9 +130,22 @@ cFALSE.prototype.getInfo = function () {
} }
function cIF() { function cIF() {
cBaseFunction.call( this, "IF" ); // cBaseFunction.call( this, "IF" );
this.setArgumentsMin( 1 );
this.setArgumentsMax( 3 ); this.name = "IF";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 1;
this.argumentsCurrent = 0;
this.argumentsMax = 3;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
// this.setArgumentsMin( 1 );
// this.setArgumentsMax( 3 );
} }
cIF.prototype = Object.create( cBaseFunction.prototype ) cIF.prototype = Object.create( cBaseFunction.prototype )
cIF.prototype.Calculate = function ( arg ) { cIF.prototype.Calculate = function ( arg ) {
...@@ -148,9 +186,22 @@ cIF.prototype.getInfo = function () { ...@@ -148,9 +186,22 @@ cIF.prototype.getInfo = function () {
} }
function cIFERROR() { function cIFERROR() {
cBaseFunction.call( this, "IFERROR" ); // cBaseFunction.call( this, "IFERROR" );
this.setArgumentsMin( 2 ); // this.setArgumentsMin( 2 );
this.setArgumentsMax( 2 ); // this.setArgumentsMax( 2 );
this.name = "IFERROR";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 2;
this.argumentsCurrent = 0;
this.argumentsMax = 2;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cIFERROR.prototype = Object.create( cBaseFunction.prototype ) cIFERROR.prototype = Object.create( cBaseFunction.prototype )
cIFERROR.prototype.Calculate = function ( arg ) { cIFERROR.prototype.Calculate = function ( arg ) {
...@@ -177,9 +228,22 @@ cIFERROR.prototype.getInfo = function () { ...@@ -177,9 +228,22 @@ cIFERROR.prototype.getInfo = function () {
} }
function cNOT() { function cNOT() {
cBaseFunction.call( this, "NOT" ); // cBaseFunction.call( this, "NOT" );
this.setArgumentsMin( 1 ); // this.setArgumentsMin( 1 );
this.setArgumentsMax( 1 ); // this.setArgumentsMax( 1 );
this.name = "NOT";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 1;
this.argumentsCurrent = 0;
this.argumentsMax = 1;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cNOT.prototype = Object.create( cBaseFunction.prototype ) cNOT.prototype = Object.create( cBaseFunction.prototype )
cNOT.prototype.Calculate = function ( arg ) { cNOT.prototype.Calculate = function ( arg ) {
...@@ -211,9 +275,22 @@ cNOT.prototype.getInfo = function () { ...@@ -211,9 +275,22 @@ cNOT.prototype.getInfo = function () {
} }
function cOR() { function cOR() {
cBaseFunction.call( this, "OR" ); // cBaseFunction.call( this, "OR" );
this.setArgumentsMin( 1 ); // this.setArgumentsMin( 1 );
this.setArgumentsMax( 255 ); // this.setArgumentsMax( 255 );
this.name = "OR";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 1;
this.argumentsCurrent = 0;
this.argumentsMax = 255;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cOR.prototype = Object.create( cBaseFunction.prototype ) cOR.prototype = Object.create( cBaseFunction.prototype )
cOR.prototype.Calculate = function ( arg ) { cOR.prototype.Calculate = function ( arg ) {
...@@ -275,9 +352,22 @@ cOR.prototype.getInfo = function () { ...@@ -275,9 +352,22 @@ cOR.prototype.getInfo = function () {
} }
function cTRUE() { function cTRUE() {
cBaseFunction.call( this, "TRUE" ); // cBaseFunction.call( this, "TRUE" );
this.setArgumentsMin( 0 ); // this.setArgumentsMin( 0 );
this.setArgumentsMax( 0 ); // this.setArgumentsMax( 0 );
this.name = "TRUE";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 0;
this.argumentsCurrent = 0;
this.argumentsMax = 0;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cTRUE.prototype = Object.create( cBaseFunction.prototype ) cTRUE.prototype = Object.create( cBaseFunction.prototype )
cTRUE.prototype.Calculate = function () { cTRUE.prototype.Calculate = function () {
......
...@@ -30,9 +30,22 @@ cFormulaFunction.LookupAndReference = { ...@@ -30,9 +30,22 @@ cFormulaFunction.LookupAndReference = {
} }
function cADDRESS() { function cADDRESS() {
cBaseFunction.call( this, "ADDRESS" ); // cBaseFunction.call( this, "ADDRESS" );
this.setArgumentsMin( 2 ); // this.setArgumentsMin( 2 );
this.setArgumentsMax( 5 ); // this.setArgumentsMax( 5 );
this.name = "ADDRESS";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 2;
this.argumentsCurrent = 0;
this.argumentsMax = 5;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cADDRESS.prototype = Object.create( cBaseFunction.prototype ) cADDRESS.prototype = Object.create( cBaseFunction.prototype )
cADDRESS.prototype.Calculate = function ( arg ) { cADDRESS.prototype.Calculate = function ( arg ) {
...@@ -137,9 +150,22 @@ function cAREAS() { ...@@ -137,9 +150,22 @@ function cAREAS() {
cAREAS.prototype = Object.create( cBaseFunction.prototype ) cAREAS.prototype = Object.create( cBaseFunction.prototype )
function cCHOOSE() { function cCHOOSE() {
cBaseFunction.call( this, "CHOOSE" ); // cBaseFunction.call( this, "CHOOSE" );
this.setArgumentsMin( 2 ); // this.setArgumentsMin( 2 );
this.setArgumentsMax( 30 ); // this.setArgumentsMax( 30 );
this.name = "CHOOSE";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 2;
this.argumentsCurrent = 0;
this.argumentsMax = 30;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cCHOOSE.prototype = Object.create( cBaseFunction.prototype ) cCHOOSE.prototype = Object.create( cBaseFunction.prototype )
cCHOOSE.prototype.Calculate = function ( arg ) { cCHOOSE.prototype.Calculate = function ( arg ) {
...@@ -172,9 +198,22 @@ cCHOOSE.prototype.getInfo = function () { ...@@ -172,9 +198,22 @@ cCHOOSE.prototype.getInfo = function () {
} }
function cCOLUMN() { function cCOLUMN() {
cBaseFunction.call( this, "COLUMN" ); // cBaseFunction.call( this, "COLUMN" );
this.setArgumentsMin( 0 ); // this.setArgumentsMin( 0 );
this.setArgumentsMax( 1 ); // this.setArgumentsMax( 1 );
this.name = "COLUMN";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 0;
this.argumentsCurrent = 0;
this.argumentsMax = 1;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cCOLUMN.prototype = Object.create( cBaseFunction.prototype ) cCOLUMN.prototype = Object.create( cBaseFunction.prototype )
cCOLUMN.prototype.Calculate = function ( arg ) { cCOLUMN.prototype.Calculate = function ( arg ) {
...@@ -211,9 +250,22 @@ cCOLUMN.prototype.getInfo = function () { ...@@ -211,9 +250,22 @@ cCOLUMN.prototype.getInfo = function () {
} }
function cCOLUMNS() { function cCOLUMNS() {
cBaseFunction.call( this, "COLUMNS" ); // cBaseFunction.call( this, "COLUMNS" );
this.setArgumentsMin( 1 ); // this.setArgumentsMin( 1 );
this.setArgumentsMax( 1 ); // this.setArgumentsMax( 1 );
this.name = "COLUMNS";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 1;
this.argumentsCurrent = 0;
this.argumentsMax = 1;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cCOLUMNS.prototype = Object.create( cBaseFunction.prototype ) cCOLUMNS.prototype = Object.create( cBaseFunction.prototype )
cCOLUMNS.prototype.Calculate = function ( arg ) { cCOLUMNS.prototype.Calculate = function ( arg ) {
...@@ -250,9 +302,22 @@ cGETPIVOTDATA.prototype = Object.create( cBaseFunction.prototype ) ...@@ -250,9 +302,22 @@ cGETPIVOTDATA.prototype = Object.create( cBaseFunction.prototype )
var g_oHLOOKUPCache = new VHLOOKUPCache(true); var g_oHLOOKUPCache = new VHLOOKUPCache(true);
function cHLOOKUP() { function cHLOOKUP() {
cBaseFunction.call( this, "HLOOKUP" ); // cBaseFunction.call( this, "HLOOKUP" );
this.setArgumentsMin( 3 ); // this.setArgumentsMin( 3 );
this.setArgumentsMax( 4 ); // this.setArgumentsMax( 4 );
this.name = "HLOOKUP";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 3;
this.argumentsCurrent = 0;
this.argumentsMax = 4;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cHLOOKUP.prototype = Object.create( cBaseFunction.prototype ) cHLOOKUP.prototype = Object.create( cBaseFunction.prototype )
cHLOOKUP.prototype.Calculate = function ( arg ) { cHLOOKUP.prototype.Calculate = function ( arg ) {
...@@ -350,7 +415,6 @@ cHLOOKUP.prototype.Calculate = function ( arg ) { ...@@ -350,7 +415,6 @@ cHLOOKUP.prototype.Calculate = function ( arg ) {
} }
if ( min > valueForSearching ) { if ( min > valueForSearching ) {
return this.value = new cError( cErrorType.not_available ); return this.value = new cError( cErrorType.not_available );
} }
...@@ -387,9 +451,22 @@ function cINDEX() { ...@@ -387,9 +451,22 @@ function cINDEX() {
cINDEX.prototype = Object.create( cBaseFunction.prototype ) cINDEX.prototype = Object.create( cBaseFunction.prototype )
function cINDIRECT() { function cINDIRECT() {
cBaseFunction.call( this, "INDIRECT" ); // cBaseFunction.call( this, "INDIRECT" );
this.setArgumentsMin( 1 ); // this.setArgumentsMin( 1 );
this.setArgumentsMax( 2 ); // this.setArgumentsMax( 2 );
this.name = "INDIRECT";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 1;
this.argumentsCurrent = 0;
this.argumentsMax = 2;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cINDIRECT.prototype = Object.create( cBaseFunction.prototype ) cINDIRECT.prototype = Object.create( cBaseFunction.prototype )
cINDIRECT.prototype.Calculate = function ( arg ) { cINDIRECT.prototype.Calculate = function ( arg ) {
...@@ -484,9 +561,22 @@ cINDIRECT.prototype.getInfo = function () { ...@@ -484,9 +561,22 @@ cINDIRECT.prototype.getInfo = function () {
} }
function cLOOKUP() { function cLOOKUP() {
cBaseFunction.call( this, "LOOKUP" ); // cBaseFunction.call( this, "LOOKUP" );
this.setArgumentsMin( 2 ); // this.setArgumentsMin( 2 );
this.setArgumentsMax( 3 ); // this.setArgumentsMax( 3 );
this.name = "LOOKUP";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 2;
this.argumentsCurrent = 0;
this.argumentsMax = 3;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cLOOKUP.prototype = Object.create( cBaseFunction.prototype ) cLOOKUP.prototype = Object.create( cBaseFunction.prototype )
cLOOKUP.prototype.Calculate = function ( arg ) { cLOOKUP.prototype.Calculate = function ( arg ) {
...@@ -630,9 +720,22 @@ function cOFFSET() { ...@@ -630,9 +720,22 @@ function cOFFSET() {
cOFFSET.prototype = Object.create( cBaseFunction.prototype ) cOFFSET.prototype = Object.create( cBaseFunction.prototype )
function cROW() { function cROW() {
cBaseFunction.call( this, "ROW" ); // cBaseFunction.call( this, "ROW" );
this.setArgumentsMin( 0 ); // this.setArgumentsMin( 0 );
this.setArgumentsMax( 1 ); // this.setArgumentsMax( 1 );
this.name = "ROW";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 0;
this.argumentsCurrent = 0;
this.argumentsMax = 1;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cROW.prototype = Object.create( cBaseFunction.prototype ) cROW.prototype = Object.create( cBaseFunction.prototype )
cROW.prototype.Calculate = function ( arg ) { cROW.prototype.Calculate = function ( arg ) {
...@@ -669,9 +772,22 @@ cROW.prototype.getInfo = function () { ...@@ -669,9 +772,22 @@ cROW.prototype.getInfo = function () {
} }
function cROWS() { function cROWS() {
cBaseFunction.call( this, "ROWS" ); // cBaseFunction.call( this, "ROWS" );
this.setArgumentsMin( 1 ); // this.setArgumentsMin( 1 );
this.setArgumentsMax( 1 ); // this.setArgumentsMax( 1 );
this.name = "ROWS";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 1;
this.argumentsCurrent = 0;
this.argumentsMax = 1;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
} }
cROWS.prototype = Object.create( cBaseFunction.prototype ) cROWS.prototype = Object.create( cBaseFunction.prototype )
cROWS.prototype.Calculate = function ( arg ) { cROWS.prototype.Calculate = function ( arg ) {
...@@ -817,9 +933,22 @@ VHLOOKUPCache.prototype.clean = function(){ ...@@ -817,9 +933,22 @@ VHLOOKUPCache.prototype.clean = function(){
var g_oVLOOKUPCache = new VHLOOKUPCache(false); var g_oVLOOKUPCache = new VHLOOKUPCache(false);
function cVLOOKUP() { function cVLOOKUP() {
cBaseFunction.call( this, "VLOOKUP" ); // cBaseFunction.call( this, "VLOOKUP" );
this.setArgumentsMin( 3 );
this.setArgumentsMax( 4 ); this.name = "VLOOKUP";
this.type = cElementType.func;
this.value = null;
this.argumentsMin = 3;
this.argumentsCurrent = 0;
this.argumentsMax = 4;
this.formatType = {
def:-1, //подразумевается формат первой ячейки входящей в формулу.
noneFormat:-2
};
this.numFormat = this.formatType.def;
// this.setArgumentsMin( 3 );
// this.setArgumentsMax( 4 );
} }
cVLOOKUP.prototype = Object.create( cBaseFunction.prototype ) cVLOOKUP.prototype = Object.create( cBaseFunction.prototype )
cVLOOKUP.prototype.Calculate = function ( arg ) { cVLOOKUP.prototype.Calculate = function ( arg ) {
......
This diff is collapsed.
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