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
6c91fe35
Commit
6c91fe35
authored
Oct 06, 2017
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete this.name from formulas classes -> move to prototype
parent
639ab89f
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
313 additions
and
190 deletions
+313
-190
cell/model/FormulaObjects/engineeringFunctions.js
cell/model/FormulaObjects/engineeringFunctions.js
+141
-61
cell/model/FormulaObjects/lookupandreferenceFunctions.js
cell/model/FormulaObjects/lookupandreferenceFunctions.js
+19
-11
cell/model/FormulaObjects/parserFormula.js
cell/model/FormulaObjects/parserFormula.js
+1
-4
cell/model/FormulaObjects/statisticalFunctions.js
cell/model/FormulaObjects/statisticalFunctions.js
+139
-109
cell/model/FormulaObjects/textanddataFunctions.js
cell/model/FormulaObjects/textanddataFunctions.js
+13
-5
No files found.
cell/model/FormulaObjects/engineeringFunctions.js
View file @
6c91fe35
This diff is collapsed.
Click to expand it.
cell/model/FormulaObjects/lookupandreferenceFunctions.js
View file @
6c91fe35
...
...
@@ -36,7 +36,7 @@
* @param {Window} window
* @param {undefined} undefined
*/
function
(
window
,
undefined
)
{
function
(
window
,
undefined
)
{
function
_getRowTitle
(
row
)
{
return
""
+
(
row
+
1
);
}
...
...
@@ -217,11 +217,13 @@
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cAREAS
()
{
cBaseFunction
.
call
(
this
,
"
AREAS
"
);
this
.
value
=
null
;
this
.
argumentsCurrent
=
0
;
}
cAREAS
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cAREAS
.
prototype
.
constructor
=
cAREAS
;
cAREAS
.
prototype
.
name
=
'
AREAS
'
;
/**
* @constructor
...
...
@@ -353,11 +355,13 @@
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cGETPIVOTDATA
()
{
cBaseFunction
.
call
(
this
,
"
GETPIVOTDATA
"
);
this
.
value
=
null
;
this
.
argumentsCurrent
=
0
;
}
cGETPIVOTDATA
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cGETPIVOTDATA
.
prototype
.
constructor
=
cGETPIVOTDATA
;
cGETPIVOTDATA
.
prototype
.
name
=
'
GETPIVOTDATA
'
;
/**
* @constructor
...
...
@@ -382,11 +386,13 @@
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cHYPERLINK
()
{
cBaseFunction
.
call
(
this
,
"
HYPERLINK
"
);
this
.
value
=
null
;
this
.
argumentsCurrent
=
0
;
}
cHYPERLINK
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cHYPERLINK
.
prototype
.
constructor
=
cHYPERLINK
;
cHYPERLINK
.
prototype
.
name
=
'
HYPERLINK
'
;
/**
* @constructor
...
...
@@ -449,8 +455,8 @@
if
(
arg1
>
Math
.
abs
(
bbox
.
r1
-
bbox
.
r2
)
+
1
||
arg2
>
Math
.
abs
(
bbox
.
c1
-
bbox
.
c2
)
+
1
)
{
res
=
new
cError
(
cErrorType
.
bad_reference
);
}
else
{
res
=
new
Asc
.
Range
(
bbox
.
c1
+
arg2
-
1
,
bbox
.
r1
+
arg1
-
1
,
bbox
.
c1
+
arg2
-
1
,
bbox
.
r1
+
arg1
-
1
)
res
=
new
Asc
.
Range
(
bbox
.
c1
+
arg2
-
1
,
bbox
.
r1
+
arg1
-
1
,
bbox
.
c1
+
arg2
-
1
,
bbox
.
r1
+
arg1
-
1
)
res
=
new
cRef
(
res
.
getName
(),
ws
);
}
}
...
...
@@ -581,9 +587,9 @@
}
if
(
!
(
(
cElementType
.
cellsRange
===
arg1
.
type
||
cElementType
.
cellsRange3D
===
arg1
.
type
||
cElementType
.
array
===
arg1
.
type
)
&&
(
cElementType
.
cellsRange
===
arg2
.
type
||
cElementType
.
cellsRange3D
===
arg2
.
type
||
cElementType
.
array
===
arg2
.
type
)
))
{
cElementType
.
array
===
arg1
.
type
)
&&
(
cElementType
.
cellsRange
===
arg2
.
type
||
cElementType
.
cellsRange3D
===
arg2
.
type
||
cElementType
.
array
===
arg2
.
type
)
))
{
return
this
.
value
=
new
cError
(
cErrorType
.
not_available
);
}
...
...
@@ -712,7 +718,7 @@
var
a0Type
=
a0
.
type
;
var
a0Value
=
a0
.
getValue
();
if
(
!
(
cElementType
.
number
===
a0Type
||
cElementType
.
string
===
a0Type
||
cElementType
.
bool
===
a0Type
||
cElementType
.
error
===
a0Type
||
cElementType
.
empty
===
a0Type
))
{
cElementType
.
error
===
a0Type
||
cElementType
.
empty
===
a0Type
))
{
a0Type
=
a0Value
.
type
;
a0Value
=
a0Value
.
getValue
();
}
...
...
@@ -932,11 +938,13 @@
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cRTD
()
{
cBaseFunction
.
call
(
this
,
"
RTD
"
);
this
.
value
=
null
;
this
.
argumentsCurrent
=
0
;
}
cRTD
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cRTD
.
prototype
.
constructor
=
cRTD
;
cRTD
.
prototype
.
name
=
'
RTD
'
;
/**
* @constructor
...
...
cell/model/FormulaObjects/parserFormula.js
View file @
6c91fe35
...
...
@@ -2382,12 +2382,9 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
};
/** @constructor */
function
cBaseFunction
(
name
)
{
this
.
name
=
name
;
function
cBaseFunction
()
{
this
.
value
=
null
;
this
.
argumentsCurrent
=
0
;
// this.isXLFN = rx_sFuncPref.test(this.name);
}
cBaseFunction
.
prototype
.
type
=
cElementType
.
func
;
...
...
cell/model/FormulaObjects/statisticalFunctions.js
View file @
6c91fe35
This diff is collapsed.
Click to expand it.
cell/model/FormulaObjects/textanddataFunctions.js
View file @
6c91fe35
...
...
@@ -36,7 +36,7 @@
* @param {Window} window
* @param {undefined} undefined
*/
function
(
window
,
undefined
)
{
function
(
window
,
undefined
)
{
// Import
var
cElementType
=
AscCommonExcel
.
cElementType
;
var
CellValueType
=
AscCommon
.
CellValueType
;
...
...
@@ -70,22 +70,26 @@
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cASC
()
{
cBaseFunction
.
call
(
this
,
"
ASC
"
);
this
.
value
=
null
;
this
.
argumentsCurrent
=
0
;
}
cASC
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cASC
.
prototype
.
constructor
=
cASC
;
cASC
.
prototype
.
name
=
'
ASC
'
;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cBAHTTEXT
()
{
cBaseFunction
.
call
(
this
,
"
BAHTTEXT
"
);
this
.
value
=
null
;
this
.
argumentsCurrent
=
0
;
}
cBAHTTEXT
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cBAHTTEXT
.
prototype
.
constructor
=
cBAHTTEXT
;
cBAHTTEXT
.
prototype
.
name
=
'
BAHTTEXT
'
;
/**
* @constructor
...
...
@@ -858,11 +862,13 @@
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cJIS
()
{
cBaseFunction
.
call
(
this
,
"
JIS
"
);
this
.
value
=
null
;
this
.
argumentsCurrent
=
0
;
}
cJIS
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cJIS
.
prototype
.
constructor
=
cJIS
;
cJIS
.
prototype
.
name
=
'
JIS
'
;
/**
* @constructor
...
...
@@ -1219,11 +1225,13 @@
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cPHONETIC
()
{
cBaseFunction
.
call
(
this
,
"
PHONETIC
"
);
this
.
value
=
null
;
this
.
argumentsCurrent
=
0
;
}
cPHONETIC
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cPHONETIC
.
prototype
.
constructor
=
cPHONETIC
;
cPHONETIC
.
prototype
.
name
=
'
PHONETIC
'
;
/**
* @constructor
...
...
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