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
50e955f7
Commit
50e955f7
authored
Nov 08, 2016
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 33332
parent
e8774787
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
10 deletions
+23
-10
cell/.unit-tests/testsForFWB.html
cell/.unit-tests/testsForFWB.html
+6
-10
cell/.unit-tests/testsForFWB.html.js
cell/.unit-tests/testsForFWB.html.js
+15
-0
common/NumFormat.js
common/NumFormat.js
+2
-0
No files found.
cell/.unit-tests/testsForFWB.html
View file @
50e955f7
...
...
@@ -12,16 +12,12 @@
<script
type=
"text/javascript"
src=
"../../../web-apps/vendor/xregexp/xregexp-all-min.js"
></script>
<script
type=
"text/javascript"
src=
"../utils/utils.js"
></script>
<script
type=
"text/javascript"
src=
"../model/Workbook.js"
></script>
<script
type=
"text/javascript"
src=
"../model/WorkbookElems.js"
></script>
<script
type=
"text/javascript"
src=
"../model/Serialize.js"
></script>
<script
type=
"text/javascript"
>
AscCommonExcel
.
g_oDefaultFormat
.
FontAbs
=
{};
</script>
<script
type=
"text/javascript"
src=
"../model/FormulaObjects/parserFormula.js"
></script>
<script
type=
"text/javascript"
src=
"../../Common/commonDefines.js"
></script>
<script
type=
"text/javascript"
src=
"../../Common/NumFormat.js"
></script>
<script
type=
"text/javascript"
src=
"../../../web-apps/apps/spreadsheeteditor/sdk_dev_scripts.js"
></script>
<script>
window
.
sdk_dev_scrpipts
.
forEach
(
function
(
item
){
document
.
write
(
'
<script type="text/javascript" src="
'
+
item
+
'
"><
\
/script>
'
);
});
</script>
<script
type=
"text/javascript"
src=
"testsForFWB.html.js"
></script>
...
...
cell/.unit-tests/testsForFWB.html.js
View file @
50e955f7
...
...
@@ -384,4 +384,19 @@ $(function(){
});
test
(
"
;;;
"
,
function
test_empty
()
{
var
numbers
=
[
1
,
-
1
,
0
,
"
q
"
];
var
form
=
new
CellFormat
(
"
;;;
"
);
strictEqual
(
fGetFormatedText
(
form
.
format
(
1
)),
""
,
"
format: ;;;, number: 1
"
);
strictEqual
(
fGetFormatedText
(
form
.
format
(
-
1
)),
""
,
"
format: ;;;, number: -1
"
);
strictEqual
(
fGetFormatedText
(
form
.
format
(
0
)),
""
,
"
format: ;;;, number: 0
"
);
strictEqual
(
fGetFormatedText
(
form
.
format
(
"
q
"
)),
""
,
"
format: ;;;, number: q
"
);
var
form
=
new
CellFormat
(
"
;;
"
);
strictEqual
(
fGetFormatedText
(
form
.
format
(
1
)),
""
,
"
format: ;;, number: 1
"
);
strictEqual
(
fGetFormatedText
(
form
.
format
(
-
1
)),
""
,
"
format: ;;, number: -1
"
);
strictEqual
(
fGetFormatedText
(
form
.
format
(
0
)),
""
,
"
format: ;;, number: 0
"
);
strictEqual
(
fGetFormatedText
(
form
.
format
(
"
q
"
)),
"
q
"
,
"
format: ;;, number: q
"
);
});
});
\ No newline at end of file
common/NumFormat.js
View file @
50e955f7
...
...
@@ -2163,6 +2163,8 @@ function CellFormat(format)
this
.
oNegativeFormat
=
aParsedFormats
[
1
];
this
.
oNullFormat
=
aParsedFormats
[
2
];
this
.
oTextFormat
=
aParsedFormats
[
3
];
//for ';;;' format, if 4 formats exist fourth always used for text
this
.
oTextFormat
.
bTextFormat
=
true
;
}
else
if
(
3
==
nFormatsLength
)
{
...
...
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