summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/source/mtfrenderer/emfppen.cxx6
-rw-r--r--cppcanvas/source/mtfrenderer/emfppen.hxx4
2 files changed, 4 insertions, 6 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 ;-)
diff --git a/cppcanvas/source/mtfrenderer/emfppen.hxx b/cppcanvas/source/mtfrenderer/emfppen.hxx
index d5abfa7e823c..75878df4805d 100644
--- a/cppcanvas/source/mtfrenderer/emfppen.hxx
+++ b/cppcanvas/source/mtfrenderer/emfppen.hxx
@@ -52,9 +52,9 @@ namespace cppcanvas
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();