summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();