summaryrefslogtreecommitdiff
path: root/drawinglayer/source/processor3d
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-02-21 20:03:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-02-22 08:08:27 +0100
commit21d76782b39cf83130985d27138f61308f572151 (patch)
tree8b5250e037a834eb6ad14271089985105c5ec42d /drawinglayer/source/processor3d
parent795ac4b5b6ba2c55ca73859fbc9bd4116120fe29 (diff)
loplugin:refcounting in drawinglayer
Change-Id: Ia7bf3a4811a47180ce2a92852a01b613ff16279a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111288 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer/source/processor3d')
-rw-r--r--drawinglayer/source/processor3d/shadow3dextractor.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx
index 0b653236eb1b..db3a14cc92f3 100644
--- a/drawinglayer/source/processor3d/shadow3dextractor.cxx
+++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx
@@ -29,6 +29,7 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx>
#include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx>
+#include <rtl/ref.hxx>
using namespace com::sun::star;
@@ -71,7 +72,7 @@ namespace drawinglayer::processor3d
// create 2d shadow primitive with result. This also fetches all entries
// from aNewSubList, so there is no need to delete them
- primitive2d::BasePrimitive2D* pNew = new primitive2d::ShadowPrimitive2D(
+ rtl::Reference<primitive2d::BasePrimitive2D> pNew = new primitive2d::ShadowPrimitive2D(
rPrimitive.getShadowTransform(),
rPrimitive.getShadowColor(),
0, // shadow3d doesn't have rPrimitive.getShadowBlur() yet.
@@ -80,8 +81,7 @@ namespace drawinglayer::processor3d
if(basegfx::fTools::more(rPrimitive.getShadowTransparence(), 0.0))
{
// create simpleTransparencePrimitive, add created primitives
- const primitive2d::Primitive2DReference xRef(pNew);
- const primitive2d::Primitive2DContainer aNewTransPrimitiveVector { xRef };
+ const primitive2d::Primitive2DContainer aNewTransPrimitiveVector { pNew };
pNew = new primitive2d::UnifiedTransparencePrimitive2D(
aNewTransPrimitiveVector,