diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-06 11:22:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-06 18:38:22 +0200 |
commit | a7ff945ca031324f060b0d989f7a89594fcfe9fe (patch) | |
tree | ee502330c3e52c59aa2a4c5d97b6307c5a6babe5 /dbaccess | |
parent | 6668b112b341edd24ca77ba88b834108d67b0602 (diff) |
add SfxItemPoolDeleter utility
add use so we can hold the pool with std::unique_ptr
Change-Id: I685fbc37c0ae145a5b48a66a88eab9fb29a0fc0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115174
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index b134c9fdcf3e..f22c9198ca69 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -788,7 +788,7 @@ bool callColumnFormatDialog(weld::Widget* _pParent, new SvxNumberInfoItem(SID_ATTR_NUMBERFORMAT_INFO) }; - SfxItemPool* pPool = new SfxItemPool("GridBrowserProperties", SBA_DEF_RANGEFORMAT, SBA_ATTR_ALIGN_HOR_JUSTIFY, aItemInfos, &pDefaults); + std::unique_ptr<SfxItemPool, SfxItemPoolDeleter> pPool(new SfxItemPool("GridBrowserProperties", SBA_DEF_RANGEFORMAT, SBA_ATTR_ALIGN_HOR_JUSTIFY, aItemInfos, &pDefaults)); pPool->SetDefaultMetric( MapUnit::MapTwip ); // ripped, don't understand why pPool->FreezeIdRanges(); // the same @@ -855,7 +855,7 @@ bool callColumnFormatDialog(weld::Widget* _pParent, } pFormatDescriptor.reset(); - SfxItemPool::Free(pPool); + pPool.reset(); for (SfxPoolItem* pDefault : pDefaults) delete pDefault; |