Commit 80449ca9 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

paste desktop editor

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62442 954022d7-b5bf-4e40-9824-e11837661b57
parent 398efbdc
......@@ -314,6 +314,35 @@
},
pasteDesktopEditorButton: function(ElemToSelect)
{
var __onpaste = ElemToSelect.onpaste;
var selection = window.getSelection();
var rangeToSelect = window.document.createRange();
rangeToSelect.selectNodeContents(ElemToSelect);
selection.removeAllRanges();
selection.addRange(rangeToSelect);
ElemToSelect.onpaste = function (e) {
if (!window.GlobalPasteFlag)
return;
ElemToSelect.oncopy = __onpaste;
__onpaste = null;
var api = window["Asc"]["editor"];
var wb = api.wb;
var ws = wb.getWorksheet();
wb.clipboard._bodyPaste(ws, e);
};
ElemToSelect.focus();
window["AscDesktopEditor"]["Paste"]();
},
//****copy cells ****
copyRange: function (range, worksheet, isCut) {
var t = this;
......@@ -650,7 +679,9 @@
pasteRange: function (worksheet) {
var t = this;
if(AscBrowser.isMozilla)
if (window["AscDesktopEditorButtonMode"] === true && window["AscDesktopEditor"])
t.pasteDesktopEditorButton(t._editorPasteGetElem(worksheet, true));
else if(AscBrowser.isMozilla)
t._editorPaste(worksheet,t._getStylesSelect);
else
t._editorPaste(worksheet);
......
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