summaryrefslogtreecommitdiffstats
path: root/framework/source/uielement/menubarwrapper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'framework/source/uielement/menubarwrapper.cxx')
-rw-r--r--framework/source/uielement/menubarwrapper.cxx12
1 files changed, 5 insertions, 7 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()