diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-29 11:34:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-29 14:44:37 +0200 |
commit | 9b25614939f7709e3d67949f49c4beeec0cdc534 (patch) | |
tree | c1e25fc743202c1fd8288ef5f8c0332203b1fc5c /drawinglayer | |
parent | 6647a167400753df45dba788ed793d55ca0be9f8 (diff) |
loplugin:simplifybool in dbaccess..framework
Change-Id: I0d73bb7d8d3fde426edc0a10c0750758b68aceb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95099
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
5 files changed, 5 insertions, 5 deletions
diff --git a/drawinglayer/source/primitive2d/PolyPolygonGraphicPrimitive2D.cxx b/drawinglayer/source/primitive2d/PolyPolygonGraphicPrimitive2D.cxx index 2a1aefafa275..c857ba5c8e3d 100644 --- a/drawinglayer/source/primitive2d/PolyPolygonGraphicPrimitive2D.cxx +++ b/drawinglayer/source/primitive2d/PolyPolygonGraphicPrimitive2D.cxx @@ -40,7 +40,7 @@ void PolyPolygonGraphicPrimitive2D::create2DDecomposition( const GraphicType aType(rGraphic.GetType()); // is there a bitmap or a metafile (do we have content)? - if (!(GraphicType::Bitmap == aType || GraphicType::GdiMetafile == aType)) + if (GraphicType::Bitmap != aType && GraphicType::GdiMetafile != aType) return; const Size aPrefSize(rGraphic.GetPrefSize()); diff --git a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx index 1bfc47940a87..708b3f2ce48d 100644 --- a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx @@ -41,7 +41,7 @@ namespace drawinglayer::primitive2d const Graphic& rGraphic = rAttribute.getGraphic(); - if(!(GraphicType::Bitmap == rGraphic.GetType() || GraphicType::GdiMetafile == rGraphic.GetType())) + if(GraphicType::Bitmap != rGraphic.GetType() && GraphicType::GdiMetafile != rGraphic.GetType()) return; const Size aSize(rGraphic.GetPrefSize()); diff --git a/drawinglayer/source/primitive2d/textbreakuphelper.cxx b/drawinglayer/source/primitive2d/textbreakuphelper.cxx index 1139f19e8d06..df37aa01356e 100644 --- a/drawinglayer/source/primitive2d/textbreakuphelper.cxx +++ b/drawinglayer/source/primitive2d/textbreakuphelper.cxx @@ -55,7 +55,7 @@ namespace drawinglayer::primitive2d void TextBreakupHelper::breakupPortion(Primitive2DContainer& rTempResult, sal_Int32 nIndex, sal_Int32 nLength, bool bWordLineMode) { - if(!(nLength && !(nIndex == mrSource.getTextPosition() && nLength == mrSource.getTextLength()))) + if(!(nLength && (nIndex != mrSource.getTextPosition() || nLength != mrSource.getTextLength()))) return; // prepare values for new portion diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx index dc8a2f8aa962..6cd65d60b416 100644 --- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx +++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx @@ -274,7 +274,7 @@ void ZBufferRasterConverter3D::processLineSpan(const basegfx::RasterConversionLi if(nSpanCount & 0x0001) return; - if(!(nLine >= 0 && nLine < static_cast<sal_Int32>(mrBuffer.getHeight()))) + if(nLine < 0 || nLine >= static_cast<sal_Int32>(mrBuffer.getHeight())) return; sal_uInt32 nXA(std::min(mrBuffer.getWidth(), static_cast<sal_uInt32>(std::max(sal_Int32(0), basegfx::fround(rA.getX().getVal()))))); diff --git a/drawinglayer/source/tools/emfpfont.cxx b/drawinglayer/source/tools/emfpfont.cxx index a9ee61511234..f641fdd4d21b 100644 --- a/drawinglayer/source/tools/emfpfont.cxx +++ b/drawinglayer/source/tools/emfpfont.cxx @@ -56,7 +56,7 @@ namespace emfplushelper SAL_INFO("drawinglayer", "EMF+\tReserved: 0x" << reserved << std::dec); SAL_INFO("drawinglayer", "EMF+\tLength: " << length); - if (!(length > 0 && length < 0x4000)) + if (length <= 0 || length >= 0x4000) return; rtl_uString *pStr = rtl_uString_alloc(length); |