incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1361092 - /incubator/ooo/trunk/main/sd/source/ui/view/drawview.cxx
Date Fri, 13 Jul 2012 08:33:03 GMT
Author: af
Date: Fri Jul 13 08:33:02 2012
New Revision: 1361092

URL: http://svn.apache.org/viewvc?rev=1361092&view=rev
Log:
#i120172# Add missing undo action for changing index of new PresObj.

          Reported by: Shan Zhu
          Fixed by: Andre Fischer

Modified:
    incubator/ooo/trunk/main/sd/source/ui/view/drawview.cxx

Modified: incubator/ooo/trunk/main/sd/source/ui/view/drawview.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/view/drawview.cxx?rev=1361092&r1=1361091&r2=1361092&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/view/drawview.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/view/drawview.cxx Fri Jul 13 08:33:02 2012
@@ -623,7 +623,14 @@ void DrawView::DeleteMarked()
 					Rectangle aRect( pObj->GetLogicRect() );
 					SdrObject* pNewObj = pPage->InsertAutoLayoutShape( 0, ePresObjKind, bVertical, aRect,
true );
 
-					pPage->SetObjectOrdNum( pNewObj->GetOrdNum(), pObj->GetOrdNum() );
+                    // 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;
 



Mime
View raw message