Commit c1182d46 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

Undo при быстром совместном редактировании; перенес проверку залоченности в...

Undo при быстром совместном редактировании; перенес проверку залоченности в callback добавления картинки.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66466 954022d7-b5bf-4e40-9824-e11837661b57
parent 1a831037
......@@ -334,7 +334,19 @@ CShowPr.prototype.Copy = function(){
function CPresentation(DrawingDocument)
{
this.History = History;
History.Document = this;
this.IdCounter = g_oIdCounter;
this.TableId = g_oTableId;
this.CollaborativeEditing = (("undefined" !== typeof(CCollaborativeEditing) && CollaborativeEditing instanceof CCollaborativeEditing) ? CollaborativeEditing : null);
this.Api = editor;
//------------------------------------------------------------------------
if (DrawingDocument)
{
if (this.History)
this.History.Set_LogicDocument(this);
if (this.CollaborativeEditing)
this.CollaborativeEditing.m_oLogicDocument = this;
}
//------------------------------------------------------------------------
......@@ -493,6 +505,14 @@ CPresentation.prototype =
},
Get_Api: function(){
return this.Api;
},
Get_CollaborativeEditing: function(){
return this.CollaborativeEditing;
},
addSlideMaster: function(pos, master)
{
History.Add(this, {Type: historyitem_Presentation_AddSlideMaster, pos: pos, master: master});
......
......@@ -4308,8 +4308,6 @@ asc_docs_api.prototype._addImageUrl = function(url) {
};
asc_docs_api.prototype.AddImageUrl = function(url, imgProp)
{
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
if(g_oDocumentUrls.getLocal(url))
{
this.AddImageUrlAction(url, imgProp);
......@@ -4357,12 +4355,13 @@ asc_docs_api.prototype.AddImageUrl = function(url, imgProp)
};
sendCommand2(this, null, rData );
}
}
};
asc_docs_api.prototype.AddImageUrlAction = function(url, imgProp)
{
var _image = this.ImageLoader.LoadImage(url, 1);
if (null != _image)
{
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
var _w = Math.max(1, Page_Width - (X_Left_Margin + X_Right_Margin));
var _h = Math.max(1, Page_Height - (Y_Top_Margin + Y_Bottom_Margin));
......@@ -4406,10 +4405,13 @@ asc_docs_api.prototype.AddImageUrlAction = function(url, imgProp)
this.WordControl.m_oLogicDocument.Add_InlineImage(_w, _h, src, null, true);
}
}
}
else
{
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
this.asyncImageEndLoaded2 = function(_image)
{
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
var _w = Math.max(1, Page_Width - (X_Left_Margin + X_Right_Margin));
var _h = Math.max(1, Page_Height - (Y_Top_Margin + Y_Bottom_Margin));
......@@ -4452,7 +4454,7 @@ asc_docs_api.prototype.AddImageUrlAction = function(url, imgProp)
else
this.WordControl.m_oLogicDocument.Add_InlineImage(_w, _h, src, null, true);
}
}
this.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
this.asyncImageEndLoaded2 = null;
......
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