[Libreoffice-commits] core.git: svx/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 24 15:25:33 UTC 2021


 svx/source/svdraw/svdobj.cxx |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 566d5be0f26b83f38392a7da928ac6f6e63f0c16
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 24 08:45:03 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Aug 24 17:24:47 2021 +0200

    tidy this a little
    
    Change-Id: Ifa01b39fc7aa3dfd7238b69a0a61bdf1315a3b4a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120949
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 75298438b77b..4364f858211c 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -268,9 +268,9 @@ void SdrObject::ActionChanged() const
 
 SdrPage* SdrObject::getSdrPageFromSdrObject() const
 {
-    if(getParentSdrObjListFromSdrObject())
+    if (SdrObjList* pParentList = getParentSdrObjListFromSdrObject())
     {
-        return getParentSdrObjListFromSdrObject()->getSdrPageFromSdrObjList();
+        return pParentList->getSdrPageFromSdrObjList();
     }
 
     return nullptr;
@@ -901,17 +901,16 @@ OUString SdrObject::GetDescription() const
 
 sal_uInt32 SdrObject::GetOrdNum() const
 {
-    if (nullptr != getParentSdrObjListFromSdrObject())
+    if (SdrObjList* pParentList = getParentSdrObjListFromSdrObject())
     {
-        if (getParentSdrObjListFromSdrObject()->IsObjOrdNumsDirty())
+        if (pParentList->IsObjOrdNumsDirty())
         {
-            getParentSdrObjListFromSdrObject()->RecalcObjOrdNums();
+            pParentList->RecalcObjOrdNums();
         }
     } else const_cast<SdrObject*>(this)->m_nOrdNum=0;
     return m_nOrdNum;
 }
 
-
 void SdrObject::SetOrdNum(sal_uInt32 nNum)
 {
     m_nOrdNum = nNum;


More information about the Libreoffice-commits mailing list