diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-18 13:32:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-19 11:04:37 +0200 |
commit | 3991cd38484883b8544be908b6834564345fd0f1 (patch) | |
tree | dfc1577d3cefe069aedc54a21824aac11081ea36 /svx/source/unodraw | |
parent | 049fc31e5557eada26a39bf8a06bfdb8f1cbb205 (diff) |
use std::unique_ptr in SvxUnoPropertyMapProvider
Change-Id: I774718e74bdf2e022a01188a05c8928813ad653f
Reviewed-on: https://gerrit.libreoffice.org/43524
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r-- | svx/source/unodraw/unoprov.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
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. |