diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-01-23 13:24:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-01-23 14:32:25 +0100 |
commit | f690e8218a74a0f7792407a1d46198883d2528ff (patch) | |
tree | 0c70dd98f344e9d32f8a5acab01dcdc5a27c7d34 /svx | |
parent | 6e20e58270c88c8c77f156be75c23c66e1169e44 (diff) |
make event config dialog async
Change-Id: Ibbfbc5024fb2be4906d0c312577310f28dde212d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162434
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/imapwnd.cxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 45ad2a9e9e26..0a6a65077226 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -665,15 +665,21 @@ void IMapWindow::DoMacroAssign() aSet.Put( aMacroItem ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog(GetDrawingArea(), aSet, mxDocumentFrame)); + VclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog(GetDrawingArea(), aSet, mxDocumentFrame)); - if ( pMacroDlg->Execute() == RET_OK ) - { - const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet(); - pIMapObj->SetMacroTable( pOutSet->Get( SID_ATTR_MACROITEM ).GetMacroTable() ); - pModel->SetChanged(); - UpdateInfo( false ); - } + pMacroDlg->StartExecuteAsync( + [this, pMacroDlg, pIMapObj] (sal_Int32 nResult)->void + { + if (nResult == RET_OK) + { + const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet(); + pIMapObj->SetMacroTable( pOutSet->Get( SID_ATTR_MACROITEM ).GetMacroTable() ); + pModel->SetChanged(); + UpdateInfo( false ); + } + pMacroDlg->disposeOnce(); + } + ); } void IMapWindow::DoPropertyDialog() |