From 7a1c21e53fc4733a4bb52282ce0098fcc085ab0e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 22 Nov 2017 09:33:32 +0200 Subject: loplugin:simplifybool for negation of comparison operator Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/accessibility/GraphCtlAccessibleContext.cxx | 2 +- svx/source/dialog/docrecovery.cxx | 4 ++-- svx/source/form/formcontrolfactory.cxx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'svx/source') diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index d92e34f4e1c2..6cbd9ad03645 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -682,7 +682,7 @@ tools::Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBox() tools::Rectangle aBounds ( 0, 0, 0, 0 ); vcl::Window* pWindow = mpControl; - if (!(pWindow != nullptr)) + if (pWindow == nullptr) throw DisposedException(); aBounds = pWindow->GetWindowExtentsRelative (nullptr); diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 35a82a04ea57..13e35da7cfa5 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -98,8 +98,8 @@ bool RecoveryCore::isBrokenTempEntry(const TURLInfo& rInfo) // Note: If the original files was recovery ... but a temp file // exists ... an error inside the temp file exists! if ( - !(rInfo.RecoveryState == E_RECOVERY_FAILED ) && - !(rInfo.RecoveryState == E_ORIGINAL_DOCUMENT_RECOVERED) + (rInfo.RecoveryState != E_RECOVERY_FAILED ) && + (rInfo.RecoveryState != E_ORIGINAL_DOCUMENT_RECOVERED) ) return false; diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index c2b31731a8b0..bd5a1596764a 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -425,7 +425,7 @@ namespace svxform lcl_initializeCharacterAttributes( _rxControlModel ); if ( !_rControlBoundRect.IsEmpty() - && !( _rControlBoundRect.GetWidth() > 4 * _rControlBoundRect.GetHeight() ) + && ( _rControlBoundRect.GetWidth() <= 4 * _rControlBoundRect.GetHeight() ) ) { if ( xPSI->hasPropertyByName( FM_PROP_MULTILINE ) ) -- cgit v1.2.3