summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-08-01 10:58:40 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2024-10-14 14:34:31 +0200
commit1683eb45c59a8609215685e31efb1bda707f6066 (patch)
treeff33004ebb34688875e787c33121e9f4611a3b6c /sc
parent449d6893cbe23bd44b374908443e95419581ca4f (diff)
tdf#161968 UI Assign macro to shape crashes CALC
regression from commit f690e8218a74a0f7792407a1d46198883d2528ff Author: Noel Grandin <noel.grandin@collabora.co.uk> 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 <noel.grandin@collabora.co.uk> Tested-by: Jenkins (cherry picked from commit 514d7384470434a0b0b119e369ff615e2a1499c9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172071 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx8
1 files changed, 4 insertions, 4 deletions
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<SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG> aItemSet(SfxGetpApp()->GetPool() );
- aItemSet.Put ( aItem );
+ auto xItemSet = std::make_unique<SfxItemSetFixed<SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG>>( 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<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog( pWin, aItemSet, xFrame ));
+ VclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog( pWin, std::move(xItemSet), xFrame ));
pMacroDlg->StartExecuteAsync(
[this, pMacroDlg, pObj, pInfo] (sal_Int32 nResult) mutable -> void
{