summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-26 12:07:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-27 07:35:11 +0100
commit4d502ef3559f53d75e4ee3c85b90ea36816049e8 (patch)
tree6fc23dab1ded365962295c5a3fdf498c726853f3 /sc
parent19240f625f8bd7b772481abc8e678d7b0fadd921 (diff)
loplugin:simplifybool improve search for negated operator
Change-Id: Id6ac35fefa5c3e1f64c222713791e849b3cb4d34 Reviewed-on: https://gerrit.libreoffice.org/68379 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/detdata.cxx2
-rw-r--r--sc/source/ui/attrdlg/tabpages.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/tool/detdata.cxx b/sc/source/core/tool/detdata.cxx
index e822d51e3100..aec1d032d0c2 100644
--- a/sc/source/core/tool/detdata.cxx
+++ b/sc/source/core/tool/detdata.cxx
@@ -79,7 +79,7 @@ bool ScDetOpList::operator==( const ScDetOpList& r ) const
size_t nCount = Count();
bool bEqual = ( nCount == r.Count() );
for (size_t i=0; i<nCount && bEqual; i++) // order has to be the same
- if ( !(aDetOpDataVector[i] == r.aDetOpDataVector[i]) ) // entries are different ?
+ if ( aDetOpDataVector[i] != r.aDetOpDataVector[i] ) // entries are different ?
bEqual = false;
return bEqual;
diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx
index 8e1bf7572f18..d974baf6bcf2 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -127,7 +127,7 @@ bool ScTabPageProtection::FillItemSet( SfxItemSet* rCoreAttrs )
if ( bTriEnabled )
bAttrsChanged = true; // DontCare -> properly value
else
- bAttrsChanged = !pOldItem || !( aProtAttr == *static_cast<const ScProtectionAttr*>(pOldItem) );
+ bAttrsChanged = !pOldItem || aProtAttr != *static_cast<const ScProtectionAttr*>(pOldItem);
}
if ( bAttrsChanged )