Commit bad5d825 authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix Bug 35407

parent 447cb2e5
......@@ -154,6 +154,18 @@ CCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, AdditionalIn
"guid": Class.Get_Id()
};
}
else if(Class instanceof AscCommon.CComment){
if(Class.Parent && Class.Parent.slide){
check_obj =
{
"type": c_oAscLockTypeElemPresentation.Object,
"slideId": Class.Parent.slide.deleteLock.Get_Id(),
"objId": Class.Get_Id(),
"guid": Class.Get_Id()
};
map[Class.Parent.slide.num] = true;
}
}
if(check_obj)
editor.CoAuthoringApi.releaseLocks( check_obj );
}
......@@ -275,6 +287,9 @@ CCollaborativeEditing.prototype.Release_Locks = function()
if(Class instanceof AscCommon.CComment)
{
editor.sync_UnLockComment(Class.Get_Id());
if(Class.Parent && Class.Parent.slide){
map_redraw[Class.Parent.slide.num] = true;
}
}
}
else if ( AscCommon.locktype_Other3 === CurLockType )
......
......@@ -442,6 +442,7 @@ MoveCommentState.prototype =
tracks[i].trackEnd();
}
this.drawingObjects.startRecalculate();
this.drawingObjects.drawingObjects.showDrawingObjects();
}
this.drawingObjects.clearTrackObjects();
this.drawingObjects.updateOverlay();
......
......@@ -918,7 +918,23 @@ CComment.prototype =
Flags |= 2;
}
var dd = editor.WordControl.m_oDrawingDocument;
graphics.DrawPresentationComment(Flags, this.x, this.y, dd.GetCommentWidth(), dd.GetCommentHeight())
var w = dd.GetCommentWidth();
var h = dd.GetCommentHeight();
graphics.DrawPresentationComment(Flags, this.x, this.y, w, h);
var oLock = this.Lock;
if(oLock && AscCommon.locktype_None !== oLock.Get_Type())
{
var bCoMarksDraw = true;
var oApi = editor || Asc['editor'];
if(oApi){
bCoMarksDraw = (!AscCommon.CollaborativeEditing.Is_Fast() || AscCommon.locktype_Mine !== oLock.Get_Type());
}
if(bCoMarksDraw){
graphics.DrawLockObjectRect(oLock.Get_Type(), this.x, this.y, w, h);
return true;
}
}
},
Set_StartInfo: function(PageNum, X, Y, H, ParaId)
......@@ -1055,6 +1071,7 @@ CComment.prototype =
// String : Id колонтитула
Writer.WriteString2( this.Id );
AscFormat.writeObject(Writer, this.Parent);
this.Data.Write_ToBinary2(Writer);
Writer.WriteLong( this.m_oTypeInfo.Type );
......@@ -1072,6 +1089,7 @@ CComment.prototype =
// String : Id колонтитула
this.Id = Reader.GetString2();
this.Parent = AscFormat.readObject(Reader);
this.Data = new CCommentData();
this.Data.Read_FromBinary2(Reader);
this.m_oTypeInfo.Type = Reader.GetLong();
......
......@@ -5430,9 +5430,9 @@ CPresentation.prototype =
if(this.Slides[this.CurPage])
{
History.Create_NewPoint(AscDFH.historydescription_Presentation_AddComment);
var Comment = new CComment( this.Comments, CommentData );
Comment.selected = true;
var slide = this.Slides[this.CurPage];
var Comment = new CComment( slide.slideComments, CommentData );
Comment.selected = true;
var selected_objects = slide.graphicObjects.selection.groupSelection ? slide.graphicObjects.selection.groupSelection.selectedObjects : slide.graphicObjects.selectedObjects;
if(selected_objects.length > 0)
{
......
......@@ -1386,7 +1386,7 @@ Slide.prototype =
_wc.ParceAdditionalData(commentData);
var comment = new CComment(undefined, new CCommentData());
var comment = new CComment(this.slideComments, new CCommentData());
comment.setPosition(_wc.x / 25.4, _wc.y / 25.4);
_comments.push(comment);
}
......
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