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

добавил ф-ию asc_docs_api.prototype.asc_CheckCopy

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68240 954022d7-b5bf-4e40-9824-e11837661b57
parent e04d5e3f
......@@ -439,6 +439,41 @@ function Editor_Copy(api, bCut)
}
*/
}
function Editor_CheckCopy(api, _clipboard, _formats)
{
var sBase64 = null, _data, oDocument;
//TEXT
if (c_oAscClipboardDataFormat.Text & _formats)
{
oDocument = api.WordControl.m_oLogicDocument
_data = oDocument.Get_SelectedText();
_clipboard.pushData(c_oAscClipboardDataFormat.Text, _data)
}
//HTML
if(c_oAscClipboardDataFormat.Html & _formats)
{
var oCopyProcessor = new CopyProcessor(api);
sBase64 = oCopyProcessor.Start();
_data = oCopyProcessor.getInnerHtml();
_clipboard.pushData(c_oAscClipboardDataFormat.Html, _data)
}
//INTERNAL
if(c_oAscClipboardDataFormat.Internal & _formats)
{
if(sBase64 === null)
{
var oCopyProcessor = new CopyProcessor(api);
sBase64 = oCopyProcessor.Start();
}
_data = sBase64;
_clipboard.pushData(c_oAscClipboardDataFormat.Internal, _data)
}
}
function Editor_Copy_Event(e, ElemToSelect)
{
var api = editor;
......
......@@ -1816,6 +1816,10 @@ asc_docs_api.prototype.Paste = function()
}
}
};
asc_docs_api.prototype.asc_CheckCopy = function(_clipboard /* CClipboardData */, _formats)
{
Editor_CheckCopy(this, _clipboard, _formats);
};
asc_docs_api.prototype.Share = function(){
};
......
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