Commit dbb6f65d authored by Oleg Korshul's avatar Oleg Korshul

onlychain plugin bugs

parent f1a25f16
...@@ -184,6 +184,8 @@ ...@@ -184,6 +184,8 @@
// embedded_cut_fonts // embedded_cut_fonts
this.embedded_cut_manager = new CEmbeddedCutFontsLoader(); this.embedded_cut_manager = new CEmbeddedCutFontsLoader();
this.IsLoadDocumentFonts2 = false;
this.put_Api = function(_api) this.put_Api = function(_api)
{ {
this.Api = _api; this.Api = _api;
...@@ -276,6 +278,9 @@ ...@@ -276,6 +278,9 @@
this.LoadDocumentFonts = function(_fonts, is_default) this.LoadDocumentFonts = function(_fonts, is_default)
{ {
if (this.IsLoadDocumentFonts2)
return this.LoadDocumentFonts2(_fonts);
if (this.embedded_cut_manager.bIsCutFontsUse) if (this.embedded_cut_manager.bIsCutFontsUse)
return this.embedded_cut_manager.load_cut_fonts(); return this.embedded_cut_manager.load_cut_fonts();
......
...@@ -285,6 +285,8 @@ function CEditorPage(api) ...@@ -285,6 +285,8 @@ function CEditorPage(api)
} }
this.RequestAnimationOldTime = -1; this.RequestAnimationOldTime = -1;
this.IsInitControl = false;
this.checkBodySize = function() this.checkBodySize = function()
{ {
var off = jQuery("#" + this.Name).offset(); var off = jQuery("#" + this.Name).offset();
...@@ -3447,6 +3449,9 @@ function CEditorPage(api) ...@@ -3447,6 +3449,9 @@ function CEditorPage(api)
this.InitControl = function() this.InitControl = function()
{ {
if (this.IsInitControl)
return;
this.CalculateDocumentSize(); this.CalculateDocumentSize();
if (window["AscDesktopEditor"] && this.m_oDrawingDocument.m_oDocumentRenderer) if (window["AscDesktopEditor"] && this.m_oDrawingDocument.m_oDocumentRenderer)
...@@ -3494,6 +3499,8 @@ function CEditorPage(api) ...@@ -3494,6 +3499,8 @@ function CEditorPage(api)
} }
//this.m_oDrawingDocument.CheckFontCache(); //this.m_oDrawingDocument.CheckFontCache();
this.IsInitControl = true;
}; };
this.OpenDocument = function(info) this.OpenDocument = function(info)
......
...@@ -6911,6 +6911,8 @@ background-repeat: no-repeat;\ ...@@ -6911,6 +6911,8 @@ background-repeat: no-repeat;\
var oField = arrFields[nIndex]; var oField = arrFields[nIndex];
oField.SetValue(arrData[nIndex] ? arrData[nIndex] : ""); oField.SetValue(arrData[nIndex] ? arrData[nIndex] : "");
} }
if (!this.isLongAction())
oLogicDocument.Recalculate_FromStart(); oLogicDocument.Recalculate_FromStart();
}; };
...@@ -7421,11 +7423,14 @@ background-repeat: no-repeat;\ ...@@ -7421,11 +7423,14 @@ background-repeat: no-repeat;\
window["asc_docs_api"].prototype["pluginMethod_OpenFile"] = function(binaryFile, fields, baseUrl) window["asc_docs_api"].prototype["pluginMethod_OpenFile"] = function(binaryFile, fields, baseUrl)
{ {
this.asc_CloseFile(); this.asc_CloseFile();
var oLogicDocument = this.WordControl.m_oLogicDocument;
this.FontLoader.IsLoadDocumentFonts2 = true;
this.OpenDocument2(this.DocumentUrl, binaryFile); this.OpenDocument2(this.DocumentUrl, binaryFile);
if (fields) if (fields)
this.asc_SetBlockChainData(fields); this.asc_SetBlockChainData(fields);
var oLogicDocument = this.WordControl.m_oLogicDocument;
if (oLogicDocument) if (oLogicDocument)
{ {
AscCommon.CollaborativeEditing.Set_GlobalLock(true); AscCommon.CollaborativeEditing.Set_GlobalLock(true);
......
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