From 680a5290a0c7c1caf85641251a40664247e83129 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 10 Jan 2014 17:08:30 +0100 Subject: Use proper bool operations Change-Id: I758a84205044e51f1af6b18f145e2033f32921e1 --- svtools/source/contnr/treelistbox.cxx | 4 ++-- svtools/source/control/ruler.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'svtools') diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index d1ec6dca4f3b..018fcbde7d29 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -3085,8 +3085,8 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT sal_Bool bInUse = pEntry->HasInUseEmphasis(); // if a ClipRegion was set from outside, we don't have to reset it const WinBits nWindowStyle = GetStyle(); - const sal_Bool bResetClipRegion = !bHasClipRegion; - const sal_Bool bHideSelection = ((nWindowStyle & WB_HIDESELECTION) && !HasFocus())!=0; + const bool bResetClipRegion = !bHasClipRegion; + const bool bHideSelection = (nWindowStyle & WB_HIDESELECTION) !=0 && !HasFocus(); const StyleSettings& rSettings = GetSettings().GetStyleSettings(); Font aHighlightFont( GetFont() ); diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 6b74fdcde375..d4a72f940511 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -1535,7 +1535,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, nStyle &= RULER_INDENT_STYLE; n1 = mpData->pIndents[i-1].nPos; - if ( (nStyle == RULER_INDENT_BOTTOM) ^ (!bIsHori) ) + if ( (nStyle == RULER_INDENT_BOTTOM) != !bIsHori ) { aRect.Left() = n1-nIndentWidth2; aRect.Right() = n1+nIndentWidth2; -- cgit