diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-26 14:37:20 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-11-26 16:45:19 +0100 |
commit | 9f90050aa17a76adef94b4ba2568db2da1bd1b9b (patch) | |
tree | 059ed03f013271da708107f2a3782e331ce44288 /vcl/win/window | |
parent | fa42338091ecd96b637ea52984c2642b89966f44 (diff) |
loplugin:consttobool (clang-cl)
Change-Id: I81fea38cd737a8be74e6ece333ca37cc434a1c33
Reviewed-on: https://gerrit.libreoffice.org/83765
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/win/window')
-rw-r--r-- | vcl/win/window/salframe.cxx | 4 | ||||
-rw-r--r-- | vcl/win/window/salmenu.cxx | 8 | ||||
-rw-r--r-- | vcl/win/window/salobj.cxx | 26 |
3 files changed, 19 insertions, 19 deletions
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index afecae44beaf..2669083506b1 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -3472,7 +3472,7 @@ static bool ImplHandleKeyMsg( HWND hWnd, UINT nMsg, SalKeyEvent aKeyEvt; SalEvent nEvent; MSG aCharMsg; - bool bCharPeek = FALSE; + bool bCharPeek = false; UINT nCharMsg = WM_CHAR; bool bKeyUp = (nMsg == WM_KEYUP) || (nMsg == WM_SYSKEYUP); @@ -3490,7 +3490,7 @@ static bool ImplHandleKeyMsg( HWND hWnd, UINT nMsg, WM_CHAR, WM_CHAR, PM_NOREMOVE | PM_NOYIELD ); if ( bCharPeek && (nDeadChar == aCharMsg.wParam) ) { - bCharPeek = FALSE; + bCharPeek = false; nDeadChar = 0; if ( wParam == VK_BACK ) diff --git a/vcl/win/window/salmenu.cxx b/vcl/win/window/salmenu.cxx index 190f50730474..3e90600c6670 100644 --- a/vcl/win/window/salmenu.cxx +++ b/vcl/win/window/salmenu.cxx @@ -36,9 +36,9 @@ static DWORD myerr=0; bool SalData::IsKnownMenuHandle( HMENU hMenu ) { if( mhMenuSet.find( hMenu ) == mhMenuSet.end() ) - return FALSE; + return false; else - return TRUE; + return true; } // WinSalInst factory methods @@ -115,7 +115,7 @@ static void ImplDrawMenuBar( SalMenu *pMenu ) WinSalMenu::WinSalMenu() { mhMenu = nullptr; - mbMenuBar = FALSE; + mbMenuBar = false; mhWnd = nullptr; mpParentMenu = nullptr; } @@ -139,7 +139,7 @@ bool WinSalMenu::VisibleMenuBar() // and the application will properly react to all native // menu messages. - return FALSE; + return false; } void WinSalMenu::SetFrame( const SalFrame *pFrame ) diff --git a/vcl/win/window/salobj.cxx b/vcl/win/window/salobj.cxx index e01dc072bfa3..0cf2fa8ada37 100644 --- a/vcl/win/window/salobj.cxx +++ b/vcl/win/window/salobj.cxx @@ -35,20 +35,20 @@ static bool ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild ) { if ( hWndParent == hWndChild ) - return TRUE; + return true; HWND hTempWnd = ::GetParent( hWndChild ); while ( hTempWnd ) { // stop searching if not a child window if ( !(GetWindowStyle( hTempWnd ) & WS_CHILD) ) - return FALSE; + return false; if ( hTempWnd == hWndParent ) - return TRUE; + return true; hTempWnd = ::GetParent( hTempWnd ); } - return FALSE; + return false; } WinSalObject* ImplFindSalObject( HWND hWndChild ) @@ -174,20 +174,20 @@ bool ImplSalPreDispatchMsg( const MSG* pMsg ) // process KeyEvents even if the control does not process them itself // SysKeys are processed as WM_SYSCOMMAND // Char-Events are not processed, as they are not accelerator-relevant - bool bWantedKeyCode = FALSE; + bool bWantedKeyCode = false; // A-Z, 0-9 only when combined with the Control-key if ( ((pMsg->wParam >= 65) && (pMsg->wParam <= 90)) || ((pMsg->wParam >= 48) && (pMsg->wParam <= 57)) ) { if ( GetKeyState( VK_CONTROL ) & 0x8000 ) - bWantedKeyCode = TRUE; + bWantedKeyCode = true; } else if ( ((pMsg->wParam >= VK_F1) && (pMsg->wParam <= VK_F24)) || ((pMsg->wParam >= VK_SPACE) && (pMsg->wParam <= VK_HELP)) || (pMsg->wParam == VK_BACK) || (pMsg->wParam == VK_TAB) || (pMsg->wParam == VK_CLEAR) || (pMsg->wParam == VK_RETURN) || (pMsg->wParam == VK_ESCAPE) ) - bWantedKeyCode = TRUE; + bWantedKeyCode = true; if ( bWantedKeyCode ) { ImplSalYieldMutexAcquireWithWait(); @@ -208,7 +208,7 @@ bool ImplSalPreDispatchMsg( const MSG* pMsg ) ((nKeyCode >= 65) && (nKeyCode <= 90)) || ((nKeyCode >= 97) && (nKeyCode <= 122)) ) { - bool bRet = FALSE; + bool bRet = false; ImplSalYieldMutexAcquireWithWait(); pObject = ImplFindSalObject( pMsg->hwnd ); if ( pObject ) @@ -219,19 +219,19 @@ bool ImplSalPreDispatchMsg( const MSG* pMsg ) if ( pFrame ) { if ( ImplHandleSalObjSysCharMsg( pFrame->mhWnd, pMsg->wParam, pMsg->lParam ) ) - bRet = TRUE; + bRet = true; } } } ImplSalYieldMutexRelease(); if ( bRet ) - return TRUE; + return true; } } else pSalData->mnSalObjWantKeyEvt = 0; - return FALSE; + return false; } void ImplSalPostDispatchMsg( const MSG* pMsg ) @@ -619,7 +619,7 @@ void WinSalObject::BeginSetClipRegion( sal_uInt32 nRectCount ) mpClipRgnData->rdh.nRgnSize = nRectBufSize; SetRectEmpty( &(mpClipRgnData->rdh.rcBound) ); mpNextClipRect = reinterpret_cast<RECT*>(&(mpClipRgnData->Buffer)); - mbFirstClipRect = TRUE; + mbFirstClipRect = true; } void WinSalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) @@ -635,7 +635,7 @@ void WinSalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight pBoundRect->top = nY; pBoundRect->right = nRight; pBoundRect->bottom = nBottom; - mbFirstClipRect = FALSE; + mbFirstClipRect = false; } else { |