summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-06 13:32:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-14 18:03:06 +0200
commite67657d5211f6e95ddf8bd621108608573b00d5d (patch)
tree66724101dbd95721714bd40fcb4861663432774c /vcl/source/window
parent186def8f48e273c3a3b4d23b3ab2efd0d8664731 (diff)
loplugin:simplifybool more
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/cursor.cxx2
-rw-r--r--vcl/source/window/event.cxx2
-rw-r--r--vcl/source/window/window2.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index c8a573b9fbd4..a0d05ff12c2e 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -220,7 +220,7 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool bRestore )
if ( bDrawDirect || bRestore )
ImplDraw();
- if ( !mpWindow && ! ( ! bDrawDirect && mpData->maTimer.IsActive()) )
+ if ( !mpWindow && (bDrawDirect || !mpData->maTimer.IsActive()) )
{
mpData->maTimer.SetTimeout( pWindow->GetSettings().GetStyleSettings().GetCursorBlinkTime() );
if ( mpData->maTimer.GetTimeout() != STYLE_CURSOR_NOBLINKTIME )
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 4d7f3cf35284..251cddaaf048 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -110,7 +110,7 @@ bool Window::EventNotify( NotifyEvent& rNEvt )
// check for docking window
// but do nothing if window is docked and locked
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
- if (pWrapper && !( !pWrapper->IsFloatingMode() && pWrapper->IsLocked() ))
+ if (pWrapper && ( pWrapper->IsFloatingMode() || !pWrapper->IsLocked() ))
{
const bool bDockingSupportCrippled = !StyleSettings::GetDockingFloatsSupported();
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index cab79f4fcef3..23557868dd4c 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -576,7 +576,7 @@ long Window::GetDrawPixel( OutputDevice const * pDev, long nPixels ) const
static void lcl_HandleScrollHelper( ScrollBar* pScrl, double nN, bool isMultiplyByLineSize )
{
- if ( !(pScrl && nN && pScrl->IsEnabled() && pScrl->IsInputEnabled() && ! pScrl->IsInModalMode()) )
+ if ( !pScrl || !nN || !pScrl->IsEnabled() || !pScrl->IsInputEnabled() || pScrl->IsInModalMode() )
return;
long nNewPos = pScrl->GetThumbPos();