summaryrefslogtreecommitdiff
path: root/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-14 16:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-14 20:46:19 +0200
commitbc66bf4608557d757555aef1f46abf8a15c3538b (patch)
tree92d1f64c49ad464c26cb33b0044fdf54efa7cdf5 /desktop/source/deployment/gui/dp_gui_theextmgr.cxx
parentd72f963c0de0c2e48f1dc999cd8687e13a1f676f (diff)
loplugin:flatten in desktop
Change-Id: I1ab39e041025692cac06eb6602787f16a3a9cb0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92198 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source/deployment/gui/dp_gui_theextmgr.cxx')
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx62
1 files changed, 31 insertions, 31 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 446c4ae06571..66600848abd2 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -262,25 +262,25 @@ bool TheExtensionManager::installPackage( const OUString &rPackageURL, bool bWar
void TheExtensionManager::terminateDialog()
{
- if ( ! dp_misc::office_is_running() )
+ if ( dp_misc::office_is_running() )
+ return;
+
+ const SolarMutexGuard guard;
+ if (m_xExtMgrDialog)
{
- const SolarMutexGuard guard;
- if (m_xExtMgrDialog)
+ if (m_bExtMgrDialogExecuting)
+ m_xExtMgrDialog->response(RET_CANCEL);
+ else
{
- if (m_bExtMgrDialogExecuting)
- m_xExtMgrDialog->response(RET_CANCEL);
- else
- {
- m_xExtMgrDialog->Close();
- m_xExtMgrDialog.reset();
- }
+ m_xExtMgrDialog->Close();
+ m_xExtMgrDialog.reset();
}
- assert(!m_xExtMgrDialog);
- if (m_xUpdReqDialog)
- m_xUpdReqDialog->response(RET_CANCEL);
- assert(!m_xUpdReqDialog);
- Application::Quit();
}
+ assert(!m_xExtMgrDialog);
+ if (m_xUpdReqDialog)
+ m_xUpdReqDialog->response(RET_CANCEL);
+ assert(!m_xUpdReqDialog);
+ Application::Quit();
}
@@ -436,28 +436,28 @@ void TheExtensionManager::disposing( lang::EventObject const & rEvt )
m_xDesktop.clear();
}
- if ( shutDown )
+ if ( !shutDown )
+ return;
+
+ if ( dp_misc::office_is_running() )
{
- if ( dp_misc::office_is_running() )
+ const SolarMutexGuard guard;
+ if (m_xExtMgrDialog)
{
- const SolarMutexGuard guard;
- if (m_xExtMgrDialog)
+ if (m_bExtMgrDialogExecuting)
+ m_xExtMgrDialog->response(RET_CANCEL);
+ else
{
- if (m_bExtMgrDialogExecuting)
- m_xExtMgrDialog->response(RET_CANCEL);
- else
- {
- m_xExtMgrDialog->Close();
- m_xExtMgrDialog.reset();
- }
+ m_xExtMgrDialog->Close();
+ m_xExtMgrDialog.reset();
}
- assert(!m_xExtMgrDialog);
- if (m_xUpdReqDialog)
- m_xUpdReqDialog->response(RET_CANCEL);
- assert(!m_xUpdReqDialog);
}
- s_ExtMgr.clear();
+ assert(!m_xExtMgrDialog);
+ if (m_xUpdReqDialog)
+ m_xUpdReqDialog->response(RET_CANCEL);
+ assert(!m_xUpdReqDialog);
}
+ s_ExtMgr.clear();
}
// XTerminateListener