From 2ee60f02c456f39a80edb2dbfed48c3e0147a7f7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 19 Apr 2020 11:10:43 +0200 Subject: loplugin:flatten in drawinglayer Change-Id: Ieb5f682ec627c8d8ddfc286ec0e4422104b4d847 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92494 Tested-by: Jenkins Reviewed-by: Noel Grandin --- .../source/primitive2d/shadowprimitive2d.cxx | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'drawinglayer/source/primitive2d/shadowprimitive2d.cxx') diff --git a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx index ba239ee02123..8cb8311494a5 100644 --- a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx @@ -61,21 +61,21 @@ namespace drawinglayer::primitive2d void ShadowPrimitive2D::get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& /*rViewInformation*/) const { - if(!getChildren().empty()) - { - // create a modifiedColorPrimitive containing the shadow color and the content - const basegfx::BColorModifierSharedPtr aBColorModifier = - std::make_shared( - getShadowColor()); - const Primitive2DReference xRefA( - new ModifiedColorPrimitive2D( - getChildren(), - aBColorModifier)); - const Primitive2DContainer aSequenceB { xRefA }; + if(getChildren().empty()) + return; - // build transformed primitiveVector with shadow offset and add to target - rVisitor.append(new TransformPrimitive2D(getShadowTransform(), aSequenceB)); - } + // create a modifiedColorPrimitive containing the shadow color and the content + const basegfx::BColorModifierSharedPtr aBColorModifier = + std::make_shared( + getShadowColor()); + const Primitive2DReference xRefA( + new ModifiedColorPrimitive2D( + getChildren(), + aBColorModifier)); + const Primitive2DContainer aSequenceB { xRefA }; + + // build transformed primitiveVector with shadow offset and add to target + rVisitor.append(new TransformPrimitive2D(getShadowTransform(), aSequenceB)); } // provide unique ID -- cgit