diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-27 20:47:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-28 12:18:03 +0200 |
commit | 83fb7db6911aa77d713f3da0391b680e55563181 (patch) | |
tree | e54ce90695acf14f3a77ea4b2680997c22e55ae8 /cui | |
parent | fbfb57635b602b50cb22465047ae5bcdbef3dd0a (diff) |
no need to allocate these SfxItemSet on the heap
use std::optional where the code needs to control the lifetime of the
object explicitly
Change-Id: Ia550ce051360f68911abc68c945a97d62a637b06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116291
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/hltpbase.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 9515443e67d7..b636c94ecb0f 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -341,14 +341,14 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, weld::Button&, voi aItem.SetMacroTable( *pMacroTbl ); // create empty itemset for macro-dlg - std::unique_ptr<SfxItemSet> pItemSet( new SfxItemSet(SfxGetpApp()->GetPool(), - svl::Items<SID_ATTR_MACROITEM, - SID_ATTR_MACROITEM>{} ) ); - pItemSet->Put ( aItem ); + SfxItemSet aItemSet( SfxGetpApp()->GetPool(), + svl::Items<SID_ATTR_MACROITEM, + SID_ATTR_MACROITEM>{} ); + aItemSet.Put ( aItem ); DisableClose( true ); - SfxMacroAssignDlg aDlg(mpDialog->getDialog(), mxDocumentFrame, *pItemSet); + SfxMacroAssignDlg aDlg(mpDialog->getDialog(), mxDocumentFrame, aItemSet); // add events SfxMacroTabPage *pMacroPage = aDlg.GetTabPage(); |