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
eb49d984
Commit
eb49d984
authored
Jun 16, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add function checkTypeCell2 (for existing cell values)
parent
a136a5c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
cell/model/FormulaObjects/parserFormula.js
cell/model/FormulaObjects/parserFormula.js
+21
-1
No files found.
cell/model/FormulaObjects/parserFormula.js
View file @
eb49d984
...
...
@@ -36,7 +36,7 @@ var cElementType = {
cell3D
:
12
,
cellsRange3D
:
13
,
table
:
14
,
name3D
:
15
name3D
:
15
};
/** @enum */
var
cErrorType
=
{
...
...
@@ -1944,6 +1944,25 @@ function checkTypeCell( val ) {
return
new
cString
(
val
);
}
}
// ToDo перевести на эту функцию все формулы...
function
checkTypeCell2
(
cell
)
{
if
(
cell
)
{
var
val
=
cell
.
getValueWithoutFormat
();
var
type
=
cell
.
getType
();
if
(
CellValueType
.
Number
===
type
)
{
return
new
cNumber
(
val
-
0
);
}
else
if
(
CellValueType
.
Bool
===
type
)
{
return
new
cBool
(
val
);
}
else
if
(
CellValueType
.
Error
===
type
)
{
return
new
cError
(
val
);
}
else
{
return
new
cString
(
val
);
}
}
else
{
return
new
cEmpty
();
}
}
/*--------------------------------------------------------------------------*/
/*Base classes for operators & functions */
...
...
@@ -5104,6 +5123,7 @@ function rtl_math_erfc( x ) {
window
[
'
AscCommonExcel
'
].
cBaseFunction
=
cBaseFunction
;
window
[
'
AscCommonExcel
'
].
checkTypeCell
=
checkTypeCell
;
window
[
'
AscCommonExcel
'
].
checkTypeCell2
=
checkTypeCell2
;
window
[
'
AscCommonExcel
'
].
cFormulaFunctionGroup
=
cFormulaFunctionGroup
;
window
[
'
AscCommonExcel
'
].
cFormulaFunction
=
cFormulaFunction
;
...
...
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