summaryrefslogtreecommitdiff
path: root/vcl/source/window/toolbox2.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-25 10:33:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-25 12:15:17 +0200
commita334e85a2f0885b0d931fe80c50c4b3d07af7dd5 (patch)
treeb4e2e73f094bf5a00c930af201822f75ffd9a8ec /vcl/source/window/toolbox2.cxx
parent633bab98427fa3760c67274082283cd36b4508ca (diff)
clang-tidy readability-simplify-boolean-expr in vcl
Change-Id: I10ad38bcb5b05a754de9a396f4aaa79d97458d6f Reviewed-on: https://gerrit.libreoffice.org/36930 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/window/toolbox2.cxx')
-rw-r--r--vcl/source/window/toolbox2.cxx15
1 files changed, 3 insertions, 12 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 4c74017a81f0..171635342747 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -195,14 +195,8 @@ void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbIma
bool bHasText;
// check for image and/or text
- if ( !(maImage) )
- bHasImage = false;
- else
- bHasImage = true;
- if ( maText.isEmpty() )
- bHasText = false;
- else
- bHasText = true;
+ bHasImage = !!maImage;
+ bHasText = !maText.isEmpty();
// prefer images if symbolonly buttons are drawn
// prefer texts if textonly buttons are drawn
@@ -529,10 +523,7 @@ void ToolBox::RemoveItem( ImplToolItems::size_type nPos )
if( nPos < mpData->m_aItems.size() )
{
bool bMustCalc;
- if ( mpData->m_aItems[nPos].meType == ToolBoxItemType::BUTTON )
- bMustCalc = true;
- else
- bMustCalc = false;
+ bMustCalc = mpData->m_aItems[nPos].meType == ToolBoxItemType::BUTTON;
if ( mpData->m_aItems[nPos].mpWindow )
mpData->m_aItems[nPos].mpWindow->Hide();