summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-02 15:42:25 +0200
committerNoel Grandin <noel@peralex.com>2014-05-05 12:47:48 +0200
commit4f9b21248ffdf55cef9f3f9d1da76778ee000775 (patch)
treeb059d288339a68aa4c3901f1100e99b04d05a23d /svl
parentb4107411900f5bb4c215e2d9db09fc2b2b82939b (diff)
simplify ternary conditions "xxx ? yyy : false"
Look for code like: xxx ? yyy : false; Which can be simplified to: xxx && yyy Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/style.cxx2
-rw-r--r--svl/source/numbers/zforlist.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 5d26a0faf4ac..8bdf0735e472 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -379,7 +379,7 @@ struct DoesStyleMatchStyleSheetPredicate SAL_FINAL : public svl::StyleSheetPredi
bool bMatchFamily = ((mIterator->GetSearchFamily() == SFX_STYLE_FAMILY_ALL) ||
( styleSheet.GetFamily() == mIterator->GetSearchFamily() ));
- bool bUsed = mIterator->SearchUsed() ? styleSheet.IsUsed( ) : false;
+ bool bUsed = mIterator->SearchUsed() && styleSheet.IsUsed( );
bool bSearchHidden = ( mIterator->GetSearchMask() & SFXSTYLEBIT_HIDDEN );
bool bMatchVisibility = !( !bSearchHidden && styleSheet.IsHidden() && !bUsed );
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 4acec41241b3..c84f895ae866 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -486,7 +486,7 @@ bool SvNumberFormatter::IsTextFormat(sal_uInt32 F_Index) const
{
const SvNumberformat* pFormat = GetFormatEntry(F_Index);
- return pFormat ? pFormat->IsTextFormat() : false;
+ return pFormat && pFormat->IsTextFormat();
}
bool SvNumberFormatter::PutEntry(OUString& rString,
@@ -3750,9 +3750,9 @@ void SvNumberFormatter::ImpInitCurrencyTable()
lcl_CheckCurrencySymbolPosition( *pEntry );
}
rCurrencyTable.insert( rCurrencyTable.begin() + nCurrencyPos++, pEntry );
- if ( !nSystemCurrencyPosition && (!aConfiguredCurrencyAbbrev.isEmpty() ?
- pEntry->GetBankSymbol() == aConfiguredCurrencyAbbrev &&
- pEntry->GetLanguage() == eConfiguredCurrencyLanguage : false) )
+ if ( !nSystemCurrencyPosition && !aConfiguredCurrencyAbbrev.isEmpty() &&
+ pEntry->GetBankSymbol() == aConfiguredCurrencyAbbrev &&
+ pEntry->GetLanguage() == eConfiguredCurrencyLanguage )
{
nSystemCurrencyPosition = nCurrencyPos-1;
}