Commit 635d70c9 authored by Oleg.Korshul's avatar Oleg.Korshul

Delete/ Select/ SelectAll/ Copy/ Paste/ Cut

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58949 954022d7-b5bf-4e40-9824-e11837661b57
parent d81516b2
...@@ -541,6 +541,7 @@ function CDrawingDocument() ...@@ -541,6 +541,7 @@ function CDrawingDocument()
{ {
this.Native = window["native"]; this.Native = window["native"];
this.Api = window.editor; this.Api = window.editor;
this.m_oApi = this.Api;
this.IsLockObjectsEnable = false; this.IsLockObjectsEnable = false;
this.LogicDocument = null; this.LogicDocument = null;
...@@ -605,6 +606,8 @@ CDrawingDocument.prototype = ...@@ -605,6 +606,8 @@ CDrawingDocument.prototype =
{ {
this.m_oWordControl = this; this.m_oWordControl = this;
this.Api = window.editor; this.Api = window.editor;
this.m_oApi = this.Api;
this.m_oApi.DocumentUrl = "";
this.LogicDocument = window.editor.WordControl.m_oLogicDocument; this.LogicDocument = window.editor.WordControl.m_oLogicDocument;
this.LogicDocument.DrawingDocument = this; this.LogicDocument.DrawingDocument = this;
}, },
......
...@@ -4939,12 +4939,12 @@ asc_docs_api.prototype["Native_Editor_Initialize_Settings"] = function(_params) ...@@ -4939,12 +4939,12 @@ asc_docs_api.prototype["Native_Editor_Initialize_Settings"] = function(_params)
asc_docs_api.prototype.Call_Menu_Context_Copy = function() asc_docs_api.prototype.Call_Menu_Context_Copy = function()
{ {
var oCopyProcessor = new CopyProcessor(this, null, true); var oCopyProcessor = new CopyProcessor(this, null, true);
var _binaty_data = oCopyProcessor.getSelectedBinary(); var _binary_data = oCopyProcessor.getSelectedBinary();
var _stream = global_memory_stream_menu; var _stream = global_memory_stream_menu;
_stream["ClearNoAttack"](); _stream["ClearNoAttack"]();
if (!_binaty_data) if (!_binary_data)
{ {
_stream["WriteByte"](255); _stream["WriteByte"](255);
return _stream; return _stream;
...@@ -4963,20 +4963,24 @@ asc_docs_api.prototype.Call_Menu_Context_Copy = function() ...@@ -4963,20 +4963,24 @@ asc_docs_api.prototype.Call_Menu_Context_Copy = function()
// owner format // owner format
_stream["WriteByte"](2); _stream["WriteByte"](2);
_stream["WriteStringA"](_binaty_data.sBase64); _stream["WriteStringA"](_binary_data.sBase64);
_stream["WriteByte"](255); _stream["WriteByte"](255);
return _stream; return _stream;
}; };
asc_docs_api.prototype.Call_Menu_Context_Cut = function() asc_docs_api.prototype.Call_Menu_Context_Cut = function()
{ {
var oCopyProcessor = new CopyProcessor(this, null); var oCopyProcessor = new CopyProcessor(this, null, true);
var _binaty_data = oCopyProcessor.getSelectedBinary(); var _binary_data = oCopyProcessor.getSelectedBinary();
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Remove(1, true, true);
this.WordControl.m_oLogicDocument.Document_UpdateSelectionState();
var _stream = global_memory_stream_menu; var _stream = global_memory_stream_menu;
_stream["ClearNoAttack"](); _stream["ClearNoAttack"]();
if (!_binaty_data) if (!_binary_data)
{ {
_stream["WriteByte"](255); _stream["WriteByte"](255);
return _stream; return _stream;
...@@ -4995,14 +4999,9 @@ asc_docs_api.prototype.Call_Menu_Context_Cut = function() ...@@ -4995,14 +4999,9 @@ asc_docs_api.prototype.Call_Menu_Context_Cut = function()
// owner format // owner format
_stream["WriteByte"](2); _stream["WriteByte"](2);
_stream["WriteStringA"](_binaty_data.sBase64); _stream["WriteStringA"](_binary_data.sBase64);
_stream["WriteByte"](255); _stream["WriteByte"](255);
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Remove(1, true, true);
this.WordControl.m_oLogicDocument.Document_UpdateSelectionState();
return _stream; return _stream;
}; };
asc_docs_api.prototype.Call_Menu_Context_Paste = function(type, param) asc_docs_api.prototype.Call_Menu_Context_Paste = function(type, param)
...@@ -5039,4 +5038,18 @@ asc_docs_api.prototype.Call_Menu_Context_SelectAll = function() ...@@ -5039,4 +5038,18 @@ asc_docs_api.prototype.Call_Menu_Context_SelectAll = function()
{ {
this.WordControl.m_oLogicDocument.Select_All(); this.WordControl.m_oLogicDocument.Select_All();
}; };
asc_docs_api.prototype.pre_Paste = function(_fonts, _images, callback)
{
History.Create_NewPoint();
callback();
};
/************************************************************************/ /************************************************************************/
window.NativeCorrectImageUrlOnPaste = function(url)
{
return url;
};
window.NativeCorrectImageUrlOnCopy = function(url)
{
return url;
};
\ No newline at end of file
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