Commit 8c5560df authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

загрузка шрифтов при вставке в шейп

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56400 954022d7-b5bf-4e40-9824-e11837661b57
parent dca16341
...@@ -1640,29 +1640,43 @@ ...@@ -1640,29 +1640,43 @@
_pasteInShape: function(worksheet, node, onlyFromLocalStorage, targetDocContent) _pasteInShape: function(worksheet, node, onlyFromLocalStorage, targetDocContent)
{ {
var oPasteProcessor = new PasteProcessor({WordControl:{m_oLogicDocument: targetDocContent}, FontLoader: {}}, false, false, true, true); var oPasteProcessor = new PasteProcessor({WordControl:{m_oLogicDocument: targetDocContent}, FontLoader: {}}, false, false, true, true);
var newFonts;
if(onlyFromLocalStorage) if(onlyFromLocalStorage)
node = this.lStorage.htmlInShape ? this.lStorage.htmlInShape : this.lStorage; node = this.lStorage.htmlInShape ? this.lStorage.htmlInShape : this.lStorage;
oPasteProcessor._Execute(node, {}, true, true, false);
targetDocContent.Remove(1, true, true);
oPasteProcessor.InsertInPlace(targetDocContent , oPasteProcessor.aContent);
worksheet.objectRender.controller.startRecalculate(); oPasteProcessor._Prepeare_recursive(node, true);
//targetDocContent.Parent.parent.recalculate(); oPasteProcessor.aContent = [];
newFonts = this._convertFonts(oPasteProcessor.oFonts);
/*if(onlyFromLocalStorage) worksheet._loadFonts(newFonts, function () {
oPasteProcessor._Execute(node, {}, true, true, false);
targetDocContent.Remove(1, true, true);
oPasteProcessor.InsertInPlace(targetDocContent , oPasteProcessor.aContent);
worksheet.objectRender.controller.startRecalculate();
window.GlobalPasteFlag = false;
window.GlobalPasteFlagCounter = 0;
})
},
_convertFonts: function(oFonts)
{
var newFonts = {};
var fontName;
for(var i in oFonts)
{ {
if(t.lStorage && t.lStorage.htmlInShape) fontName = oFonts[i].Name;
worksheet.objectRender.controller.curState.textObject.txBody.insertHtml(t.lStorage.htmlInShape); fontName = this._checkFonts(fontName);
} newFonts[fontName] = 1;
else };
worksheet.objectRender.controller.curState.textObject.txBody.insertHtml(node);*/ return newFonts;
window.GlobalPasteFlag = false;
window.GlobalPasteFlagCounter = 0;
}, },
_editorPasteExec: function (worksheet, node, isText,onlyFromLocalStorage) _editorPasteExec: function (worksheet, node, isText,onlyFromLocalStorage)
......
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