summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-19 13:13:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-19 14:52:50 +0200
commit447a013299d148df12ff17306fff77bb7f85eba1 (patch)
treed577aabfb9b650bc46fdcf2289aae2b1561f1e4e /filter
parent78098b8494be7123bc4a8b50faa13445e5afd8ce (diff)
clang-tidy readability-simplify-boolean-expr in dbaccess..framework
Change-Id: I96e1bd4000f4ade6ccfac53c57653772b249df99 Reviewed-on: https://gerrit.libreoffice.org/36678 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/idxf/dxfvec.cxx2
-rw-r--r--filter/source/graphicfilter/itiff/ccidecom.cxx5
-rw-r--r--filter/source/msfilter/svdfppt.cxx5
-rw-r--r--filter/source/svg/svgfilter.cxx5
-rw-r--r--filter/source/textfilterdetect/filterdetect.cxx5
5 files changed, 6 insertions, 16 deletions
diff --git a/filter/source/graphicfilter/idxf/dxfvec.cxx b/filter/source/graphicfilter/idxf/dxfvec.cxx
index 7ee4b694e92a..bda80dfe30e8 100644
--- a/filter/source/graphicfilter/idxf/dxfvec.cxx
+++ b/filter/source/graphicfilter/idxf/dxfvec.cxx
@@ -240,7 +240,7 @@ double DXFTransform::CalcRotAngle() const
bool DXFTransform::Mirror() const
{
- if (aMZ.SProd(aMX*aMY)<0) return true; else return false;
+ return aMZ.SProd(aMX*aMY)<0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/filter/source/graphicfilter/itiff/ccidecom.cxx
index a7d0ffc49f14..cdca91fcea83 100644
--- a/filter/source/graphicfilter/itiff/ccidecom.cxx
+++ b/filter/source/graphicfilter/itiff/ccidecom.cxx
@@ -819,8 +819,7 @@ bool CCIDecompressor::Read2DTag()
nInputBitsBufSize=8;
}
nInputBitsBufSize--;
- if ( ((nInputBitsBuf>>nInputBitsBufSize)&0x0001) ) return false;
- else return true;
+ return ((nInputBitsBuf>>nInputBitsBufSize)&0x0001) == 0;
}
@@ -978,7 +977,7 @@ bool CCIDecompressor::Read1DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nBitsTo
}
// is that a 'Terminating-Code'?
- if (nDataBits<64) bTerminatingCode=true; else bTerminatingCode=false;
+ bTerminatingCode = nDataBits<64;
// remove the read bits from the input buffer:
nInputBitsBufSize = nInputBitsBufSize - nCodeBits;
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 875e74385787..2748b61896ae 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1050,10 +1050,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( dynamic_cast<const SdrObjCustomShape* >(pRet) != nullptr && ( eTextKind == OBJ_RECT ) )
{
bAutoGrowHeight = bFitShapeToText;
- if ( bWordWrap )
- bAutoGrowWidth = false;
- else
- bAutoGrowWidth = true;
+ bAutoGrowWidth = !bWordWrap;
pTObj = pRet;
pRet = nullptr;
}
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index f96f8005f4a7..61464b628641 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -333,10 +333,7 @@ bool SVGFilter::isStreamSvg(const uno::Reference<io::XInputStream>& xInput)
sal_Int8 aMagic2[] = {'D', 'O', 'C', 'T', 'Y', 'P', 'E', ' ', 's', 'v', 'g'};
sal_Int32 aMagic2Size = sizeof(aMagic2) / sizeof(*aMagic2);
- if (std::search(pBuffer, pBuffer + nBytes, aMagic2, aMagic2 + aMagic2Size) != pBuffer + nBytes)
- return true;
-
- return false;
+ return std::search(pBuffer, pBuffer + nBytes, aMagic2, aMagic2 + aMagic2Size) != pBuffer + nBytes;
}
OUString SAL_CALL SVGFilter::detect(Sequence<PropertyValue>& rDescriptor)
diff --git a/filter/source/textfilterdetect/filterdetect.cxx b/filter/source/textfilterdetect/filterdetect.cxx
index 554fbc8a2a63..6a392ca79230 100644
--- a/filter/source/textfilterdetect/filterdetect.cxx
+++ b/filter/source/textfilterdetect/filterdetect.cxx
@@ -108,10 +108,7 @@ bool IsHTMLStream( const uno::Reference<io::XInputStream>& xInStream )
// The string following '<' has to be a known HTML token.
OString aToken = sHeader.copy( nStartOfTagIndex, i - nStartOfTagIndex );
- if ( GetHTMLToken( OStringToOUString( aToken.toAsciiLowerCase(), RTL_TEXTENCODING_ASCII_US ) ) != 0 )
- return true;
-
- return false;
+ return GetHTMLToken( OStringToOUString( aToken.toAsciiLowerCase(), RTL_TEXTENCODING_ASCII_US ) ) != 0;
}
}