diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-19 11:10:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-19 12:23:46 +0200 |
commit | 2ee60f02c456f39a80edb2dbfed48c3e0147a7f7 (patch) | |
tree | ca4b9c95c2c1f28dcfd4ecb3307015c7f82603b9 /drawinglayer/source/primitive2d/shadowprimitive2d.cxx | |
parent | 9df2821e61979dab32390d5c64dd49bee868adbb (diff) |
loplugin:flatten in drawinglayer
Change-Id: Ieb5f682ec627c8d8ddfc286ec0e4422104b4d847
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92494
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer/source/primitive2d/shadowprimitive2d.cxx')
-rw-r--r-- | drawinglayer/source/primitive2d/shadowprimitive2d.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
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<basegfx::BColorModifier_replace>( - 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<basegfx::BColorModifier_replace>( + 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 |