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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 16 14:05:24 UTC 2021


 sfx2/source/appl/appdde.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 67acdf3f1c536079e07afcec6894ed1f8d08b2bd
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Mar 16 14:14:37 2021 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Mar 16 15:04:35 2021 +0100

    loplugin:staticdynamic (clang-cl)
    
    Change-Id: Ifb1ee4a221ddacdf676443ec720c12f6504e2f8a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112576
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index c31ef2bd5e25..0211d8978192 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -149,10 +149,10 @@ bool ImplDdeService::MakeTopic( const OUString& rNm )
                     SfxCallMode::SYNCHRON,
                     { &aName, &aNewView, &aSilent });
 
-            if( dynamic_cast< const SfxViewFrameItem *>( pRet ) &&
-                static_cast<SfxViewFrameItem const *>(pRet)->GetFrame() &&
-                nullptr != ( pShell = static_cast<SfxViewFrameItem const *>(pRet)
-                    ->GetFrame()->GetObjectShell() ) )
+            if( auto const item = dynamic_cast< const SfxViewFrameItem *>( pRet );
+                item &&
+                item->GetFrame() &&
+                nullptr != ( pShell = item->GetFrame()->GetObjectShell() ) )
             {
                 SfxGetpApp()->AddDdeTopic( pShell );
                 bRet = true;


More information about the Libreoffice-commits mailing list