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
2f749e6a
Commit
2f749e6a
authored
Sep 14, 2016
by
konovalovsergey
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for bug
fix bug 33092
parent
fa76edbc
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
179 additions
and
165 deletions
+179
-165
cell/model/FormulaObjects/textanddataFunctions.js
cell/model/FormulaObjects/textanddataFunctions.js
+1
-1
cell/model/Workbook.js
cell/model/Workbook.js
+13
-23
cell/model/WorkbookElems.js
cell/model/WorkbookElems.js
+3
-4
common/NumFormat.js
common/NumFormat.js
+160
-137
common/commonDefines.js
common/commonDefines.js
+2
-0
No files found.
cell/model/FormulaObjects/textanddataFunctions.js
View file @
2f749e6a
...
@@ -1717,7 +1717,7 @@ cTEXT.prototype.Calculate = function ( arg ) {
...
@@ -1717,7 +1717,7 @@ cTEXT.prototype.Calculate = function ( arg ) {
var
oFormat
=
oNumFormatCache
.
get
(
arg1
.
toString
()
);
var
oFormat
=
oNumFormatCache
.
get
(
arg1
.
toString
()
);
var
a
=
g_oFormatParser
.
parse
(
arg0
.
getValue
()
+
""
),
aText
;
var
a
=
g_oFormatParser
.
parse
(
arg0
.
getValue
()
+
""
),
aText
;
aText
=
oFormat
.
format
(
a
?
a
.
value
:
arg0
.
getValue
(),
(
arg0
instanceof
cNumber
||
a
)
?
CellValueType
.
Number
:
CellValueType
.
String
,
AscCommon
.
gc_nMaxDigCountView
,
null
);
aText
=
oFormat
.
format
(
a
?
a
.
value
:
arg0
.
getValue
(),
(
arg0
instanceof
cNumber
||
a
)
?
CellValueType
.
Number
:
CellValueType
.
String
,
AscCommon
.
gc_nMaxDigCountView
);
var
text
=
""
;
var
text
=
""
;
for
(
var
i
=
0
,
length
=
aText
.
length
;
i
<
length
;
++
i
)
{
for
(
var
i
=
0
,
length
=
aText
.
length
;
i
<
length
;
++
i
)
{
...
...
cell/model/Workbook.js
View file @
2f749e6a
...
@@ -5993,35 +5993,25 @@ Cell.prototype.setNumFormat=function(val){
...
@@ -5993,35 +5993,25 @@ Cell.prototype.setNumFormat=function(val){
};
};
Cell
.
prototype
.
shiftNumFormat
=
function
(
nShift
,
dDigitsCount
){
Cell
.
prototype
.
shiftNumFormat
=
function
(
nShift
,
dDigitsCount
){
var
bRes
=
false
;
var
bRes
=
false
;
var
bGeneral
=
true
;
var
sNumFormat
;
var
sNumFormat
;
if
(
null
!=
this
.
xfs
&&
null
!=
this
.
xfs
.
num
)
if
(
null
!=
this
.
xfs
&&
null
!=
this
.
xfs
.
num
)
sNumFormat
=
this
.
xfs
.
num
.
getFormat
();
sNumFormat
=
this
.
xfs
.
num
.
getFormat
();
else
else
sNumFormat
=
g_oDefaultFormat
.
Num
.
getFormat
();
sNumFormat
=
g_oDefaultFormat
.
Num
.
getFormat
();
if
(
"
General
"
!=
sNumFormat
)
{
var
oCurNumFormat
=
oNumFormatCache
.
get
(
sNumFormat
);
var
oCurNumFormat
=
oNumFormatCache
.
get
(
sNumFormat
);
if
(
null
!=
oCurNumFormat
&&
false
==
oCurNumFormat
.
isGeneralFormat
())
if
(
null
!=
oCurNumFormat
&&
false
==
oCurNumFormat
.
isGeneralFormat
())
{
{
bGeneral
=
false
;
var
output
=
{};
var
output
=
{};
bRes
=
oCurNumFormat
.
shiftFormat
(
output
,
nShift
);
bRes
=
oCurNumFormat
.
shiftFormat
(
output
,
nShift
);
if
(
true
==
bRes
)
if
(
true
==
bRes
)
{
this
.
setNumFormat
(
output
.
format
);
this
.
setNumFormat
(
output
.
format
);
}
}
}
}
else
if
(
CellValueType
.
Number
==
this
.
oValue
.
type
)
{
if
(
bGeneral
)
{
if
(
CellValueType
.
Number
==
this
.
oValue
.
type
)
{
var
sGeneral
=
AscCommon
.
DecodeGeneralFormat
(
this
.
oValue
.
number
,
this
.
oValue
.
type
,
dDigitsCount
);
var
sGeneral
=
AscCommon
.
DecodeGeneralFormat
(
this
.
oValue
.
number
,
this
.
oValue
.
type
,
dDigitsCount
);
var
oGeneral
=
oNumFormatCache
.
get
(
sGeneral
);
var
oGeneral
=
oNumFormatCache
.
get
(
sGeneral
);
if
(
null
!=
oGeneral
&&
false
==
oGeneral
.
isGeneralFormat
())
if
(
null
!=
oGeneral
&&
false
==
oGeneral
.
isGeneralFormat
())
{
{
var
output
=
{};
var
output
=
{};
bRes
=
oGeneral
.
shiftFormat
(
output
,
nShift
);
bRes
=
oGeneral
.
shiftFormat
(
output
,
nShift
);
if
(
true
==
bRes
)
if
(
true
==
bRes
)
{
this
.
setNumFormat
(
output
.
format
);
this
.
setNumFormat
(
output
.
format
);
}
}
}
}
...
...
cell/model/WorkbookElems.js
View file @
2f749e6a
...
@@ -3065,10 +3065,9 @@ CCellValue.prototype =
...
@@ -3065,10 +3065,9 @@ CCellValue.prototype =
oNumFormat
=
oNumFormatCache
.
get
(
g_oDefaultFormat
.
Num
.
getFormat
());
oNumFormat
=
oNumFormatCache
.
get
(
g_oDefaultFormat
.
Num
.
getFormat
());
if
(
false
==
oNumFormat
.
isGeneralFormat
())
if
(
false
==
oNumFormat
.
isGeneralFormat
())
{
{
var
oAdditionalResult
=
{};
if
(
null
!=
this
.
number
)
if
(
null
!=
this
.
number
)
{
{
aText
=
oNumFormat
.
format
(
this
.
number
,
this
.
type
,
dDigitsCount
,
oAdditionalResult
);
aText
=
oNumFormat
.
format
(
this
.
number
,
this
.
type
,
dDigitsCount
);
sText
=
null
;
sText
=
null
;
}
}
else
if
(
CellValueType
.
String
==
this
.
type
)
else
if
(
CellValueType
.
String
==
this
.
type
)
...
@@ -3076,12 +3075,12 @@ CCellValue.prototype =
...
@@ -3076,12 +3075,12 @@ CCellValue.prototype =
var
oTextFormat
=
oNumFormat
.
getTextFormat
();
var
oTextFormat
=
oNumFormat
.
getTextFormat
();
if
(
null
!=
oTextFormat
&&
"
@
"
!=
oTextFormat
.
formatString
)
{
if
(
null
!=
oTextFormat
&&
"
@
"
!=
oTextFormat
.
formatString
)
{
if
(
null
!=
this
.
text
)
{
if
(
null
!=
this
.
text
)
{
aText
=
oNumFormat
.
format
(
this
.
text
,
this
.
type
,
dDigitsCount
,
oAdditionalResult
);
aText
=
oNumFormat
.
format
(
this
.
text
,
this
.
type
,
dDigitsCount
);
sText
=
null
;
sText
=
null
;
}
}
else
if
(
null
!=
this
.
multiText
)
{
else
if
(
null
!=
this
.
multiText
)
{
var
sSimpleString
=
this
.
getStringFromMultiText
();
var
sSimpleString
=
this
.
getStringFromMultiText
();
aText
=
oNumFormat
.
format
(
sSimpleString
,
this
.
type
,
dDigitsCount
,
oAdditionalResult
);
aText
=
oNumFormat
.
format
(
sSimpleString
,
this
.
type
,
dDigitsCount
);
sText
=
null
;
sText
=
null
;
}
}
}
}
...
...
common/NumFormat.js
View file @
2f749e6a
This diff is collapsed.
Click to expand it.
common/commonDefines.js
View file @
2f749e6a
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
function
(
window
,
undefined
)
function
(
window
,
undefined
)
{
{
var
g_cCharDelimiter
=
String
.
fromCharCode
(
5
);
var
g_cCharDelimiter
=
String
.
fromCharCode
(
5
);
var
g_cGeneralFormat
=
'
General
'
;
var
FONT_THUMBNAIL_HEIGHT
=
(
7
*
96.0
/
25.4
)
>>
0
;
var
FONT_THUMBNAIL_HEIGHT
=
(
7
*
96.0
/
25.4
)
>>
0
;
var
c_oAscMaxColumnWidth
=
255
;
var
c_oAscMaxColumnWidth
=
255
;
var
c_oAscMaxRowHeight
=
409
;
var
c_oAscMaxRowHeight
=
409
;
...
@@ -1418,6 +1419,7 @@
...
@@ -1418,6 +1419,7 @@
window
[
'
AscCommon
'
]
=
window
[
'
AscCommon
'
]
||
{};
window
[
'
AscCommon
'
]
=
window
[
'
AscCommon
'
]
||
{};
window
[
"
AscCommon
"
].
g_cCharDelimiter
=
g_cCharDelimiter
;
window
[
"
AscCommon
"
].
g_cCharDelimiter
=
g_cCharDelimiter
;
window
[
"
AscCommon
"
].
g_cGeneralFormat
=
g_cGeneralFormat
;
window
[
"
AscCommon
"
].
bDate1904
=
false
;
window
[
"
AscCommon
"
].
bDate1904
=
false
;
window
[
"
AscCommon
"
].
c_oAscAdvancedOptionsAction
=
c_oAscAdvancedOptionsAction
;
window
[
"
AscCommon
"
].
c_oAscAdvancedOptionsAction
=
c_oAscAdvancedOptionsAction
;
window
[
"
AscCommon
"
].
DownloadType
=
DownloadType
;
window
[
"
AscCommon
"
].
DownloadType
=
DownloadType
;
...
...
Boris Kocherov
@bk
mentioned in commit
3dbd9a5f
·
May 29, 2017
mentioned in commit
3dbd9a5f
mentioned in commit 3dbd9a5fe5261eff8f99214bbe11a5f49a918275
Toggle commit list
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