summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-14 13:01:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-15 11:52:41 +0100
commite132e781d8b01684d8ef51f060e90d465a21c677 (patch)
treef18331549fdc95416a748c7792f804a39ab0a30f /sc
parent58a2473d6672eb4ae4f55c3fe4c25ea23d932db5 (diff)
loplugin:simplifybool extend to !(a == b) where comparison an overloaded op
Change-Id: I08fcbe2569c07f5f97269ad861fa6d38f23a7cc7 Reviewed-on: https://gerrit.libreoffice.org/67816 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/dpsave.cxx6
-rw-r--r--sc/source/filter/excel/excrecds.cxx2
-rw-r--r--sc/source/filter/excel/xehelper.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx10
4 files changed, 10 insertions, 10 deletions
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index c5c5139ad170..1c2ab97f3a1e 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -254,7 +254,7 @@ bool ScDPSaveDimension::operator== ( const ScDPSaveDimension& r ) const
if( pReferenceValue && r.pReferenceValue )
{
- if ( !(*pReferenceValue == *r.pReferenceValue) )
+ if ( *pReferenceValue != *r.pReferenceValue )
{
return false;
}
@@ -265,7 +265,7 @@ bool ScDPSaveDimension::operator== ( const ScDPSaveDimension& r ) const
}
if( this->pSortInfo && r.pSortInfo )
{
- if ( !(*this->pSortInfo == *r.pSortInfo) )
+ if ( *this->pSortInfo != *r.pSortInfo )
{
return false;
}
@@ -276,7 +276,7 @@ bool ScDPSaveDimension::operator== ( const ScDPSaveDimension& r ) const
}
if( this->pAutoShowInfo && r.pAutoShowInfo )
{
- if ( !(*this->pAutoShowInfo == *r.pAutoShowInfo) )
+ if ( *this->pAutoShowInfo != *r.pAutoShowInfo )
{
return false;
}
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 0bfe9cf4a427..f2b11b0bdd1c 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -251,7 +251,7 @@ Exc1904::Exc1904( const ScDocument& rDoc )
{
const Date& rDate = rDoc.GetFormatTable()->GetNullDate();
bVal = (rDate == Date( 1, 1, 1904 ));
- bDateCompatibility = !(rDate == Date( 30, 12, 1899 ));
+ bDateCompatibility = (rDate != Date( 30, 12, 1899 ));
}
sal_uInt16 Exc1904::GetNum() const
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 7f4850194341..c4e67e5f57c2 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -734,7 +734,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
aNewData.maName = XclTools::GetXclFontName( aFont.GetFamilyName() );
aNewData.mnWeight = (aFont.GetWeight() > WEIGHT_NORMAL) ? EXC_FONTWGHT_BOLD : EXC_FONTWGHT_NORMAL;
aNewData.mbItalic = (aFont.GetItalic() != ITALIC_NONE);
- bool bNewFont = !(aFontData.maName == aNewData.maName);
+ bool bNewFont = (aFontData.maName != aNewData.maName);
bool bNewStyle = (aFontData.mnWeight != aNewData.mnWeight) ||
(aFontData.mbItalic != aNewData.mbItalic);
if( bNewFont || (bNewStyle && pFontList) )
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 2cce67118824..f7315debd5de 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2081,7 +2081,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
{
if(aCol != aBoxItem.GetBottom()->GetColor() )
bColDisable = true;
- if(!( aLine == *(aBoxItem.GetBottom())) )
+ if( aLine != *aBoxItem.GetBottom() )
bStyleDisable = true;
}
}
@@ -2100,7 +2100,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
{
if(aCol != aBoxItem.GetLeft()->GetColor() )
bColDisable = true;
- if(!( aLine == *(aBoxItem.GetLeft())) )
+ if( aLine != *aBoxItem.GetLeft() )
bStyleDisable = true;
}
}
@@ -2119,7 +2119,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
{
if(aCol != aBoxItem.GetRight()->GetColor() )
bColDisable = true;
- if(!( aLine == *(aBoxItem.GetRight())) )
+ if( aLine != *aBoxItem.GetRight() )
bStyleDisable = true;
}
}
@@ -2138,7 +2138,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
{
if(aCol != aInfoItem.GetVert()->GetColor() )
bColDisable = true;
- if(!( aLine == *(aInfoItem.GetVert())) )
+ if( aLine != *aInfoItem.GetVert() )
bStyleDisable = true;
}
}
@@ -2157,7 +2157,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
{
if(aCol != aInfoItem.GetHori()->GetColor() )
bColDisable = true;
- if(!( aLine == *(aInfoItem.GetHori())) )
+ if( aLine != *aInfoItem.GetHori() )
bStyleDisable = true;
}
}