diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-29 13:14:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-29 14:45:03 +0200 |
commit | 198546d0fae471a8a1808b337008faa8bfa457a7 (patch) | |
tree | dad172ebe0a56c0d400e80f2b06fb0081b23b754 /vcl/source/window | |
parent | 9b25614939f7709e3d67949f49c4beeec0cdc534 (diff) |
loplugin:simplifybool in ucb..vcl
Change-Id: Ib63623f5ca3f6559e02a0013c3cbd6174f7aec14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95108
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/legacyaccessibility.cxx | 3 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 8 |
3 files changed, 7 insertions, 8 deletions
diff --git a/vcl/source/window/legacyaccessibility.cxx b/vcl/source/window/legacyaccessibility.cxx index 376d0d08af6f..346e1fdc8f2a 100644 --- a/vcl/source/window/legacyaccessibility.cxx +++ b/vcl/source/window/legacyaccessibility.cxx @@ -191,8 +191,7 @@ Window* Window::getLegacyNonLayoutAccessibleRelationMemberOf() const pFrameWindow = ImplGetFrameWindow(); } // if( ! ( GetType() == WindowType::FIXEDTEXT || - if( !( GetType() == WindowType::FIXEDLINE || - GetType() == WindowType::GROUPBOX ) ) + if( GetType() != WindowType::FIXEDLINE && GetType() != WindowType::GROUPBOX ) { // search for a control that makes member of this window // it is considered the last fixed line or group box diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index bcfbdbb37773..3d5d88fa11f2 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -1488,7 +1488,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin ) { nCheckWidth = aMaxSize.Width(); // checks / images take the same place - if( ! ( ( pData->eType == MenuItemType::IMAGE ) || ( pData->eType == MenuItemType::STRINGIMAGE ) ) ) + if( ( pData->eType != MenuItemType::IMAGE ) && ( pData->eType != MenuItemType::STRINGIMAGE ) ) nWidth += nCheckWidth + nExtra * 2; } @@ -1849,7 +1849,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, Size const & rSize, // however do not do this if native checks will be painted since // the selection color too often does not fit the theme's check and/or radio - if( !((pData->eType == MenuItemType::IMAGE) || (pData->eType == MenuItemType::STRINGIMAGE))) + if( (pData->eType != MenuItemType::IMAGE) && (pData->eType != MenuItemType::STRINGIMAGE)) { if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, (pData->nBits & MenuItemBits::RADIOCHECK) diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 2c77f7069456..57bba25eb16b 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -461,10 +461,10 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent //long nMouseY = nY; long nMouseX = aMousePos.X(); // #106074# use the possibly re-mirrored coordinates (RTL) ! nX,nY are unmodified ! long nMouseY = aMousePos.Y(); - if ( !(((nMouseX-nDragW) <= pMouseDownWin->ImplGetFrameData()->mnFirstMouseX) && - ((nMouseX+nDragW) >= pMouseDownWin->ImplGetFrameData()->mnFirstMouseX)) || - !(((nMouseY-nDragH) <= pMouseDownWin->ImplGetFrameData()->mnFirstMouseY) && - ((nMouseY+nDragH) >= pMouseDownWin->ImplGetFrameData()->mnFirstMouseY)) ) + if ( (((nMouseX-nDragW) > pMouseDownWin->ImplGetFrameData()->mnFirstMouseX) || + ((nMouseX+nDragW) < pMouseDownWin->ImplGetFrameData()->mnFirstMouseX)) || + (((nMouseY-nDragH) > pMouseDownWin->ImplGetFrameData()->mnFirstMouseY) || + ((nMouseY+nDragH) < pMouseDownWin->ImplGetFrameData()->mnFirstMouseY)) ) { pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = true; |