diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-27 09:11:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-27 11:02:56 +0200 |
commit | cc1ed7fbce20f90650f96acc2846b6f232c8ab0f (patch) | |
tree | fcd441cdf9568861363894f63107967adf571f81 /framework/source/uielement | |
parent | b50f595b34585f2927adfd44b4eaaafb8f600972 (diff) |
loplugin:flatten in various
Change-Id: I42dca691ffadbddad38a7e8f978b1da9d5d9a7b0
Reviewed-on: https://gerrit.libreoffice.org/42842
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/uielement')
-rw-r--r-- | framework/source/uielement/menubarwrapper.cxx | 12 | ||||
-rw-r--r-- | framework/source/uielement/statusbarwrapper.cxx | 23 |
2 files changed, 16 insertions, 19 deletions
diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx index 9fc4ccee6167..68357213e697 100644 --- a/framework/source/uielement/menubarwrapper.cxx +++ b/framework/source/uielement/menubarwrapper.cxx @@ -277,14 +277,12 @@ Any SAL_CALL MenuBarWrapper::getByName( fillPopupControllerCache(); PopupControllerCache::const_iterator pIter = m_aPopupControllerCache.find( aName ); - if ( pIter != m_aPopupControllerCache.end() ) - { - uno::Reference< frame::XDispatchProvider > xDispatchProvider; - xDispatchProvider = pIter->second.m_xDispatchProvider; - return uno::makeAny( xDispatchProvider ); - } - else + if ( pIter == m_aPopupControllerCache.end() ) throw container::NoSuchElementException(); + + uno::Reference< frame::XDispatchProvider > xDispatchProvider; + xDispatchProvider = pIter->second.m_xDispatchProvider; + return uno::makeAny( xDispatchProvider ); } Sequence< OUString > SAL_CALL MenuBarWrapper::getElementNames() diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx index 2cf60b555e1a..003d6b5b00ba 100644 --- a/framework/source/uielement/statusbarwrapper.cxx +++ b/framework/source/uielement/statusbarwrapper.cxx @@ -69,19 +69,18 @@ void SAL_CALL StatusBarWrapper::dispose() m_aListenerContainer.disposeAndClear( aEvent ); SolarMutexGuard g; - if ( !m_bDisposed ) - { - if ( m_xStatusBarManager.is() ) - m_xStatusBarManager->dispose(); - m_xStatusBarManager.clear(); - m_xConfigSource.clear(); - m_xConfigData.clear(); - m_xContext.clear(); - - m_bDisposed = true; - } - else + if ( m_bDisposed ) throw DisposedException(); + + if ( m_xStatusBarManager.is() ) + m_xStatusBarManager->dispose(); + m_xStatusBarManager.clear(); + m_xConfigSource.clear(); + m_xConfigData.clear(); + m_xContext.clear(); + + m_bDisposed = true; + } // XInitialization |