Commit b029426d authored by Sergey Luzyanin's avatar Sergey Luzyanin

fix Bug 32765

parent fd5b30c2
......@@ -2647,7 +2647,12 @@ CPresentation.prototype =
}
else if ( e.KeyCode == 68 && false === editor.isViewMode && true === e.CtrlKey )
{
editor.DublicateSlide();
if(this.Slides[this.CurPage]){
this.Create_NewHistoryPoint(AscDFH.historydescription_Document_SetParagraphAlignHotKey);
this.Slides[this.CurPage].copySelectedObjects();
this.Recalculate();
this.Document_UpdateInterfaceState();
}
bRetValue = keydownresult_PreventAll;
}
else if ( e.KeyCode == 69 && false === editor.isViewMode && true === e.CtrlKey )
......
......@@ -948,6 +948,33 @@ Slide.prototype =
return oRet;
},
copySelectedObjects: function(){
var aSelectedObjects, i, fShift = 5.0;
var oSelector = this.graphicObjects.selection.groupSelection ? this.graphicObjects.selection.groupSelection : this.graphicObjects;
aSelectedObjects = [].concat(this.graphicObjects.selectedObjects);
oSelector.resetSelection(undefined, false);
var bGroup = this.graphicObjects.selection.groupSelection ? true : false;
for(i = 0; i < aSelectedObjects.length; ++i){
var oCopy = aSelectedObjects[i].copy();
oCopy.x = aSelectedObjects[i].x;
oCopy.y = aSelectedObjects[i].y;
oCopy.extX = aSelectedObjects[i].extX;
oCopy.extY = aSelectedObjects[i].extY;
AscFormat.CheckSpPrXfrm(oCopy, true);
oCopy.spPr.xfrm.setOffX(oCopy.x + fShift);
oCopy.spPr.xfrm.setOffY(oCopy.y + fShift);
oCopy.setParent(this);
if(!bGroup){
this.addToSpTreeToPos(undefined, oCopy);
}
else{
oCopy.setGroup(oSelector);
oSelector.addToSpTree(undefined, oCopy);
}
oSelector.selectObject(oCopy, 0);
}
},
Get_AllImageUrls: function(images)
{
if(this.cSld.Bg && this.cSld.Bg.bgPr && this.cSld.Bg.bgPr.Fill && this.cSld.Bg.bgPr.Fill.fill instanceof AscFormat.CBlipFill && typeof this.cSld.Bg.bgPr.Fill.fill.RasterImageId === "string" )
......
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