Commit 2e9a959e authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix Bug 35018

parent bab5349a
...@@ -8191,24 +8191,17 @@ DrawingObjectsController.prototype = ...@@ -8191,24 +8191,17 @@ DrawingObjectsController.prototype =
} }
}, },
checkSelectedObjectsAndCallback: function(callback, args, bNoSendProps, nHistoryPointType, bCheckConnectors) checkSelectedObjectsAndCallback: function(callback, args, bNoSendProps, nHistoryPointType, aAdditionalObjects)
{ {
var selection_state = this.getSelectionState(); var selection_state = this.getSelectionState();
this.drawingObjects.objectLocker.reset(); this.drawingObjects.objectLocker.reset();
var oMapId = {};
for(var i = 0; i < this.selectedObjects.length; ++i) for(var i = 0; i < this.selectedObjects.length; ++i)
{ {
this.drawingObjects.objectLocker.addObjectId(this.selectedObjects[i].Get_Id()); this.drawingObjects.objectLocker.addObjectId(this.selectedObjects[i].Get_Id());
oMapId[this.selectedObjects[i].Get_Id()] = true;
} }
if(bCheckConnectors){ if(aAdditionalObjects){
var _aDrawings = this.selection.groupSelection ? this.selection.groupSelection.selectedObjects : this.selectedObjects; for(var i = 0; i < aAdditionalObjects.length; ++i){
var _aConnectors = []; this.drawingObjects.objectLocker.addObjectId(aAdditionalObjects[i].Get_Id());
this.getAllConnectorsByDrawings(_aDrawings, _aConnectors, undefined, true);
for(var i = 0; i < _aConnectors.length; ++i){
if(!oMapId[_aConnectors[i].Get_Id()]){
this.drawingObjects.objectLocker.addObjectId(_aConnectors[i].Get_Id());
}
} }
} }
var _this = this; var _this = this;
......
This diff is collapsed.
...@@ -310,7 +310,7 @@ function ResizeTrackShapeImage(originalObject, cardDirection, drawingsController ...@@ -310,7 +310,7 @@ function ResizeTrackShapeImage(originalObject, cardDirection, drawingsController
this.resizedRot = originalObject.rot; this.resizedRot = originalObject.rot;
this.transform = originalObject.transform.CreateDublicate(); this.transform = originalObject.transform.CreateDublicate();
this.geometry = (function(){ return originalObject.getGeom();})(); this.geometry = AscFormat.ExecuteNoHistory(function(){ return originalObject.getGeom().createDuplicate();}, this, []);
if(!originalObject.isChart()) if(!originalObject.isChart())
{ {
......
...@@ -750,7 +750,7 @@ if(typeof CComments !== "undefined") ...@@ -750,7 +750,7 @@ if(typeof CComments !== "undefined")
if(typeof CPresentation !== "undefined") if(typeof CPresentation !== "undefined")
{ {
CPresentation.prototype.Document_Is_SelectionLocked = function(CheckType, AdditionalData, isIgnoreCanEditFlag) CPresentation.prototype.Document_Is_SelectionLocked = function(CheckType, AdditionalData, isIgnoreCanEditFlag, aAdditionaObjects)
{ {
if (!this.CanEdit() && true !== isIgnoreCanEditFlag) if (!this.CanEdit() && true !== isIgnoreCanEditFlag)
return true; return true;
...@@ -796,6 +796,19 @@ if(typeof CPresentation !== "undefined") ...@@ -796,6 +796,19 @@ if(typeof CPresentation !== "undefined")
}; };
selected_objects[i].Lock.Check(check_obj); selected_objects[i].Lock.Check(check_obj);
} }
if(Array.isArray(aAdditionaObjects)){
for(var i = 0; i < aAdditionaObjects.length; ++i)
{
var check_obj =
{
"type": c_oAscLockTypeElemPresentation.Object,
"slideId": slide_id,
"objId": aAdditionaObjects[i].Get_Id(),
"guid": aAdditionaObjects[i].Get_Id()
};
aAdditionaObjects[i].Lock.Check(check_obj);
}
}
} }
if(CheckType === AscCommon.changestype_AddShape || CheckType === AscCommon.changestype_AddComment) if(CheckType === AscCommon.changestype_AddShape || CheckType === AscCommon.changestype_AddComment)
......
...@@ -115,7 +115,7 @@ DrawingObjectsController.prototype.handleOleObjectDoubleClick = function(drawing ...@@ -115,7 +115,7 @@ DrawingObjectsController.prototype.handleOleObjectDoubleClick = function(drawing
oPresentation.OnMouseUp(e, x, y, pageIndex); oPresentation.OnMouseUp(e, x, y, pageIndex);
}; };
DrawingObjectsController.prototype.checkSelectedObjectsAndCallback = function(callback, args, bNoSendProps, nHistoryPointType) DrawingObjectsController.prototype.checkSelectedObjectsAndCallback = function(callback, args, bNoSendProps, nHistoryPointType, aAdditionaObjects)
{ {
var check_type = AscCommon.changestype_Drawing_Props, comment; var check_type = AscCommon.changestype_Drawing_Props, comment;
if(this.drawingObjects.slideComments) if(this.drawingObjects.slideComments)
...@@ -127,7 +127,7 @@ DrawingObjectsController.prototype.checkSelectedObjectsAndCallback = function(ca ...@@ -127,7 +127,7 @@ DrawingObjectsController.prototype.checkSelectedObjectsAndCallback = function(ca
comment = comment.Get_Id(); comment = comment.Get_Id();
} }
} }
if(editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(check_type, comment) === false) if(editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(check_type, comment, undefined, aAdditionaObjects) === false)
{ {
var nPointType = AscFormat.isRealNumber(nHistoryPointType) ? nHistoryPointType : AscDFH.historydescription_CommonControllerCheckSelected; var nPointType = AscFormat.isRealNumber(nHistoryPointType) ? nHistoryPointType : AscDFH.historydescription_CommonControllerCheckSelected;
History.Create_NewPoint(nPointType); History.Create_NewPoint(nPointType);
......
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