diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-26 12:06:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-26 13:30:49 +0200 |
commit | 4054dff516367b332b7e3ce6fa91a452bf690571 (patch) | |
tree | 74ce35623e84933e4da9b134855ac1c74c4bce1d /cui | |
parent | c0cc59adca23580864a2e5cdadf66212246cbfcc (diff) |
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.cxx | 3 |
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 { |