Commit 5d28a506 authored by Ilya Kirillov's avatar Ilya Kirillov

Now we copy all objects that we drag. So there is no need in locks for...

Now we copy all objects that we drag. So there is no need in locks for drag-n-drop action in the fast collaboration mode.
parent 2cb853ed
...@@ -754,7 +754,6 @@ CWordCollaborativeEditing.prototype.Undo = function() ...@@ -754,7 +754,6 @@ CWordCollaborativeEditing.prototype.Undo = function()
} }
editor.CoAuthoringApi.saveChanges(aSendingChanges, null, null); editor.CoAuthoringApi.saveChanges(aSendingChanges, null, null);
this.private_RestoreDocumentState(DocState); this.private_RestoreDocumentState(DocState);
oLogicDocument.DrawingObjects.TurnOnCheckChartSelection(); oLogicDocument.DrawingObjects.TurnOnCheckChartSelection();
......
...@@ -5499,7 +5499,7 @@ CDocument.prototype.On_DragTextEnd = function(NearPos, bCopy) ...@@ -5499,7 +5499,7 @@ CDocument.prototype.On_DragTextEnd = function(NearPos, bCopy)
Type : changestype_2_ElementsArray_and_Type, Type : changestype_2_ElementsArray_and_Type,
Elements : [Para], Elements : [Para],
CheckType : changestype_Paragraph_Content CheckType : changestype_Paragraph_Content
})) }, true))
{ {
// Если надо удаляем выделенную часть (пересчет отключаем на время удаления) // Если надо удаляем выделенную часть (пересчет отключаем на время удаления)
if (true !== bCopy) if (true !== bCopy)
......
...@@ -535,7 +535,7 @@ MoveInlineObject.prototype = ...@@ -535,7 +535,7 @@ MoveInlineObject.prototype =
var new_check_paragraph = this.majorObject.parent.checkShapeChildAndGetTopParagraph(this.InlinePos.Paragraph); var new_check_paragraph = this.majorObject.parent.checkShapeChildAndGetTopParagraph(this.InlinePos.Paragraph);
if(parent_paragraph !== new_check_paragraph) if(parent_paragraph !== new_check_paragraph)
check_paragraphs.push(new_check_paragraph); check_paragraphs.push(new_check_paragraph);
if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : check_paragraphs, CheckType : AscCommon.changestype_Paragraph_Content})) if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : check_paragraphs, CheckType : AscCommon.changestype_Paragraph_Content}, true))
{ {
History.Create_NewPoint(AscDFH.historydescription_Document_MoveInlineObject); History.Create_NewPoint(AscDFH.historydescription_Document_MoveInlineObject);
this.majorObject.parent.OnEnd_MoveInline(this.InlinePos); this.majorObject.parent.OnEnd_MoveInline(this.InlinePos);
...@@ -544,7 +544,7 @@ MoveInlineObject.prototype = ...@@ -544,7 +544,7 @@ MoveInlineObject.prototype =
else else
{ {
check_paragraphs.push(this.majorObject.parent.checkShapeChildAndGetTopParagraph(this.InlinePos.Paragraph)); check_paragraphs.push(this.majorObject.parent.checkShapeChildAndGetTopParagraph(this.InlinePos.Paragraph));
if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : check_paragraphs, CheckType : AscCommon.changestype_Paragraph_Content})) if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : check_paragraphs, CheckType : AscCommon.changestype_Paragraph_Content}, true))
{ {
History.Create_NewPoint(AscDFH.historydescription_Document_CopyAndMoveInlineObject); History.Create_NewPoint(AscDFH.historydescription_Document_CopyAndMoveInlineObject);
var new_para_drawing = new ParaDrawing(this.majorObject.parent.Extent.W, this.majorObject.parent.Extent.H, null, this.drawingObjects.drawingDocument, null, null); var new_para_drawing = new ParaDrawing(this.majorObject.parent.Extent.W, this.majorObject.parent.Extent.H, null, this.drawingObjects.drawingDocument, null, null);
...@@ -711,7 +711,7 @@ RotateState.prototype = ...@@ -711,7 +711,7 @@ RotateState.prototype =
} }
} }
} }
if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : aCheckParagraphs, CheckType : AscCommon.changestype_Paragraph_Content})) if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : aCheckParagraphs, CheckType : AscCommon.changestype_Paragraph_Content}, true))
{ {
History.Create_NewPoint(AscDFH.historydescription_Document_RotateFlowDrawingNoCtrl); History.Create_NewPoint(AscDFH.historydescription_Document_RotateFlowDrawingNoCtrl);
for(i = 0; i < aDrawings.length; ++i) for(i = 0; i < aDrawings.length; ++i)
...@@ -736,8 +736,12 @@ RotateState.prototype = ...@@ -736,8 +736,12 @@ RotateState.prototype =
original.Remove_FromDocument(false); original.Remove_FromDocument(false);
aNearestPos[i].Paragraph.Check_NearestPos(aNearestPos[i]); aNearestPos[i].Paragraph.Check_NearestPos(aNearestPos[i]);
original.Set_XYForAdd(bounds.posX, bounds.posY, aNearestPos[i], pageIndex);
aDrawings[i].Add_ToDocument(aNearestPos[i], false); // Всегда создаем копию при переносе, чтобы не было проблем при совместном редактировании
var originalCopy = original.Copy();
originalCopy.Set_XYForAdd(bounds.posX, bounds.posY, aNearestPos[i], pageIndex);
originalCopy.Add_ToDocument(aNearestPos[i], false);
original.DocumentContent.Select_DrawingObject(originalCopy.Get_Id());
if(bTrackRevisions){ if(bTrackRevisions){
this.drawingObjects.document.TrackRevisions = true; this.drawingObjects.document.TrackRevisions = true;
......
...@@ -1300,16 +1300,10 @@ ParaDrawing.prototype.OnEnd_MoveInline = function(NearPos) ...@@ -1300,16 +1300,10 @@ ParaDrawing.prototype.OnEnd_MoveInline = function(NearPos)
var RunPr = this.Remove_FromDocument(false); var RunPr = this.Remove_FromDocument(false);
if (this.LogicDocument && this.DocumentContent && true === this.LogicDocument.Is_TrackRevisions()) // При переносе всегда создаем копию, чтобы в совместном редактировании не было проблем
{
var NewParaDrawing = this.Copy(); var NewParaDrawing = this.Copy();
NewParaDrawing.Add_ToDocument(NearPos, true, RunPr); NewParaDrawing.Add_ToDocument(NearPos, true, RunPr);
this.DocumentContent.Select_DrawingObject(NewParaDrawing.Get_Id()); this.DocumentContent.Select_DrawingObject(NewParaDrawing.Get_Id());
}
else
{
this.Add_ToDocument(NearPos, true, RunPr);
}
}; };
ParaDrawing.prototype.Get_ParentTextTransform = function() ParaDrawing.prototype.Get_ParentTextTransform = 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