Commit 817bf096 authored by Oleg Korshul's avatar Oleg Korshul

.

parent 6792d8c3
...@@ -1231,14 +1231,27 @@ ...@@ -1231,14 +1231,27 @@
if (this.editorId == c_oEditorId.Word || this.editorId == c_oEditorId.Presentation) if (this.editorId == c_oEditorId.Word || this.editorId == c_oEditorId.Presentation)
{ {
// get default props (method!!!) var textPr = this.get_TextProps();
if (this.LastTextPr) if (textPr)
{ {
if (undefined !== this.LastTextPr.FontSize) if (undefined !== textPr.TextPr.FontSize)
_elem.style.fontSize = this.LastTextPr.FontSize + "pt"; _elem.style.fontSize = textPr.TextPr.FontSize + "pt";
_elem.style.fontWeight = (true === this.LastTextPr.Bold) ? "bold" : "normal"; _elem.style.fontWeight = (true === textPr.TextPr.Bold) ? "bold" : "normal";
_elem.style.fontStyle = (true === this.LastTextPr.Italic) ? "italic" : "normal"; _elem.style.fontStyle = (true === textPr.TextPr.Italic) ? "italic" : "normal";
}
}
else if (this.editorId == c_oEditorId.Spreadsheet)
{
var props = this.asc_getCellInfo();
if (props && props.font)
{
if (undefined != props.font.size)
_elem.style.fontSize = props.font.size + "pt";
_elem.style.fontWeight = (true === props.font.bold) ? "bold" : "normal";
_elem.style.fontStyle = (true === props.font.italic) ? "italic" : "normal";
} }
} }
......
...@@ -1536,8 +1536,6 @@ background-repeat: no-repeat;\ ...@@ -1536,8 +1536,6 @@ background-repeat: no-repeat;\
asc_docs_api.prototype.UpdateTextPr = function(TextPr) asc_docs_api.prototype.UpdateTextPr = function(TextPr)
{ {
this.LastTextPr = TextPr;
if ("undefined" != typeof(TextPr)) if ("undefined" != typeof(TextPr))
{ {
if (TextPr.Color !== undefined) if (TextPr.Color !== undefined)
......
...@@ -1700,7 +1700,6 @@ background-repeat: no-repeat;\ ...@@ -1700,7 +1700,6 @@ background-repeat: no-repeat;\
asc_docs_api.prototype.UpdateTextPr = function(TextPr) asc_docs_api.prototype.UpdateTextPr = function(TextPr)
{ {
this.LastTextPr = TextPr;
if ("undefined" != typeof(TextPr)) if ("undefined" != typeof(TextPr))
{ {
this.sync_BoldCallBack(TextPr.Bold); this.sync_BoldCallBack(TextPr.Bold);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment