summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2012-07-13 07:33:02 +0000
committerAndre Fischer <af@apache.org>2012-07-13 07:33:02 +0000
commit1289f5be48f50b38b16fb0ad34c7743317e8c79d (patch)
treeb4c6b029a10072a9d55d4320ec91c3ba2174fc9d /sd
parentc8f323e9d834afeea8ca205459a3ea798c86db10 (diff)
#i120172# Add missing undo action for changing index of new PresObj.
Reported by: Shan Zhu Fixed by: Andre Fischer
Notes
Notes: merged as: e0dfd32be2e4c3ee389b180fd45348fb1b800e9d
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drawview.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index e44c50b7b09d..e21ac28ba707 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -623,6 +623,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;