Commit 9ae84f4a authored by Igor.Zotov's avatar Igor.Zotov

добавил функцию asc_CheckCopy

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68235 954022d7-b5bf-4e40-9824-e11837661b57
parent b2b435de
......@@ -581,6 +581,12 @@ var editor;
return result;
};
spreadsheet_api.prototype.asc_CheckCopy = function(_clipboard /* CClipboardData */, _formats)
{
var result = this.wb.checkCopyToClipboard(_clipboard, _formats);
return result;
};
spreadsheet_api.prototype.asc_bIsEmptyClipboard = function() {
var result = this.wb.bIsEmptyClipboard();
this.wb.restoreFocus();
......
......@@ -144,7 +144,48 @@
this.element = undefined;
}
},
checkCopyToClipboard: function(ws, _clipboard, _formats)
{
var _data;
var activeRange = ws.getSelectedRange();
var wb = window["Asc"]["editor"].wb;
if(ws.getCellEditMode() === true)//text in cell
{
//only text
var fragments = wb.cellEditor.copySelection();
_data = wb.cellEditor._getFragmentsText(fragments);
_clipboard.pushData(c_oAscClipboardDataFormat.Text, _data)
}
else
{
//TEXT
if (c_oAscClipboardDataFormat.Text & _formats)
{
//_data = ;
//_clipboard.pushData(c_oAscClipboardDataFormat.Text, _data)
}
//HTML
if(c_oAscClipboardDataFormat.Html & _formats)
{
_data = this._makeTableNode(activeRange, ws);
_clipboard.pushData(c_oAscClipboardDataFormat.Html, _data)
}
//INTERNAL
if(c_oAscClipboardDataFormat.Internal & _formats)
{
_data = this._getBinaryForCopy(worksheetView);
_clipboard.pushData(c_oAscClipboardDataFormat.Internal, _data)
}
if(c_oAscClipboardDataFormat.HtmlElement & _formats)
{
}
}
},
copyDesktopEditorButton: function(ElemToSelect, isCut)
{
if (isCut)
......
......@@ -1987,6 +1987,12 @@
}
}
};
WorkbookView.prototype.checkCopyToClipboard = function(_clipboard, _formats) {
var t = this, ws, v;
ws = t.getWorksheet();
t.clipboard.checkCopyToClipboard(ws, _clipboard, _formats);
};
WorkbookView.prototype.undo = function() {
if (!this.getCellEditMode()) {
......
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