summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-19 13:13:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-19 14:52:50 +0200
commit447a013299d148df12ff17306fff77bb7f85eba1 (patch)
treed577aabfb9b650bc46fdcf2289aae2b1561f1e4e /framework
parent78098b8494be7123bc4a8b50faa13445e5afd8ce (diff)
clang-tidy readability-simplify-boolean-expr in dbaccess..framework
Change-Id: I96e1bd4000f4ade6ccfac53c57653772b249df99 Reviewed-on: https://gerrit.libreoffice.org/36678 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx5
-rw-r--r--framework/source/layoutmanager/uielement.cxx10
-rw-r--r--framework/source/uielement/addonstoolbarmanager.cxx7
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx12
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx5
5 files changed, 9 insertions, 30 deletions
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 45ee6f67f135..d35cbf52bf87 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -418,10 +418,7 @@ bool LayoutManager::implts_isEmbeddedLayoutManager() const
aReadLock.clear();
Reference< awt::XWindow > xFrameContainerWindow = xFrame->getContainerWindow();
- if ( xFrameContainerWindow == xContainerWindow )
- return false;
- else
- return true;
+ return xFrameContainerWindow != xContainerWindow;
}
void LayoutManager::implts_destroyElements()
diff --git a/framework/source/layoutmanager/uielement.cxx b/framework/source/layoutmanager/uielement.cxx
index 4bb67b0f8fb8..44d42cafb186 100644
--- a/framework/source/layoutmanager/uielement.cxx
+++ b/framework/source/layoutmanager/uielement.cxx
@@ -68,10 +68,7 @@ namespace framework
bool bEqual = ( m_aDockedData.m_aPos.X == aUIElement.m_aDockedData.m_aPos.X );
if ( bEqual )
{
- if ( m_bUserActive && !aUIElement.m_bUserActive )
- return true;
- else
- return false;
+ return m_bUserActive && !aUIElement.m_bUserActive;
}
else
return ( m_aDockedData.m_aPos.X <= aUIElement.m_aDockedData.m_aPos.X );
@@ -86,10 +83,7 @@ namespace framework
bool bEqual = ( m_aDockedData.m_aPos.Y == aUIElement.m_aDockedData.m_aPos.Y );
if ( bEqual )
{
- if ( m_bUserActive && !aUIElement.m_bUserActive )
- return true;
- else
- return false;
+ return m_bUserActive && !aUIElement.m_bUserActive;
}
else
return ( m_aDockedData.m_aPos.Y <= aUIElement.m_aDockedData.m_aPos.Y );
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 24e98b0c7233..c44f7090ac8a 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -161,11 +161,8 @@ void SAL_CALL AddonsToolBarManager::dispose()
bool AddonsToolBarManager::MenuItemAllowed( sal_uInt16 nId ) const
{
- if (( nId == MENUITEM_TOOLBAR_VISIBLEBUTTON ) ||
- ( nId == MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR ))
- return false;
- else
- return true;
+ return ( nId != MENUITEM_TOOLBAR_VISIBLEBUTTON ) &&
+ ( nId != MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR );
}
void AddonsToolBarManager::RefreshImages()
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index 9460afbcacfd..2cb2541c6c89 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -57,11 +57,8 @@ static bool isEnumCommand( const OUString& rCommand )
{
INetURLObject aURL( rCommand );
- if (( aURL.GetProtocol() == INetProtocol::Uno ) &&
- ( aURL.GetURLPath().indexOf( '.' ) != -1))
- return true;
-
- return false;
+ return ( aURL.GetProtocol() == INetProtocol::Uno ) &&
+ ( aURL.GetURLPath().indexOf( '.' ) != -1);
}
static OUString getEnumCommand( const OUString& rCommand )
@@ -203,10 +200,7 @@ void GenericToolbarController::statusChanged( const FeatureStateEvent& Event )
{
if ( m_bEnumCommand )
{
- if ( aStrValue == m_aEnumCommand )
- bValue = true;
- else
- bValue = false;
+ bValue = aStrValue == m_aEnumCommand;
m_pToolbar->CheckItem( m_nID, bValue );
if ( bValue )
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index bfc3fe587a23..4fb7f5f45ff0 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -89,10 +89,7 @@ bool CompareToolBarEntry( const ToolBarEntry& aOne, const ToolBarEntry& aTwo )
{
sal_Int32 nComp = aOne.pCollatorWrapper->compareString( aOne.aUIName, aTwo.aUIName );
- if ( nComp < 0 )
- return true;
- else
- return false;
+ return nComp < 0;
}
Reference< XLayoutManager > getLayoutManagerFromFrame( const Reference< XFrame >& rFrame )