Commit 7817e46f authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix paste from html

parent ace70bdf
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
* Import * Import
* ----------------------------------------------------------------------------- * -----------------------------------------------------------------------------
*/ */
var g_fontApplication = AscFonts.g_fontApplication;
var c_oAscBorderStyles = AscCommon.c_oAscBorderStyles; var c_oAscBorderStyles = AscCommon.c_oAscBorderStyles;
var c_oAscMaxCellOrCommentLength = Asc.c_oAscMaxCellOrCommentLength; var c_oAscMaxCellOrCommentLength = Asc.c_oAscMaxCellOrCommentLength;
var doc = window.document; var doc = window.document;
...@@ -1293,7 +1292,7 @@ ...@@ -1293,7 +1292,7 @@
if(node == undefined) if(node == undefined)
return; return;
var binaryResult, pasteFragment = node, t = this, localStorageResult; var binaryResult, t = this;
t.alreadyLoadImagesOnServer = false; t.alreadyLoadImagesOnServer = false;
//****binary**** //****binary****
...@@ -1301,7 +1300,6 @@ ...@@ -1301,7 +1300,6 @@
{ {
onlyFromLocalStorage = null; onlyFromLocalStorage = null;
node = this.element; node = this.element;
pasteFragment = node;
} }
//если находимся внутри шейпа //если находимся внутри шейпа
...@@ -1321,26 +1319,24 @@ ...@@ -1321,26 +1319,24 @@
//****binary**** //****binary****
if(copyPasteUseBinary) if(copyPasteUseBinary)
{ {
this.activeRange = worksheet.activeRange.clone(true); this.activeRange = worksheet.model.selectionRange.getLast().clone();
binaryResult = this._pasteFromBinaryClassHtml(worksheet, node, onlyFromLocalStorage, isIntoShape); binaryResult = this._pasteFromBinaryClassHtml(worksheet, node, onlyFromLocalStorage, isIntoShape);
if(binaryResult === true) if(binaryResult === true)
return; return;
else if(binaryResult !== false && binaryResult != undefined) else if(binaryResult !== false && binaryResult != undefined)
{ {
pasteFragment = binaryResult;
node = binaryResult; node = binaryResult;
} }
} }
this.activeRange = worksheet.activeRange.clone(true); this.activeRange = worksheet.model.selectionRange.getLast().clone();
var callBackAfterLoadImages = function() var callBackAfterLoadImages = function()
{ {
History.TurnOff(); History.TurnOff();
var oPasteProcessor;
var oTempDrawingDocument = worksheet.model.DrawingDocument; var oTempDrawingDocument = worksheet.model.DrawingDocument;
var newCDocument = new CDocument(oTempDrawingDocument, false); var newCDocument = new CDocument(oTempDrawingDocument, false);
newCDocument.bFromDocument = true; newCDocument.bFromDocument = true;
...@@ -1354,7 +1350,7 @@ ...@@ -1354,7 +1350,7 @@
oOldEditor = editor; oOldEditor = editor;
editor = {WordControl: oTempDrawingDocument, isDocumentEditor: true}; editor = {WordControl: oTempDrawingDocument, isDocumentEditor: true};
var oPasteProcessor = new AscCommon.PasteProcessor({WordControl:{m_oLogicDocument: newCDocument}, FontLoader: {}}, false, false); var oPasteProcessor = new AscCommon.PasteProcessor({WordControl:{m_oLogicDocument: newCDocument}, FontLoader: {}}, false, false);
oPasteProcessor._Prepeare_recursive(node, true, true) oPasteProcessor._Prepeare_recursive(node, true, true);
oPasteProcessor._Execute(node, {}, true, true, false); oPasteProcessor._Execute(node, {}, true, true, false);
editor = oOldEditor; editor = oOldEditor;
...@@ -2382,7 +2378,7 @@ ...@@ -2382,7 +2378,7 @@
_paste : function(worksheet, pasteData) _paste : function(worksheet, pasteData)
{ {
var documentContent = pasteData.content; var documentContent = pasteData.content;
var activeRange = worksheet.activeRange.clone(true); var activeRange = worksheet.model.selectionRange.getLast().clone();
if(pasteData.images && pasteData.images.length) if(pasteData.images && pasteData.images.length)
this.isUsuallyPutImages = true; this.isUsuallyPutImages = true;
......
This diff is collapsed.
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