From 83fb7db6911aa77d713f3da0391b680e55563181 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 27 May 2021 20:47:06 +0200 Subject: 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 --- cui/source/dialogs/hltpbase.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cui/source') 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 pItemSet( new SfxItemSet(SfxGetpApp()->GetPool(), - svl::Items{} ) ); - pItemSet->Put ( aItem ); + SfxItemSet aItemSet( SfxGetpApp()->GetPool(), + svl::Items{} ); + aItemSet.Put ( aItem ); DisableClose( true ); - SfxMacroAssignDlg aDlg(mpDialog->getDialog(), mxDocumentFrame, *pItemSet); + SfxMacroAssignDlg aDlg(mpDialog->getDialog(), mxDocumentFrame, aItemSet); // add events SfxMacroTabPage *pMacroPage = aDlg.GetTabPage(); -- cgit v1.2.3