summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-04 12:22:06 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2019-04-10 11:51:09 +0200
commit891eb765c393c0f113e87c0949da9bc01f97584d (patch)
tree40a07ee3f4fdff70944c374a8887a042f9ba9894 /svx/source/svdraw
parent40c20f971fcfc0a303b45f855f7c8547d06394ce (diff)
Resolves: tdf#120754 on undoing an obj insert use its current ordinal
there may have been changes not caught by undo to the object's ordinal, so on use of RemoveObject (or ReplaceObject) call GetOrdNum on the object to get its current position within its parent. We can keep nOrdNum for the desired dest position within the parent for InsertObject Change-Id: I3bdabf387dd630fc1fadaaa1f3d8c05e93865e4f Reviewed-on: https://gerrit.libreoffice.org/70409 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdundo.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index b70efa10699c..d5cc99c4d808 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -723,7 +723,7 @@ void SdrUndoRemoveObj::Redo()
{
ImplUnmarkObject( pObj );
E3DModifySceneSnapRectUpdater aUpdater(pObj);
- pObjList->RemoveObject(nOrdNum);
+ pObjList->RemoveObject(pObj->GetOrdNum());
}
// Trigger PageChangeCall
@@ -745,7 +745,7 @@ void SdrUndoInsertObj::Undo()
{
ImplUnmarkObject( pObj );
- SdrObject* pChkObj= pObjList->RemoveObject(nOrdNum);
+ SdrObject* pChkObj= pObjList->RemoveObject(pObj->GetOrdNum());
DBG_ASSERT(pChkObj==pObj,"UndoInsertObj: RemoveObjNum!=pObj");
}
}
@@ -901,7 +901,7 @@ void SdrUndoReplaceObj::Undo()
SetNewOwner(true);
ImplUnmarkObject( pNewObj );
- pObjList->ReplaceObject(pObj,nOrdNum);
+ pObjList->ReplaceObject(pObj,pNewObj->GetOrdNum());
}
else
{
@@ -919,7 +919,7 @@ void SdrUndoReplaceObj::Redo()
SetNewOwner(false);
ImplUnmarkObject( pObj );
- pObjList->ReplaceObject(pNewObj,nOrdNum);
+ pObjList->ReplaceObject(pNewObj,pObj->GetOrdNum());
}
else