summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-16 14:11:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-19 08:58:46 +0200
commitfb3091bfc73cb321017f47d87dc8cb782b9a58d8 (patch)
tree3516982b657a0ac7b5ee11703a59305d79ff6ddb /drawinglayer
parentdd590fd04f36553262eefd70e5f08c8b23a38c9d (diff)
loplugin:useuniqueptr in EMFPPen
Change-Id: I2c3c7be4bc3b43f03c45724e7a002e862b50f24b
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/tools/emfppen.cxx6
-rw-r--r--drawinglayer/source/tools/emfppen.hxx4
2 files changed, 4 insertions, 6 deletions
diff --git a/drawinglayer/source/tools/emfppen.cxx b/drawinglayer/source/tools/emfppen.cxx
index ac9d63a202d9..096380ee8307 100644
--- a/drawinglayer/source/tools/emfppen.cxx
+++ b/drawinglayer/source/tools/emfppen.cxx
@@ -82,8 +82,6 @@ namespace emfplushelper
EMFPPen::~EMFPPen()
{
- delete customStartCap;
- delete customEndCap;
}
void EMFPPen::SetStrokeWidth(rendering::StrokeAttributes& rStrokeAttributes, EmfPlusHelperData const & rR, const ::basegfx::B2DHomMatrix& mapModeTransform)
@@ -297,7 +295,7 @@ namespace emfplushelper
SAL_INFO("drawinglayer", "EMF+\t\tcustomStartCapLen: " << customStartCapLen);
sal_uInt64 const pos = s.Tell();
- customStartCap = new EMFPCustomLineCap();
+ customStartCap.reset( new EMFPCustomLineCap() );
customStartCap->Read(s, rR);
// maybe we don't read everything yet, play it safe ;-)
@@ -314,7 +312,7 @@ namespace emfplushelper
SAL_INFO("drawinglayer", "EMF+\t\tcustomEndCapLen: " << customEndCapLen);
sal_uInt64 const pos = s.Tell();
- customEndCap = new EMFPCustomLineCap();
+ customEndCap.reset( new EMFPCustomLineCap() );
customEndCap->Read(s, rR);
// maybe we don't read everything yet, play it safe ;-)
diff --git a/drawinglayer/source/tools/emfppen.hxx b/drawinglayer/source/tools/emfppen.hxx
index d3087bdd5412..5c0818bf8ba5 100644
--- a/drawinglayer/source/tools/emfppen.hxx
+++ b/drawinglayer/source/tools/emfppen.hxx
@@ -60,9 +60,9 @@ namespace emfplushelper
sal_Int32 alignment;
std::vector<float> compoundArray;
sal_Int32 customStartCapLen;
- EMFPCustomLineCap *customStartCap;
+ std::unique_ptr<EMFPCustomLineCap> customStartCap;
sal_Int32 customEndCapLen;
- EMFPCustomLineCap *customEndCap;
+ std::unique_ptr<EMFPCustomLineCap> customEndCap;
EMFPPen();