summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/tabpages/border.cxx4
-rw-r--r--cui/source/tabpages/page.cxx6
-rw-r--r--cui/source/tabpages/paragrph.cxx6
-rw-r--r--cui/source/tabpages/tabstpge.cxx4
4 files changed, 10 insertions, 10 deletions
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 0812c656bbf0..a66b3481943a 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -983,14 +983,14 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* rCoreAttrs )
if ( bPut )
{
- if ( !pOldBoxItem || !( *pOldBoxItem == aBoxItem ) )
+ if ( !pOldBoxItem || *pOldBoxItem != aBoxItem )
{
rCoreAttrs->Put( aBoxItem );
bAttrsChanged = true;
}
const SfxPoolItem* pOld = GetOldItem( *rCoreAttrs, SID_ATTR_BORDER_INNER, false );
- if ( !pOld || !( *static_cast<const SvxBoxInfoItem*>(pOld) == aBoxInfoItem ) )
+ if ( !pOld || *static_cast<const SvxBoxInfoItem*>(pOld) != aBoxInfoItem )
{
rCoreAttrs->Put( aBoxInfoItem );
bAttrsChanged = true;
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 81ad11e810f6..b7893372aa7f 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -595,7 +595,7 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet )
{
pOld = GetOldItem( *rSet, SID_ATTR_LRSPACE );
- if ( !pOld || !( *static_cast<const SvxLRSpaceItem*>(pOld) == aMargin ) )
+ if ( !pOld || *static_cast<const SvxLRSpaceItem*>(pOld) != aMargin )
rSet->Put( aMargin );
else
bModified = false;
@@ -621,7 +621,7 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet )
{
pOld = GetOldItem( *rSet, SID_ATTR_ULSPACE );
- if ( !pOld || !( *static_cast<const SvxULSpaceItem*>(pOld) == aTopMargin ) )
+ if ( !pOld || *static_cast<const SvxULSpaceItem*>(pOld) != aTopMargin )
{
bModified = true;
rSet->Put( aTopMargin );
@@ -706,7 +706,7 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet )
{
pOld = GetOldItem( *rSet, SID_ATTR_PAGE );
- if ( !pOld || !( *static_cast<const SvxPageItem*>(pOld) == aPage ) )
+ if ( !pOld || *static_cast<const SvxPageItem*>(pOld) != aPage )
{
rSet->Put( aPage );
bModified = true;
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 4ceb0c88b0a7..6b00615c5776 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -304,7 +304,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
aMargin.SetContextValue(m_xContextualCB->get_active());
eState = GetItemSet().GetItemState( nWhich );
- if ( !pOld || !( *static_cast<const SvxULSpaceItem*>(pOld) == aMargin ) ||
+ if ( !pOld || *static_cast<const SvxULSpaceItem*>(pOld) != aMargin ||
SfxItemState::DONTCARE == eState )
{
rOutSet->Put( aMargin );
@@ -359,7 +359,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
bNullTab = true;
eState = GetItemSet().GetItemState( nWhich );
- if ( !pOld || !( *static_cast<const SvxLRSpaceItem*>(pOld) == aMargin ) ||
+ if ( !pOld || *static_cast<const SvxLRSpaceItem*>(pOld) != aMargin ||
SfxItemState::DONTCARE == eState )
{
rOutSet->Put( aMargin );
@@ -1376,7 +1376,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
aHyphen.GetMaxHyphens() = static_cast<sal_uInt8>(m_xMaxHyphenEdit->get_value());
if ( !pOld ||
- !( *static_cast<const SvxHyphenZoneItem*>(pOld) == aHyphen ) ||
+ *static_cast<const SvxHyphenZoneItem*>(pOld) != aHyphen ||
m_xHyphenBox->get_state_changed_from_saved())
{
rOutSet->Put( aHyphen );
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index 1d7f009419fc..6d35e70e501f 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -201,13 +201,13 @@ bool SvxTabulatorTabPage::FillItemSet(SfxItemSet* rSet)
aTmp.Insert(aTmpStop);
}
- if (!pOld || !(*static_cast<const SvxTabStopItem*>(pOld) == aTmp))
+ if (!pOld || *static_cast<const SvxTabStopItem*>(pOld) != aTmp)
{
rSet->Put(aTmp);
bModified = true;
}
}
- else if (!pOld || !( *static_cast<const SvxTabStopItem*>(pOld) == aNewTabs))
+ else if (!pOld || *static_cast<const SvxTabStopItem*>(pOld) != aNewTabs)
{
rSet->Put(aNewTabs);
bModified = true;