summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-24 12:26:13 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-24 12:36:22 +0200
commit9b8dc2ad4d55a32c937b2e1410c6cfb908739449 (patch)
treec9e44379b8b9dedbdf1733175f0401be3bb751f7 /framework
parentbfef606e61290f4a8acf9bf6495bcf47467ddb06 (diff)
loplugin:simplifybool
Change-Id: I1865fd9c73e83d8305135b67ece3d45997e309f3
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/menubarmanager.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 5981cb376eba..c9eee85bad5e 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -688,7 +688,7 @@ void MenuBarManager::CheckAndAddMenuExtension( Menu* pMenu )
static void lcl_CheckForChildren(Menu* pMenu, sal_uInt16 nItemId)
{
if (PopupMenu* pThisPopup = pMenu->GetPopupMenu( nItemId ))
- pMenu->EnableItem( nItemId, pThisPopup->GetItemCount() ? true : false );
+ pMenu->EnableItem( nItemId, pThisPopup->GetItemCount() != 0 );
}
// vcl handler
@@ -866,7 +866,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
pMenuItemHandler->xPopupMenuController->updatePopupMenu();
bPopupMenu = true;
if (PopupMenu* pThisPopup = pMenu->GetPopupMenu( pMenuItemHandler->nItemId ))
- pMenu->EnableItem( pMenuItemHandler->nItemId, pThisPopup->GetItemCount() ? true : false );
+ pMenu->EnableItem( pMenuItemHandler->nItemId, pThisPopup->GetItemCount() != 0 );
}
lcl_CheckForChildren(pMenu, pMenuItemHandler->nItemId);
@@ -1906,7 +1906,7 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,Menu* pAddonMenu,boo
if ( pPopupMenu )
{
Reference< XDispatchProvider > xDispatchProvider;
- MenuBarManager* pSubMenuManager = new MenuBarManager( m_xContext, rFrame, m_xURLTransformer,xDispatchProvider, aModuleIdentifier, pPopupMenu, _bHandlePopUp ? false : bDeleteChildren, _bHandlePopUp ? false : bDeleteChildren );
+ MenuBarManager* pSubMenuManager = new MenuBarManager( m_xContext, rFrame, m_xURLTransformer,xDispatchProvider, aModuleIdentifier, pPopupMenu, !_bHandlePopUp && bDeleteChildren, !_bHandlePopUp && bDeleteChildren );
Reference< XStatusListener > xSubMenuManager( static_cast< OWeakObject *>( pSubMenuManager ), UNO_QUERY );