Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
88da31e1
Commit
88da31e1
authored
Apr 12, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cell/model/FormulaObjects/_xlfnFunctions to function-closure
parent
23faf2d7
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
188 additions
and
242 deletions
+188
-242
cell/model/FormulaObjects/_xlfnFunctions.js
cell/model/FormulaObjects/_xlfnFunctions.js
+146
-6
cell/model/FormulaObjects/cubeFunctions.js
cell/model/FormulaObjects/cubeFunctions.js
+3
-2
cell/model/FormulaObjects/databaseFunctions.js
cell/model/FormulaObjects/databaseFunctions.js
+3
-10
cell/model/FormulaObjects/dateandtimeFunctions.js
cell/model/FormulaObjects/dateandtimeFunctions.js
+4
-15
cell/model/FormulaObjects/engineeringFunctions.js
cell/model/FormulaObjects/engineeringFunctions.js
+4
-27
cell/model/FormulaObjects/financialFunctions.js
cell/model/FormulaObjects/financialFunctions.js
+4
-14
cell/model/FormulaObjects/informationFunctions.js
cell/model/FormulaObjects/informationFunctions.js
+4
-16
cell/model/FormulaObjects/logicalFunctions.js
cell/model/FormulaObjects/logicalFunctions.js
+4
-15
cell/model/FormulaObjects/lookupandreferenceFunctions.js
cell/model/FormulaObjects/lookupandreferenceFunctions.js
+4
-14
cell/model/FormulaObjects/mathematicFunctions.js
cell/model/FormulaObjects/mathematicFunctions.js
+4
-30
cell/model/FormulaObjects/statisticalFunctions.js
cell/model/FormulaObjects/statisticalFunctions.js
+4
-76
cell/model/FormulaObjects/textanddataFunctions.js
cell/model/FormulaObjects/textanddataFunctions.js
+4
-17
No files found.
cell/model/FormulaObjects/_xlfnFunctions.js
View file @
88da31e1
(
/**
* 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
);
cell/model/FormulaObjects/cubeFunctions.js
View file @
88da31e1
...
...
@@ -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" );
...
...
cell/model/FormulaObjects/databaseFunctions.js
View file @
88da31e1
"
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
"
);
...
...
cell/model/FormulaObjects/dateandtimeFunctions.js
View file @
88da31e1
"
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 );
...
...
cell/model/FormulaObjects/engineeringFunctions.js
View file @
88da31e1
/**
* 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
);
...
...
cell/model/FormulaObjects/financialFunctions.js
View file @
88da31e1
...
...
@@ -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" );
...
...
cell/model/FormulaObjects/informationFunctions.js
View file @
88da31e1
"
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
);
/*
здесь вынесены функции, которы по назначению не могут быть использованы в веб редакторах документах.
либо они будут реализованы с усеченным функционалом позже.
...
...
cell/model/FormulaObjects/logicalFunctions.js
View file @
88da31e1
"
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" );
...
...
cell/model/FormulaObjects/lookupandreferenceFunctions.js
View file @
88da31e1
"
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" );
...
...
cell/model/FormulaObjects/mathematicFunctions.js
View file @
88da31e1
"
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" );
...
...
cell/model/FormulaObjects/statisticalFunctions.js
View file @
88da31e1
"
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 );
...
...
cell/model/FormulaObjects/textanddataFunctions.js
View file @
88da31e1
"
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
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment