diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-11-11 15:55:56 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-11-12 09:24:23 +0100 |
commit | d6116e6bdb305e4b345bf35bbd80da9a171dc847 (patch) | |
tree | cc779f8996bf2015e7ea2f8d152ea3e13e3fe1a7 /svx/source | |
parent | 8393267c651d0a3071472a8d6ad9861ed75af38b (diff) |
tdf#163486: PVS: simplify while loop
V654 The condition of loop is always true.
Change-Id: I9c7cc133cf197e899ac7e13ee3cedc97b7c4d0be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176406
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 255dc4018075..fabc748c1975 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -1835,13 +1835,11 @@ void SdrObject::SetOutlinerParaObject(std::optional<OutlinerParaObject> pTextObj // Don't do this during import. SdrObject* pTopGroupObj = nullptr; - if (getParentSdrObjectFromSdrObject()) + SdrObject* pParent = getParentSdrObjectFromSdrObject(); + while(pParent) { - pTopGroupObj = getParentSdrObjectFromSdrObject(); - while (pTopGroupObj->getParentSdrObjectFromSdrObject()) - { - pTopGroupObj = pTopGroupObj->getParentSdrObjectFromSdrObject(); - } + pTopGroupObj = pParent; + pParent = pTopGroupObj->getParentSdrObjectFromSdrObject(); } if (pTopGroupObj) { |