[Libreoffice-commits] core.git: sd/source
Andre Fischer
af at apache.org
Mon May 13 01:32:24 PDT 2013
sd/source/ui/view/drawview.cxx | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit e0dfd32be2e4c3ee389b180fd45348fb1b800e9d
Author: Andre Fischer <af at apache.org>
Date: Fri Jul 13 07:33:02 2012 +0000
Resolves: #i120172# Add missing undo action for changing PresObj index
Reported by: Shan Zhu
Fixed by: Andre Fischer
(cherry picked from commit 1289f5be48f50b38b16fb0ad34c7743317e8c79d)
Change-Id: I6c65dbe9bc87a64ebb2b46a9dc2fda855900c810
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index ff7f3c4..0d7839f 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -588,6 +588,13 @@ void DrawView::DeleteMarked()
Rectangle aRect( pObj->GetLogicRect() );
SdrObject* pNewObj = pPage->InsertAutoLayoutShape( 0, ePresObjKind, bVertical, aRect, true );
+ // Move the new PresObj to the position before the
+ // object it will replace.
+ pUndoManager->AddUndoAction(
+ mpDoc->GetSdrUndoFactory().CreateUndoObjectOrdNum(
+ *pNewObj,
+ pNewObj->GetOrdNum(),
+ pObj->GetOrdNum()));
pPage->SetObjectOrdNum( pNewObj->GetOrdNum(), pObj->GetOrdNum() );
bResetLayout = true;
More information about the Libreoffice-commits
mailing list