summaryrefslogtreecommitdiffstats
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-26 12:06:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-26 13:30:49 +0200
commit4054dff516367b332b7e3ce6fa91a452bf690571 (patch)
tree74ce35623e84933e4da9b134855ac1c74c4bce1d /cui
parentloplugin:singlevalfields improvement (diff)
downloadcore-4054dff516367b332b7e3ce6fa91a452bf690571.tar.gz
core-4054dff516367b332b7e3ce6fa91a452bf690571.zip
use unique_ptr when Clone()'ing PoolItems
and fix a handful of small leaks in the process Change-Id: I876e12ff5305f9dda84532d4182fb91657d6fa0c Reviewed-on: https://gerrit.libreoffice.org/62389 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/treeopt.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 47d3a7ffcaa7..ee1070ab4ec3 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1238,9 +1238,8 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId
pRet->Put(aHyphen);
if(SfxItemState::DEFAULT <= pDispatch->QueryState(SID_AUTOSPELL_CHECK, pItem))
{
- SfxPoolItem* pClone = pItem->Clone();
+ std::unique_ptr<SfxPoolItem> pClone(pItem->Clone());
pRet->Put(*pClone);
- delete pClone;
}
else
{