From 1683eb45c59a8609215685e31efb1bda707f6066 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 1 Aug 2024 10:58:40 +0200 Subject: tdf#161968 UI Assign macro to shape crashes CALC regression from commit f690e8218a74a0f7792407a1d46198883d2528ff Author: Noel Grandin Date: Tue Jan 23 13:24:29 2024 +0200 make event config dialog async Change-Id: Ie68aeb1171831da3b457afd945ccaaa248e652af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171370 Reviewed-by: Noel Grandin Tested-by: Jenkins (cherry picked from commit 514d7384470434a0b0b119e369ff615e2a1499c9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172071 Reviewed-by: Xisco Fauli --- sc/source/ui/drawfunc/drawsh.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sc') diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 53ca99000933..b24888e5c0f5 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -426,19 +426,19 @@ void ScDrawShell::ExecuteMacroAssign(SdrObject* pObj, weld::Window* pWin) } // create empty itemset for macro-dlg - SfxItemSetFixed aItemSet(SfxGetpApp()->GetPool() ); - aItemSet.Put ( aItem ); + auto xItemSet = std::make_unique>( SfxGetpApp()->GetPool() ); + xItemSet->Put ( aItem ); SfxEventNamesItem aNamesItem(SID_EVENTCONFIG); aNamesItem.AddEvent( ScResId(RID_SCSTR_ONCLICK), OUString(), SvMacroItemId::OnClick ); - aItemSet.Put( aNamesItem ); + xItemSet->Put( aNamesItem ); css::uno::Reference < css::frame::XFrame > xFrame; if (GetViewShell()) xFrame = GetViewShell()->GetViewFrame().GetFrame().GetFrameInterface(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - VclPtr pMacroDlg(pFact->CreateEventConfigDialog( pWin, aItemSet, xFrame )); + VclPtr pMacroDlg(pFact->CreateEventConfigDialog( pWin, std::move(xItemSet), xFrame )); pMacroDlg->StartExecuteAsync( [this, pMacroDlg, pObj, pInfo] (sal_Int32 nResult) mutable -> void { -- cgit