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

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 30 14:53:13 UTC 2020


 svx/source/sdr/contact/viewcontactofsdrobj.cxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit fdd5d52284a0bda2d3e237b3dc4cbdb20b0d4bcb
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Mar 30 15:02:09 2020 +0100
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Mar 30 16:52:35 2020 +0200

    Use dynamic_cast result
    
    Change-Id: I7f91935e2b0230c17456a810c6e7553a103c04f1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91299
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/svx/source/sdr/contact/viewcontactofsdrobj.cxx b/svx/source/sdr/contact/viewcontactofsdrobj.cxx
index 2d7b73d1650c..6741c3bfe553 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobj.cxx
@@ -106,14 +106,12 @@ ViewContact* ViewContactOfSdrObj::GetParentContact() const
 void ViewContactOfSdrObj::ActionChanged()
 {
     // look for own changes
-    if(dynamic_cast<const SdrTextObj*>( &GetSdrObject() ) != nullptr)
+    if (SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>(&GetSdrObject()))
     {
-        SdrTextObj& rTextObj = static_cast<SdrTextObj&>(GetSdrObject());
-
-        if(rTextObj.GetTextAniKind() != meRememberedAnimationKind)
+        if (pTextObj->GetTextAniKind() != meRememberedAnimationKind)
         {
             // #i38135# now remember new type
-            meRememberedAnimationKind = rTextObj.GetTextAniKind();
+            meRememberedAnimationKind = pTextObj->GetTextAniKind();
         }
     }
 


More information about the Libreoffice-commits mailing list