incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1361131 - in /incubator/ooo/branches/AOO34: ./ main/ main/sd/source/ui/view/drawview.cxx
Date Fri, 13 Jul 2012 09:54:41 GMT
Author: af
Date: Fri Jul 13 09:54:40 2012
New Revision: 1361131

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

Modified:
    incubator/ooo/branches/AOO34/   (props changed)
    incubator/ooo/branches/AOO34/main/   (props changed)
    incubator/ooo/branches/AOO34/main/sd/source/ui/view/drawview.cxx

Propchange: incubator/ooo/branches/AOO34/
------------------------------------------------------------------------------
  Merged /incubator/ooo/trunk:r1361092

Propchange: incubator/ooo/branches/AOO34/main/
------------------------------------------------------------------------------
  Merged /incubator/ooo/trunk/main:r1361092

Modified: incubator/ooo/branches/AOO34/main/sd/source/ui/view/drawview.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/sd/source/ui/view/drawview.cxx?rev=1361131&r1=1361130&r2=1361131&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/sd/source/ui/view/drawview.cxx (original)
+++ incubator/ooo/branches/AOO34/main/sd/source/ui/view/drawview.cxx Fri Jul 13 09:54:40 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