diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-29 11:34:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-29 14:44:37 +0200 |
commit | 9b25614939f7709e3d67949f49c4beeec0cdc534 (patch) | |
tree | c1e25fc743202c1fd8288ef5f8c0332203b1fc5c /framework/source | |
parent | 6647a167400753df45dba788ed793d55ca0be9f8 (diff) |
loplugin:simplifybool in dbaccess..framework
Change-Id: I0d73bb7d8d3fde426edc0a10c0750758b68aceb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95099
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 4 | ||||
-rw-r--r-- | framework/source/uielement/recentfilesmenucontroller.cxx | 6 | ||||
-rw-r--r-- | framework/source/uielement/statusbarmanager.cxx | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index f7ff1e18dbf6..29bc7f3e4643 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -691,8 +691,8 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool ) // There is no dispatch mechanism for the special window list menu items, // because they are handled directly through XFrame->activate!!! // Don't update dispatches for special file menu items. - if ( !( menuItemHandler->nItemId >= START_ITEMID_WINDOWLIST && - menuItemHandler->nItemId < END_ITEMID_WINDOWLIST ) ) + if ( menuItemHandler->nItemId < START_ITEMID_WINDOWLIST || + menuItemHandler->nItemId >= END_ITEMID_WINDOWLIST ) { Reference< XDispatch > xMenuItemDispatch; diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 9b75f3fdb66e..82fe0f361108 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -236,8 +236,8 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > void RecentFilesMenuController::executeEntry( sal_Int32 nIndex ) { - if (!(( nIndex >= 0 ) && - ( nIndex < sal::static_int_cast<sal_Int32>( m_aRecentFilesItems.size() )))) + if (( nIndex < 0 ) || + ( nIndex >= sal::static_int_cast<sal_Int32>( m_aRecentFilesItems.size() ))) return; Sequence< PropertyValue > aArgsList(3); @@ -360,7 +360,7 @@ void SAL_CALL RecentFilesMenuController::dispatch( const OUString aEntryArgStr( "entry=" ); sal_Int32 nEntryArg = aURL.Complete.indexOf( aEntryArgStr, nQueryPart ); sal_Int32 nEntryPos = nEntryArg + aEntryArgStr.getLength(); - if (!(( nEntryArg > 0 ) && ( nEntryPos < aURL.Complete.getLength() ))) + if (( nEntryArg <= 0 ) || ( nEntryPos >= aURL.Complete.getLength() )) return; sal_Int32 nAddArgs = aURL.Complete.indexOf( '&', nEntryPos ); diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index f97becd5d1ff..f49716bc146e 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -532,7 +532,7 @@ void StatusBarManager::UserDraw( const UserDrawEvent& rUDEvt ) sal_uInt16 nId( rUDEvt.GetItemId() ); StatusBarControllerMap::const_iterator it = m_aControllerMap.find( nId ); - if (!(( nId > 0 ) && ( it != m_aControllerMap.end() ))) + if (( nId <= 0 ) || ( it == m_aControllerMap.end() )) return; uno::Reference< frame::XStatusbarController > xController( it->second ); @@ -588,7 +588,7 @@ void StatusBarManager::MouseButton( const MouseEvent& rMEvt ,sal_Bool ( SAL_CALL sal_uInt16 nId = m_pStatusBar->GetItemId( rMEvt.GetPosPixel() ); StatusBarControllerMap::const_iterator it = m_aControllerMap.find( nId ); - if (!(( nId > 0 ) && ( it != m_aControllerMap.end() ))) + if (( nId <= 0 ) || ( it == m_aControllerMap.end() )) return; uno::Reference< frame::XStatusbarController > xController( it->second ); |