diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-12-22 09:46:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-12-22 10:57:48 +0000 |
commit | b844605b101bd752c8a0c07117b5d3faf2b2aebb (patch) | |
tree | a74eee362d4ae2f64cd7dbb3762b01f973574b0d /drawinglayer | |
parent | e8996124b443d416eafedc68dc25a5ec66dd84db (diff) |
loplugin:redundantstatic (clang-cl)
("salhelper::SimpleReferenceObject subclass being directly stack managed, should
be managed via rtl::Reference, const primitive2d::PolyPolygonColorPrimitive2D")
Change-Id: I53246ac9f1af1eb1d1ad91ef4d5f59dc19fd2825
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144742
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx b/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx index 64c458dbb651..5604e05b3037 100644 --- a/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx @@ -864,11 +864,11 @@ void D2DPixelProcessor2D::processBitmapPrimitive2D( basegfx::B2DPolygon aPolygon(basegfx::utils::createUnitPolygon()); aPolygon.transform(aLocalTransform); - // shortcut with local temporary instance - const primitive2d::PolyPolygonColorPrimitive2D aTemp(basegfx::B2DPolyPolygon(aPolygon), - aModifiedColor); + rtl::Reference<primitive2d::PolyPolygonColorPrimitive2D> aTemp( + new primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPolygon), + aModifiedColor)); - processPolyPolygonColorPrimitive2D(aTemp); + processPolyPolygonColorPrimitive2D(*aTemp); return; } } @@ -1507,10 +1507,11 @@ void D2DPixelProcessor2D::processPolygonStrokePrimitive2D( const attribute::LineAttribute aRed( basegfx::BColor(1.0, 0.0, 0.0), rLineAttribute.getWidth(), rLineAttribute.getLineJoin(), rLineAttribute.getLineCap(), rLineAttribute.getMiterMinimumAngle()); - const primitive2d::PolygonStrokePrimitive2D aCopy( - rPolygonStrokeCandidate.getB2DPolygon(), aRed, - rPolygonStrokeCandidate.getStrokeAttribute()); - process(aCopy); + rtl::Reference<primitive2d::PolygonStrokePrimitive2D> aCopy( + new primitive2d::PolygonStrokePrimitive2D( + rPolygonStrokeCandidate.getB2DPolygon(), aRed, + rPolygonStrokeCandidate.getStrokeAttribute())); + process(*aCopy); } bool bDone(false); |