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
e4e77f82
Commit
e4e77f82
authored
Mar 24, 2017
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 34495
parent
ef8f97e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
8 deletions
+25
-8
cell/model/WorkbookElems.js
cell/model/WorkbookElems.js
+25
-8
No files found.
cell/model/WorkbookElems.js
View file @
e4e77f82
...
...
@@ -3217,11 +3217,13 @@ CCellValue.prototype =
var
bNeedMeasure
=
true
;
var
sText
=
null
;
var
aText
=
null
;
var
isMultyText
=
false
;
if
(
CellValueType
.
Number
==
this
.
type
||
CellValueType
.
String
==
this
.
type
)
{
if
(
null
!=
this
.
text
)
{
sText
=
this
.
text
;
}
else
if
(
null
!=
this
.
multiText
)
{
aText
=
this
.
multiText
;
isMultyText
=
true
;
}
if
(
CellValueType
.
String
==
this
.
type
)
{
...
...
@@ -3242,16 +3244,19 @@ CCellValue.prototype =
if
(
false
==
oNumFormat
.
isGeneralFormat
())
{
if
(
null
!=
this
.
number
)
{
aText
=
oNumFormat
.
format
(
this
.
number
,
this
.
type
,
dDigitsCount
,
false
,
opt_cultureInfo
);
isMultyText
=
false
;
sText
=
null
;
}
else
if
(
CellValueType
.
String
==
this
.
type
)
{
var
oTextFormat
=
oNumFormat
.
getTextFormat
();
if
(
null
!=
oTextFormat
&&
"
@
"
!=
oTextFormat
.
formatString
)
{
if
(
null
!=
this
.
text
)
{
aText
=
oNumFormat
.
format
(
this
.
text
,
this
.
type
,
dDigitsCount
,
false
,
opt_cultureInfo
);
isMultyText
=
false
;
sText
=
null
;
}
else
if
(
null
!=
this
.
multiText
)
{
var
sSimpleString
=
this
.
getStringFromMultiText
();
aText
=
oNumFormat
.
format
(
sSimpleString
,
this
.
type
,
dDigitsCount
,
false
,
opt_cultureInfo
);
isMultyText
=
false
;
sText
=
null
;
}
}
...
...
@@ -3271,11 +3276,12 @@ CCellValue.prototype =
if
(
null
!=
oNumFormat
)
{
sText
=
null
;
isMultyText
=
false
;
aText
=
oNumFormat
.
format
(
sOriginText
,
this
.
type
,
dDigitsCount
,
false
,
opt_cultureInfo
);
if
(
true
==
oNumFormat
.
isTextFormat
())
{
break
;
}
else
{
aRes
=
this
.
_getValue2Result
(
cell
,
sText
,
aText
);
aRes
=
this
.
_getValue2Result
(
cell
,
sText
,
aText
,
isMultyText
);
//Проверяем влезает ли текст
if
(
true
==
fIsFitMeasurer
(
aRes
))
{
bFindResult
=
true
;
...
...
@@ -3289,6 +3295,7 @@ CCellValue.prototype =
if
(
false
==
bFindResult
)
{
aRes
=
null
;
sText
=
null
;
isMultyText
=
false
;
var
font
=
new
AscCommonExcel
.
Font
();
if
(
dDigitsCount
>
1
)
{
font
.
setRepeat
(
true
);
...
...
@@ -3308,18 +3315,19 @@ CCellValue.prototype =
}
}
if
(
bNeedMeasure
)
{
aRes
=
this
.
_getValue2Result
(
cell
,
sText
,
aText
);
aRes
=
this
.
_getValue2Result
(
cell
,
sText
,
aText
,
isMultyText
);
//Проверяем влезает ли текст
if
(
false
==
fIsFitMeasurer
(
aRes
))
{
aRes
=
null
;
sText
=
null
;
isMultyText
=
false
;
var
font
=
new
AscCommonExcel
.
Font
();
font
.
setRepeat
(
true
);
aText
=
[{
text
:
"
#
"
,
format
:
font
}];
}
}
if
(
null
==
aRes
)
{
aRes
=
this
.
_getValue2Result
(
cell
,
sText
,
aText
);
aRes
=
this
.
_getValue2Result
(
cell
,
sText
,
aText
,
isMultyText
);
}
return
aRes
;
},
...
...
@@ -3415,11 +3423,11 @@ CCellValue.prototype =
else
if
(
null
!=
oValueArray
)
oValueArray
=
[{
text
:
"
'
"
}].
concat
(
oValueArray
);
}
this
.
textValueForEdit2
=
this
.
_getValue2Result
(
cell
,
oValueText
,
oValueArray
);
this
.
textValueForEdit2
=
this
.
_getValue2Result
(
cell
,
oValueText
,
oValueArray
,
true
);
}
return
this
.
textValueForEdit2
;
},
_getValue2Result
:
function
(
cell
,
sText
,
aText
)
_getValue2Result
:
function
(
cell
,
sText
,
aText
,
isMultyText
)
{
var
aResult
=
[];
if
(
null
==
sText
&&
null
==
aText
)
...
...
@@ -3459,9 +3467,18 @@ CCellValue.prototype =
{
oNewItem
.
text
=
oCurtext
.
text
;
var
oCurFormat
=
new
Font
();
oCurFormat
.
assign
(
cellfont
);
if
(
null
!=
oCurtext
.
format
)
oCurFormat
.
assignFromObject
(
oCurtext
.
format
);
if
(
isMultyText
)
{
if
(
null
!=
oCurtext
.
format
)
{
oCurFormat
.
assign
(
oCurtext
.
format
);
}
else
{
oCurFormat
.
assign
(
cellfont
);
}
}
else
{
oCurFormat
.
assign
(
cellfont
);
if
(
null
!=
oCurtext
.
format
)
{
oCurFormat
.
assignFromObject
(
oCurtext
.
format
);
}
}
oNewItem
.
format
=
oCurFormat
;
color
=
oNewItem
.
format
.
getColor
();
if
(
color
instanceof
ThemeColor
)
...
...
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