sw/source/filter/html/swhtml.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit dff1d54c2d6d84a852f9c2266fec6be1d343af36
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue May 16 20:56:47 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed May 17 00:37:58 2023 +0200

    dynamic_cast followed by static_cast
    
    Change-Id: I2b2105e577184f87723c85ed79533983fdd60405
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151853
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 49e3e9a8abce..cfc4a6df2b98 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2678,14 +2678,14 @@ SwViewShell *SwHTMLParser::CallEndAction( bool 
bChkAction, bool bChkPtr )
     if( !m_pActionViewShell || (bChkAction && 
!m_pActionViewShell->ActionPend()) )
         return m_pActionViewShell;
 
-    if( dynamic_cast< const SwEditShell *>( m_pActionViewShell ) !=  nullptr )
+    if (SwEditShell* pEditShell = 
dynamic_cast<SwEditShell*>(m_pActionViewShell))
     {
         // Already scrolled?, then make sure that the view doesn't move!
         const bool bOldLock = m_pActionViewShell->IsViewLocked();
         m_pActionViewShell->LockView( true );
         const bool bOldEndActionByVirDev = 
m_pActionViewShell->IsEndActionByVirDev();
         m_pActionViewShell->SetEndActionByVirDev( true );
-        static_cast<SwEditShell*>(m_pActionViewShell)->EndAction();
+        pEditShell->EndAction();
         m_pActionViewShell->SetEndActionByVirDev( bOldEndActionByVirDev );
         m_pActionViewShell->LockView( bOldLock );
 

Reply via email to