summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-11-12 10:32:56 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2024-11-12 12:33:06 +0100
commit859f66b6dc37e3192161e1c5cff6afbd83f3b616 (patch)
treee215b6ba73ed5910d8b10affd97663ac197348b6 /svx/source
parentcb112c1730dc5adb472c48bc2b619a1713397dbe (diff)
Simplify a bit
Change-Id: I970ae0afd01ceb4651c0e7bc722ac43b4e9aa0b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176469 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/svdraw/svdobj.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index fabc748c1975..fb1040eb6b4e 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1834,15 +1834,10 @@ void SdrObject::SetOutlinerParaObject(std::optional<OutlinerParaObject> pTextObj
return;
// Don't do this during import.
- SdrObject* pTopGroupObj = nullptr;
- SdrObject* pParent = getParentSdrObjectFromSdrObject();
- while(pParent)
- {
- pTopGroupObj = pParent;
- pParent = pTopGroupObj->getParentSdrObjectFromSdrObject();
- }
- if (pTopGroupObj)
+ if (SdrObject* pTopGroupObj = getParentSdrObjectFromSdrObject())
{
+ while (SdrObject* pParent = pTopGroupObj->getParentSdrObjectFromSdrObject())
+ pTopGroupObj = pParent;
// A shape was modified, which is in a group shape. Empty the group shape's grab-bag,
// which potentially contains the old text of the shapes in case of diagrams.
pTopGroupObj->SetGrabBagItem(uno::Any(uno::Sequence<beans::PropertyValue>()));