Commit 4e6b6d8e authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Bug 28226 - Меняется порядок слоев фигур после Cut\Copy-Paste

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60536 954022d7-b5bf-4e40-9824-e11837661b57
parent 8b3a1601
......@@ -3045,6 +3045,7 @@ CPresentation.prototype =
}
else
{
var selector = this.Slides[this.CurPage].graphicObjects.selection.groupSelection ? this.Slides[this.CurPage].graphicObjects.selection.groupSelection : this.Slides[this.CurPage].graphicObjects;
if(selector.selection.chartSelection && selector.selection.chartSelection.selection.title)
{
......@@ -3061,11 +3062,9 @@ CPresentation.prototype =
}
else
{
for(i = 0; i < selector.selectedObjects.length; ++i)
{
var Drawing = selector.selectedObjects[i];
ret.Drawings.push(new DrawingCopyObject(Drawing.copy(), Drawing.x, Drawing.y, Drawing.extX, Drawing.extY, Drawing.getBase64Img()));
}
var bRecursive = isRealObject(this.Slides[this.CurPage].graphicObjects.selection.groupSelection);
var aSpTree = bRecursive ? this.Slides[this.CurPage].graphicObjects.selection.groupSelection.spTree : this.Slides[this.CurPage].cSld.spTree;
collectSelectedObjects(aSpTree, ret.Drawings, bRecursive);
}
}
break;
......@@ -4657,3 +4656,19 @@ CPresentation.prototype =
}
}
};
function collectSelectedObjects(aSpTree, aCollectArray, bRecursive)
{
for(var i = 0; i < aSpTree.length; ++i)
{
if(aSpTree[i].selected)
{
aCollectArray.push(new DrawingCopyObject(aSpTree[i].copy(), aSpTree[i].x, aSpTree[i].y, aSpTree[i].extX, aSpTree[i].extY, aSpTree[i].getBase64Img()));
}
if(bRecursive && aSpTree[i].getObjectType() === historyitem_type_GroupShape)
{
collectSelectedObjects(aSpTree[i].spTree, aCollectArray, bRecursive);
}
}
}
\ No newline at end of file
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