summaryrefslogtreecommitdiff
path: root/vcl/win/window/salframe.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-04-20 08:52:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-04-20 08:52:19 +0200
commit7d84c8c80c5703d69a79388886c9768e916b0410 (patch)
treede6fd5c9c13561f2d7cb50eba1815c89ce366ead /vcl/win/window/salframe.cxx
parentcbf5ec321baed1a95ddfdb385fdc5f52a5d13e61 (diff)
loplugin:simplifybool (clang-cl)
Change-Id: Ic63ebe497d9b9598be389d58cff294df2136ce2f
Diffstat (limited to 'vcl/win/window/salframe.cxx')
-rw-r--r--vcl/win/window/salframe.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index a70262fc68ac..7186fc2953e9 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -3292,9 +3292,9 @@ bool WinSalFrame::MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangT
// Menu key - this key is used to display context menu
// AltGr key - probably it has no sense
rKeyCode = vcl::KeyCode( ImplSalGetKeyCode( vkeycode ),
- (shiftstate & 0x01) ? true : false, // shift
- (shiftstate & 0x02) ? true : false, // ctrl
- (shiftstate & 0x04) ? true : false, // alt
+ (shiftstate & 0x01) != 0, // shift
+ (shiftstate & 0x02) != 0, // ctrl
+ (shiftstate & 0x04) != 0, // alt
false );
bRet = true;
}
@@ -3552,7 +3552,7 @@ static bool ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
aKeyEvt.mnCode &= ~(KEY_MOD1 | KEY_MOD2);
}
- bIgnoreCharMsg = bCharPeek ? true : false;
+ bIgnoreCharMsg = bCharPeek;
bool nRet = pFrame->CallCallback( nEvent, &aKeyEvt );
// independent part only reacts on keyup but Windows does not send
// keyup for VK_HANJA
@@ -4483,9 +4483,9 @@ static LRESULT ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam )
COLORREF clrPrevText, clrPrevBkgnd;
HFONT hfntOld;
HBRUSH hbrOld;
- bool fChecked = (pDI->itemState & ODS_CHECKED) ? true : false;
- bool fSelected = (pDI->itemState & ODS_SELECTED) ? true : false;
- bool fDisabled = (pDI->itemState & (ODS_DISABLED | ODS_GRAYED)) ? true : false;
+ bool fChecked = (pDI->itemState & ODS_CHECKED);
+ bool fSelected = (pDI->itemState & ODS_SELECTED);
+ bool fDisabled = (pDI->itemState & (ODS_DISABLED | ODS_GRAYED));
// Set the appropriate foreground and background colors.
RECT aRect = pDI->rcItem;