summaryrefslogtreecommitdiff
path: root/cppcanvas/source/mtfrenderer/emfppen.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-16 14:04:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-19 08:58:46 +0200
commit2b63eea0d4e43ffa23c889519011c870a9a55e58 (patch)
tree3e48b1146365357f3dc58af4942d48f779c5ef96 /cppcanvas/source/mtfrenderer/emfppen.cxx
parent42b80f4ed300b08074ed3a6dd48679afd5af760a (diff)
loplugin:useuniqueptr in EMFPPen
Change-Id: Icc50b2ff1d6c7490b67d39aed7c3621b74c03bac
Diffstat (limited to 'cppcanvas/source/mtfrenderer/emfppen.cxx')
-rw-r--r--cppcanvas/source/mtfrenderer/emfppen.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfppen.cxx b/cppcanvas/source/mtfrenderer/emfppen.cxx
index 2bd005e4aab4..aa34a527a33d 100644
--- a/cppcanvas/source/mtfrenderer/emfppen.cxx
+++ b/cppcanvas/source/mtfrenderer/emfppen.cxx
@@ -91,8 +91,6 @@ namespace cppcanvas
EMFPPen::~EMFPPen()
{
- delete customStartCap;
- delete customEndCap;
}
void EMFPPen::SetStrokeWidth(rendering::StrokeAttributes& rStrokeAttributes, ImplRenderer const & rR, const OutDevState& rState)
@@ -267,7 +265,7 @@ namespace cppcanvas
SAL_INFO("cppcanvas.emf", "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 ;-)
@@ -282,7 +280,7 @@ namespace cppcanvas
SAL_INFO("cppcanvas.emf", "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 ;-)