From 3991cd38484883b8544be908b6834564345fd0f1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 18 Oct 2017 13:32:59 +0200 Subject: use std::unique_ptr in SvxUnoPropertyMapProvider Change-Id: I774718e74bdf2e022a01188a05c8928813ad653f Reviewed-on: https://gerrit.libreoffice.org/43524 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/unodraw/unoprov.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'svx/source/unodraw') diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index abe266261ec6..ff8a6f48cd1d 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -902,8 +902,6 @@ SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider() SvxUnoPropertyMapProvider::~SvxUnoPropertyMapProvider() { - for(SvxItemPropertySet* p : aSetArr) - delete p; } @@ -949,8 +947,8 @@ const SfxItemPropertyMapEntry* SvxUnoPropertyMapProvider::GetMap(sal_uInt16 nPro const SvxItemPropertySet* SvxUnoPropertyMapProvider::GetPropertySet(sal_uInt16 nPropertyId, SfxItemPool& rPool) { if( !aSetArr[nPropertyId] ) - aSetArr[nPropertyId] = new SvxItemPropertySet( GetMap( nPropertyId ), rPool ); - return aSetArr[nPropertyId]; + aSetArr[nPropertyId].reset(new SvxItemPropertySet( GetMap( nPropertyId ), rPool )); + return aSetArr[nPropertyId].get(); } /** maps the vcl MapUnit enum to a API constant MeasureUnit. -- cgit