diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-19 09:07:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-30 10:49:51 +0200 |
commit | d6c32cffb5cc81989b4bb4a221a152bbe607bd98 (patch) | |
tree | 2c4ef9ec2a201ffcfea145ed5a0b901f2b6853ea /svtools | |
parent | 9ab64dc48a6a61edce6ff3724093162ca1cf8331 (diff) |
loplugin:simplifybool extend to expression like !(a < b || c > d)
mostly to catch stuff from the flatten work, but I think this looks good
in general
Change-Id: I7be5b7bcf1f3d9f980c748ba20793965cef957e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92493
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/brwbox/brwbox1.cxx | 2 | ||||
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/valueset.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index ee3922582cda..b7c36729f684 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -514,7 +514,7 @@ void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth ) return; // does the state change? - if ( !(nWidth >= LONG_MAX || mvCols[ nItemPos ]->Width() != nWidth) ) + if ( nWidth < LONG_MAX && mvCols[ nItemPos ]->Width() == nWidth ) return; long nOldWidth = mvCols[ nItemPos ]->Width(); diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 0105082cea5c..9b56e56c0afa 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -947,7 +947,7 @@ namespace svt return; } - if (!(nEditRow >= 0 && nEditCol > HandleColumnId)) + if (nEditRow < 0 || nEditCol <= HandleColumnId) return; aController = GetController(nRow, nCol); diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 4bc20997393f..497da0904e72 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -1306,7 +1306,7 @@ void ValueSet::ImplFormatItem(vcl::RenderContext const & rRenderContext, ValueSe if (pItem == mpNoneItem.get()) pItem->maText = GetText(); - if (!((aRect.GetHeight() > 0) && (aRect.GetWidth() > 0))) + if ((aRect.GetHeight() <= 0) || (aRect.GetWidth() <= 0)) return; const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); |