Commit 88da31e1 authored by Alexander.Trofimov's avatar Alexander.Trofimov

cell/model/FormulaObjects/_xlfnFunctions to function-closure

parent 23faf2d7
(
/**
* Created with JetBrains WebStorm.
* User: Dmitry.Shahtanov
* Date: 02.11.15
* Time: 14:59
* To change this template use File | Settings | File Templates.
* @param {Window} window
* @param {undefined} undefined
*/
function (window, undefined) {
/*cFormulaFunctionGroup['_xlfn'] = [
cFILTERXML,//web not support in MS Office Online
......@@ -14,6 +13,146 @@
cQUERYSTRING
];*/
/*new funcions with _xlnf-prefix*/
cFormulaFunctionGroup['DateAndTime'] = cFormulaFunctionGroup['DateAndTime'] || [];
cFormulaFunctionGroup['DateAndTime'].push(
cDAYS,
cISOWEEKNUM
);
cFormulaFunctionGroup['Engineering'] = cFormulaFunctionGroup['Engineering'] || [];
cFormulaFunctionGroup['Engineering'].push(
cBITAND,
cBITLSHIFT,
cBITOR,
cBITRSHIFT,
cBITXOR,
cERF_PRECISE,
cERFC_PRECISE,
cIMCOSH,
cIMCOT,
cIMCSC,
cIMCSCH,
cIMSEC,
cIMSECH,
cIMSINH,
cIMTAN
);
cFormulaFunctionGroup['TextAndData'] = cFormulaFunctionGroup['TextAndData'] || [];
cFormulaFunctionGroup['TextAndData'].push(
cDBCS,
cNUMBERVALUE,
cUNICHAR,
cUNICODE
);
cFormulaFunctionGroup['Statistical'] = cFormulaFunctionGroup['Statistical'] || [];
cFormulaFunctionGroup['Statistical'].push(
cBETA_DIST,
cBETA_INV,
cBINOM_DIST,
cBINOM_DIST_RANGE,
cBINOM_INV,
cCHISQ_DIST,
cCHISQ_DIST_RT,
cCHISQ_INV,
cCHISQ_INV_RT,
cCHISQ_TEST,
cCONFIDENCE_NORM,
cCONFIDENCE_T,
cCOVARIANCE_P,
cCOVARIANCE_S,
cEXPON_DIST,
cF_DIST,
cF_DIST_RT,
cF_INV,
cF_INV_RT,
cF_TEST,
cFORECAST_ETS,
cFORECAST_ETS_CONFINT,
cFORECAST_ETS_SEASONALITY,
cFORECAST_ETS_STAT,
cFORECAST_LINEAR,
cGAMMA,
cGAMMA_DIST,
cGAMMA_INV,
cGAMMALN_PRECISE,
cGAUSS,
cHYPGEOM_DIST,
cLOGNORM_DIST,
cLOGNORM_INV,
cMODE_MULT,
cMODE_SNGL,
cNEGBINOM_DIST,
cNORM_DIST,
cNORM_INV,
cNORM_S_DIST,
cNORM_S_INV,
cPERCENTILE_EXC,
cPERCENTILE_INC,
cPERCENTRANK_EXC,
cPERCENTRANK_INC,
cPERMUTATIONA,
cPHI,
cPOISSON_DIST,
cQUARTILE_EXC,
cQUARTILE_INC,
cRANK_AVG,
cRANK_EQ,
cSKEW_P,
cSTDEV_P,
cSTDEV_S,
cT_DIST,
cT_DIST_2T,
cT_DIST_RT,
cT_INV,
cT_INV_2T,
cT_TEST,
cVAR_P,
cVAR_S,
cWEIBULL_DIST,
cZ_TEST
);
cFormulaFunctionGroup['Financial'] = cFormulaFunctionGroup['Financial'] || [];
cFormulaFunctionGroup['Financial'].push(
cPDURATION,
cRRI
);
cFormulaFunctionGroup['Mathematic'] = cFormulaFunctionGroup['Mathematic'] || [];
cFormulaFunctionGroup['Mathematic'].push(
cACOT,
cACOTH,
cAGGREGATE,
cARABIC,
cBASE,
cCEILING_MATH,
cCEILING_PRECISE,
cCOMBINA,
cCOT,
cCOTH,
cCSC,
cCSCH,
cDECIMAL,
cFLOOR_MATH,
cFLOOR_PRECISE,
cMUNIT,
cSEC,
cSECH
);
cFormulaFunctionGroup['LookupAndReference'] = cFormulaFunctionGroup['LookupAndReference'] || [];
cFormulaFunctionGroup['LookupAndReference'].push(
cFORMULATEXT
);
cFormulaFunctionGroup['Information'] = cFormulaFunctionGroup['Information'] || [];
cFormulaFunctionGroup['Information'].push(
cISFORMULA,
cSHEET,
cSHEETS
);
cFormulaFunctionGroup['Logical'] = cFormulaFunctionGroup['Logical'] || [];
cFormulaFunctionGroup['Logical'].push(
cIFNA,
cXOR
);
function cACOT() {
cBaseFunction.call( this, "ACOT" );
this.isXLFN = true;
......@@ -697,3 +836,4 @@ function cZ_TEST() {
this.isXLFN = true;
}
cZ_TEST.prototype = Object.create( cBaseFunction.prototype );
})(window);
......@@ -6,7 +6,8 @@
* @param {undefined} undefined
*/
function (window, undefined) {
cFormulaFunctionGroup['Cube'] = [
cFormulaFunctionGroup['Cube'] = cFormulaFunctionGroup['Cube'] || [];
cFormulaFunctionGroup['Cube'].push(
cCUBEKPIMEMBER,
cCUBEMEMBER,
cCUBEMEMBERPROPERTY,
......@@ -14,7 +15,7 @@ cFormulaFunctionGroup['Cube'] = [
cCUBESET,
cCUBESETCOUNT,
cCUBEVALUE
];
);
function cCUBEKPIMEMBER() {
// cBaseFunction.call( this, "CUBEKPIMEMBER" );
......
"use strict";
/**
* Created with JetBrains WebStorm.
* User: Dmitry.Shahtanov
* Date: 27.06.13
* Time: 15:16
* To change this template use File | Settings | File Templates.
*/
cFormulaFunctionGroup['Database'] = [
cFormulaFunctionGroup['Database'] = cFormulaFunctionGroup['Database'] || [];
cFormulaFunctionGroup['Database'].push(
cDAVERAGE,
cDCOUNT,
cDCOUNTA,
......@@ -21,7 +14,7 @@ cFormulaFunctionGroup['Database'] = [
cDSUM,
cDVAR,
cDVARP
];
);
function cDAVERAGE() {
cBaseFunction.call( this, "DAVERAGE" );
......
"use strict";
/**
* Created with JetBrains WebStorm.
* User: Dmitry.Shahtanov
* Date: 27.06.13
* Time: 13:24
* To change this template use File | Settings | File Templates.
*/
var DayCountBasis = {
// US 30/360
UsPsa30_360:0,
......@@ -247,7 +239,8 @@ function daysInYear( date, basis ){
}
}
cFormulaFunctionGroup['DateAndTime'] = [
cFormulaFunctionGroup['DateAndTime'] = cFormulaFunctionGroup['DateAndTime'] || [];
cFormulaFunctionGroup['DateAndTime'].push(
cDATE,
cDATEDIF,
cDATEVALUE,
......@@ -270,12 +263,8 @@ cFormulaFunctionGroup['DateAndTime'] = [
cWORKDAY,
cWORKDAY_INTL,
cYEAR,
cYEARFRAC,
/*new funcions with _xlnf-prefix*/
cDAYS,
cISOWEEKNUM
];
cYEARFRAC
);
function cDATE() {
// cBaseFunction.call( this, "DATE", 3, 3 );
......
/**
* Created with JetBrains WebStorm.
* User: Dmitry.Shahtanov
* Date: 27.06.13
* Time: 12:25
* To change this template use File | Settings | File Templates.
*/
"use strict";
......@@ -917,7 +910,8 @@ Complex.prototype = {
};
cFormulaFunctionGroup['Engineering'] = [
cFormulaFunctionGroup['Engineering'] = cFormulaFunctionGroup['Engineering'] || [];
cFormulaFunctionGroup['Engineering'].push(
cBESSELI,
cBESSELJ,
cBESSELK,
......@@ -956,25 +950,8 @@ cFormulaFunctionGroup['Engineering'] = [
cIMSUM,
cOCT2BIN,
cOCT2DEC,
cOCT2HEX,
/*new funcions with _xlnf-prefix*/
cBITAND,
cBITLSHIFT,
cBITOR,
cBITRSHIFT,
cBITXOR,
cERF_PRECISE,
cERFC_PRECISE,
cIMCOSH,
cIMCOT,
cIMCSC,
cIMCSCH,
cIMSEC,
cIMSECH,
cIMSINH,
cIMTAN
];
cOCT2HEX
);
function cBESSELI() {
cBaseFunction.call( this, "BESSELI", 2, 2 );
......
......@@ -444,14 +444,8 @@ function oddFPrice( settl, matur, iss, firstCoup, rate, yld, redemption, frequen
return res;
}
/**
* Created with JetBrains WebStorm.
* User: Dmitry.Shahtanov
* Date: 27.06.13
* Time: 15:19
* To change this template use File | Settings | File Templates.
*/
cFormulaFunctionGroup['Financial'] = [
cFormulaFunctionGroup['Financial'] = cFormulaFunctionGroup['Financial'] || [];
cFormulaFunctionGroup['Financial'].push(
cACCRINT,
cACCRINTM,
cAMORDEGRC,
......@@ -504,12 +498,8 @@ cFormulaFunctionGroup['Financial'] = [
cXNPV,
cYIELD,
cYIELDDISC,
cYIELDMAT,
/*new funcions with _xlnf-prefix*/
cPDURATION,
cRRI
];
cYIELDMAT
);
function cACCRINT() {
// cBaseFunction.call( this, "ACCRINT" );
......
"use strict";
/**
* Created with JetBrains WebStorm.
* User: Dmitry.Shahtanov
* Date: 27.06.13
* Time: 15:21
* To change this template use File | Settings | File Templates.
*/
cFormulaFunctionGroup['Information'] = [
cFormulaFunctionGroup['Information'] = cFormulaFunctionGroup['Information'] || [];
cFormulaFunctionGroup['Information'].push(
cERROR_TYPE,
cISBLANK,
cISERR,
......@@ -23,13 +16,8 @@ cFormulaFunctionGroup['Information'] = [
cISTEXT,
cN,
cNA,
cTYPE,
/*new funcions with _xlnf-prefix*/
cISFORMULA,
cSHEET,
cSHEETS
];
cTYPE
);
/*
здесь вынесены функции, которы по назначению не могут быть использованы в веб редакторах документах.
либо они будут реализованы с усеченным функционалом позже.
......
"use strict";
/**
* Created with JetBrains WebStorm.
* User: Dmitry.Shahtanov
* Date: 27.06.13
* Time: 15:22
* To change this template use File | Settings | File Templates.
*/
cFormulaFunctionGroup['Logical'] = [
cFormulaFunctionGroup['Logical'] = cFormulaFunctionGroup['Logical'] || [];
cFormulaFunctionGroup['Logical'].push(
cAND,
cFALSE,
cIF,
cIFERROR,
cNOT,
cOR,
cTRUE,
/*new funcions with _xlnf-prefix*/
cIFNA,
cXOR
];
cTRUE
);
function cAND() {
// cBaseFunction.call( this, "AND" );
......
"use strict";
/**
* Created with JetBrains WebStorm.
* User: Dmitry.Shahtanov
* Date: 27.06.13
* Time: 15:21
* To change this template use File | Settings | File Templates.
*/
function _getRowTitle( row ) {
return "" + (row + 1);
}
cFormulaFunctionGroup['LookupAndReference'] = [
cFormulaFunctionGroup['LookupAndReference'] = cFormulaFunctionGroup['LookupAndReference'] || [];
cFormulaFunctionGroup['LookupAndReference'].push(
cADDRESS,
cAREAS,
cCHOOSE,
......@@ -30,11 +23,8 @@ cFormulaFunctionGroup['LookupAndReference'] = [
cROWS,
cRTD,
cTRANSPOSE,
cVLOOKUP,
/*new funcions with _xlnf-prefix*/
cFORMULATEXT
];
cVLOOKUP
);
function cADDRESS() {
// cBaseFunction.call( this, "ADDRESS" );
......
"use strict";
/**
* Created with JetBrains WebStorm.
* User: Dmitry.Shahtanov
* Date: 27.06.13
* Time: 15:20
* To change this template use File | Settings | File Templates.
*/
cFormulaFunctionGroup['Mathematic'] = [
cFormulaFunctionGroup['Mathematic'] = cFormulaFunctionGroup['Mathematic'] || [];
cFormulaFunctionGroup['Mathematic'].push(
cABS,
cACOS,
cACOSH,
......@@ -69,28 +63,8 @@ cFormulaFunctionGroup['Mathematic'] = [
cSUMXMY2,
cTAN,
cTANH,
cTRUNC,
/*new funcions with _xlnf-prefix*/
cACOT,
cACOTH,
cAGGREGATE,
cARABIC,
cBASE,
cCEILING_MATH,
cCEILING_PRECISE,
cCOMBINA,
cCOT,
cCOTH,
cCSC,
cCSCH,
cDECIMAL,
cFLOOR_MATH,
cFLOOR_PRECISE,
cMUNIT,
cSEC,
cSECH
];
cTRUNC
);
function cABS() {
// cBaseFunction.call( this, "ABS" );
......
"use strict";
/**
* Created with JetBrains WebStorm.
* User: Dmitry.Shahtanov
* Date: 27.06.13
* Time: 15:18
* To change this template use File | Settings | File Templates.
*/
cFormulaFunctionGroup['Statistical'] = [
cFormulaFunctionGroup['Statistical'] = cFormulaFunctionGroup['Statistical'] || [];
cFormulaFunctionGroup['Statistical'].push(
cAVEDEV,
cAVERAGE,
cAVERAGEA,
......@@ -91,73 +84,8 @@ cFormulaFunctionGroup['Statistical'] = [
cVARP,
cVARPA,
cWEIBULL,
cZTEST,
/*new funcions with _xlnf-prefix*/
cBETA_DIST,
cBETA_INV,
cBINOM_DIST,
cBINOM_DIST_RANGE,
cBINOM_INV,
cCHISQ_DIST,
cCHISQ_DIST_RT,
cCHISQ_INV,
cCHISQ_INV_RT,
cCHISQ_TEST,
cCONFIDENCE_NORM,
cCONFIDENCE_T,
cCOVARIANCE_P,
cCOVARIANCE_S,
cEXPON_DIST,
cF_DIST,
cF_DIST_RT,
cF_INV,
cF_INV_RT,
cF_TEST,
cFORECAST_ETS,
cFORECAST_ETS_CONFINT,
cFORECAST_ETS_SEASONALITY,
cFORECAST_ETS_STAT,
cFORECAST_LINEAR,
cGAMMA,
cGAMMA_DIST,
cGAMMA_INV,
cGAMMALN_PRECISE,
cGAUSS,
cHYPGEOM_DIST,
cLOGNORM_DIST,
cLOGNORM_INV,
cMODE_MULT,
cMODE_SNGL,
cNEGBINOM_DIST,
cNORM_DIST,
cNORM_INV,
cNORM_S_DIST,
cNORM_S_INV,
cPERCENTILE_EXC,
cPERCENTILE_INC,
cPERCENTRANK_EXC,
cPERCENTRANK_INC,
cPERMUTATIONA,
cPHI,
cPOISSON_DIST,
cQUARTILE_EXC,
cQUARTILE_INC,
cRANK_AVG,
cRANK_EQ,
cSKEW_P,
cSTDEV_P,
cSTDEV_S,
cT_DIST,
cT_DIST_2T,
cT_DIST_RT,
cT_INV,
cT_INV_2T,
cT_TEST,
cVAR_P,
cVAR_S,
cWEIBULL_DIST,
cZ_TEST
];
cZTEST
);
function cAVEDEV() {
// cBaseFunction.call( this, "AVEDEV" );
// this.setArgumentsMin( 1 );
......
"use strict";
/**
* Created with JetBrains WebStorm.
* User: Dmitry.Shahtanov
* Date: 27.06.13
* Time: 15:17
* To change this template use File | Settings | File Templates.
*/
cFormulaFunctionGroup['TextAndData'] = [
cFormulaFunctionGroup['TextAndData'] = cFormulaFunctionGroup['TextAndData'] || [];
cFormulaFunctionGroup['TextAndData'].push(
cASC,
cBAHTTEXT,
cCHAR,
......@@ -42,14 +35,8 @@ cFormulaFunctionGroup['TextAndData'] = [
cTEXT,
cTRIM,
cUPPER,
cVALUE,
/*new funcions with _xlnf-prefix*/
cDBCS,
cNUMBERVALUE,
cUNICHAR,
cUNICODE
];
cVALUE
);
function cASC() {
cBaseFunction.call( this, "ASC" );
......
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