diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-01-22 14:12:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-01-22 19:48:35 +0100 |
commit | dde1868544bf325a359bdf4336623ac65e6ff4e0 (patch) | |
tree | bc42937af42ef1b1ef09196b1dee904188e8325f /sd/source | |
parent | 6a5ef1a2b009f208745a251828bf8e8c51146bfe (diff) |
object-title dialog can be used async
Change-Id: Ia5869788ccefcd17ef561bafb41da6f0d48fd54d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162394
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index d7c57a0581bc..3237f808a601 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -2700,21 +2700,26 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) bool isDecorative(pSelected->IsDecorative()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog( + VclPtr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog( GetFrameWeld(), aTitle, aDescription, isDecorative)); - if(RET_OK == pDlg->Execute()) - { - pSelected->SetTitle(pDlg->GetTitle()); - pSelected->SetDescription(pDlg->GetDescription()); - pSelected->SetDecorative(pDlg->IsDecorative()); - } + pDlg->StartExecuteAsync( + [this, pDlg, pSelected] (sal_Int32 nResult)->void + { + if (nResult == RET_OK) + { + pSelected->SetTitle(pDlg->GetTitle()); + pSelected->SetDescription(pDlg->GetDescription()); + pSelected->SetDecorative(pDlg->IsDecorative()); + } + pDlg->disposeOnce(); + SfxBindings& rBindings = GetViewFrame()->GetBindings(); + rBindings.Invalidate( SID_NAVIGATOR_STATE, true ); + rBindings.Invalidate( SID_CONTEXT ); + } + ); } - SfxBindings& rBindings = GetViewFrame()->GetBindings(); - rBindings.Invalidate( SID_NAVIGATOR_STATE, true ); - rBindings.Invalidate( SID_CONTEXT ); - Cancel(); rReq.Ignore(); break; |