diff options
author | Noel Grandin <noel@peralex.com> | 2021-03-18 16:24:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-18 20:44:12 +0100 |
commit | 7385ce6ac788335f15744c104c2b4e095ce90ce8 (patch) | |
tree | 73efbece2ead8ff3f0d1d9821378b67c6457a455 /svx/source/svdraw | |
parent | 5d74ca4eb1a1cf3e4478c3f25c12052a06e62668 (diff) |
elide SetParentAtSdrObjectFromSdrObjList
the indirection just makes the code harder to follow
Change-Id: I4046a822972d729ecfc9a9897bfdac146519dbd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112678
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svdpage.cxx | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index d07f40e4f701..c614928f2537 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -60,14 +60,6 @@ using namespace ::com::sun::star; const sal_Int32 InitialObjectContainerCapacity (64); -//////////////////////////////////////////////////////////////////////////////////////////////////// -// helper to allow changing parent at SdrObject, but only from SdrObjList - -void SetParentAtSdrObjectFromSdrObjList(SdrObject& rSdrObject, SdrObjList* pNew) -{ - rSdrObject.setParentOfSdrObject(pNew); -} - ////////////////////////////////////////////////////////////////////////////// SdrObjList::SdrObjList() @@ -305,7 +297,7 @@ void SdrObjList::NbcInsertObject(SdrObject* pObj, size_t nPos) if (nPos<nCount) mbObjOrdNumsDirty=true; pObj->SetOrdNum(nPos); - SetParentAtSdrObjectFromSdrObjList(*pObj, this); + pObj->setParentOfSdrObject(this); // Inform the parent about change to allow invalidations at // evtl. existing parent visualisations @@ -404,7 +396,7 @@ SdrObject* SdrObjList::NbcRemoveObject(size_t nObjNum) // tdf#121022 Do first remove from SdrObjList - InsertedStateChange // relies now on IsInserted which uses getParentSdrObjListFromSdrObject - SetParentAtSdrObjectFromSdrObjList(*pObj, nullptr); + pObj->setParentOfSdrObject(nullptr); // calls UserCall, among other pObj->InsertedStateChange(); @@ -451,7 +443,7 @@ SdrObject* SdrObjList::RemoveObject(size_t nObjNum) // tdf#121022 Do first remove from SdrObjList - InsertedStateChange // relies now on IsInserted which uses getParentSdrObjListFromSdrObject - SetParentAtSdrObjectFromSdrObjList(*pObj, nullptr); + pObj->setParentOfSdrObject(nullptr); // calls, among other things, the UserCall pObj->InsertedStateChange(); @@ -503,7 +495,7 @@ SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, size_t nObjNum) } // Change parent and replace in SdrObjList - SetParentAtSdrObjectFromSdrObjList(*pObj, nullptr); + pObj->setParentOfSdrObject(nullptr); ReplaceObjectInContainer(*pNewObj,nObjNum); // tdf#121022 InsertedStateChange uses the parent @@ -519,7 +511,7 @@ SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, size_t nObjNum) // Setup data at new SdrObject - it already *is* inserted to // the SdrObjList due to 'ReplaceObjectInContainer' above pNewObj->SetOrdNum(nObjNum); - SetParentAtSdrObjectFromSdrObjList(*pNewObj, this); + pNewObj->setParentOfSdrObject(this); // Inform the parent about change to allow invalidations at // evtl. existing parent visualisations, but also react on |