summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-12 11:21:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-28 11:23:34 +0200
commit9348b322a5c230dfcc2231661b73e480b130fcd9 (patch)
tree2c81a97d6f54229c87c5e2a37c73935ffc2527ac /svl
parent5bcd18461b8cb63b477dbb74025374b4c963161a (diff)
clang-tidy readability-simplify-boolean-expr
Change-Id: Iea7ab64683f0b29794d50d774cc482b54a00e70a Reviewed-on: https://gerrit.libreoffice.org/36450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforlist.cxx6
-rw-r--r--svl/source/numbers/zformat.cxx11
2 files changed, 3 insertions, 14 deletions
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index decaa845640a..27d5a3a50592 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -2991,11 +2991,7 @@ bool SvNumberFormatter::IsUserDefined(const OUString& sStr,
return true;
}
SvNumberformat* pEntry = GetFormatEntry( nKey );
- if ( pEntry && ((pEntry->GetType() & css::util::NumberFormat::DEFINED) != 0) )
- {
- return true;
- }
- return false;
+ return pEntry && ((pEntry->GetType() & css::util::NumberFormat::DEFINED) != 0);
}
sal_uInt32 SvNumberFormatter::GetEntryKey(const OUString& sStr,
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index cf2a245755f1..961f2d1701e5 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -4557,15 +4557,8 @@ void SvNumberformat::GetFormatSpecialInfo(bool& bThousand,
// "negative in red" is only useful for the whole format
const Color* pColor = NumFor[1].GetColor();
- if (fLimit1 == 0.0 && fLimit2 == 0.0 && pColor
- && (*pColor == rScan.GetRedColor()))
- {
- IsRed = true;
- }
- else
- {
- IsRed = false;
- }
+ IsRed = fLimit1 == 0.0 && fLimit2 == 0.0 && pColor
+ && (*pColor == rScan.GetRedColor());
}
void SvNumberformat::GetNumForInfo( sal_uInt16 nNumFor, short& rScannedType,