diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-18 08:27:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-18 09:46:28 +0200 |
commit | 5fb66ae5595b7435e8954df31473fad15a74b8c2 (patch) | |
tree | 3b3f0ce3eafa10557a7e78b10851c97ee16c7ebf /sc | |
parent | 181a1b36ac728e3a43e054496ceb53fd3315abdb (diff) |
clang-tidy readability-simplify-boolean-expr
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64
Reviewed-on: https://gerrit.libreoffice.org/61902
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/tabprotection.cxx | 5 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/oox/stylesbuffer.cxx | 10 |
3 files changed, 4 insertions, 15 deletions
diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx index 3deb5504fa24..312165a0739e 100644 --- a/sc/source/core/data/tabprotection.cxx +++ b/sc/source/core/data/tabprotection.cxx @@ -401,10 +401,7 @@ bool ScTableProtectionImpl::verifyPassword(const OUString& aPassText) const // Not yet generated or tracked with meHash1 or meHash2, but can be read // from OOXML. - if (maPasswordHash.verifyPassword( aPassText)) - return true; - - return false; + return maPasswordHash.verifyPassword( aPassText); } bool ScTableProtectionImpl::isOptionEnabled(SCSIZE nOptId) const diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 0e86fe322e78..b17cb016dfe0 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -5811,9 +5811,7 @@ bool ScCompiler::SkipImplicitIntersectionOptimization(const FormulaToken* token) return true; } formula::ParamClass returnType = ScParameterClassification::GetParameterType( token, SAL_MAX_UINT16 ); - if( returnType == formula::Reference ) - return true; - return false; + return returnType == formula::Reference; } void ScCompiler::HandleIIOpCode(FormulaToken* token, FormulaToken*** pppToken, sal_uInt8 nNumParams) diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index 27993a47425f..ec1dce320cec 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -2846,20 +2846,14 @@ const FontModel& StylesBuffer::getDefaultFontModel() const bool StylesBuffer::equalBorders( sal_Int32 nBorderId1, sal_Int32 nBorderId2 ) { - if( nBorderId1 == nBorderId2 ) - return true; - // in OOXML, borders are assumed to be unique - return false; + return nBorderId1 == nBorderId2; } bool StylesBuffer::equalFills( sal_Int32 nFillId1, sal_Int32 nFillId2 ) { - if( nFillId1 == nFillId2 ) - return true; - // in OOXML, fills are assumed to be unique - return false; + return nFillId1 == nFillId2; } OUString StylesBuffer::getDefaultStyleName() const |