diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-02 10:45:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-02 20:05:25 +0200 |
commit | d9946e6d0ba81071f3e50622e5cae9e2ffc9bfb0 (patch) | |
tree | 795444cdd46cc3f0b93f5363e7699f01b1b974e2 /scripting/source/protocolhandler | |
parent | a3695d24087b7958850d73eee7e665c1d78a041b (diff) |
loplugin:flatten in scripting
Change-Id: I8df38b4b581fb674a050ef32624b22498a8e340f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91549
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting/source/protocolhandler')
-rw-r--r-- | scripting/source/protocolhandler/scripthandler.cxx | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx index 3b3fe4e307ef..ea29661a489a 100644 --- a/scripting/source/protocolhandler/scripthandler.cxx +++ b/scripting/source/protocolhandler/scripthandler.cxx @@ -267,33 +267,33 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification( pDlg->Execute(); } - if ( xListener.is() ) - { - // always call dispatchFinished(), because we didn't load a document but - // executed a macro instead! - css::frame::DispatchResultEvent aEvent; + if ( !xListener.is() ) + return; - aEvent.Source = static_cast< ::cppu::OWeakObject* >( this ); - aEvent.Result = invokeResult; - if ( bSuccess ) - { - aEvent.State = css::frame::DispatchResultState::SUCCESS; - } - else - { - aEvent.State = css::frame::DispatchResultState::FAILURE; - } + // always call dispatchFinished(), because we didn't load a document but + // executed a macro instead! + css::frame::DispatchResultEvent aEvent; - try - { - xListener->dispatchFinished( aEvent ) ; - } - catch(const RuntimeException &) - { - TOOLS_WARN_EXCEPTION("scripting", - "ScriptProtocolHandler::dispatchWithNotification: caught RuntimeException" - "while dispatchFinished" ); - } + aEvent.Source = static_cast< ::cppu::OWeakObject* >( this ); + aEvent.Result = invokeResult; + if ( bSuccess ) + { + aEvent.State = css::frame::DispatchResultState::SUCCESS; + } + else + { + aEvent.State = css::frame::DispatchResultState::FAILURE; + } + + try + { + xListener->dispatchFinished( aEvent ) ; + } + catch(const RuntimeException &) + { + TOOLS_WARN_EXCEPTION("scripting", + "ScriptProtocolHandler::dispatchWithNotification: caught RuntimeException" + "while dispatchFinished" ); } } |