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 /chart2/source/controller/main | |
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 'chart2/source/controller/main')
-rw-r--r-- | chart2/source/controller/main/ShapeController.cxx | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx index f977259ce77b..68483225b3bc 100644 --- a/chart2/source/controller/main/ShapeController.cxx +++ b/chart2/source/controller/main/ShapeController.cxx @@ -403,14 +403,20 @@ void ShapeController::executeDispatch_ObjectTitleDescription() bool isDecorative(pSelectedObj->IsDecorative()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); weld::Window* pChartWindow(m_pChartController->GetChartFrame()); - ScopedVclPtr< AbstractSvxObjectTitleDescDialog > pDlg( + VclPtr< AbstractSvxObjectTitleDescDialog > pDlg( pFact->CreateSvxObjectTitleDescDialog(pChartWindow, aTitle, aDescription, isDecorative)); - if ( pDlg->Execute() == RET_OK ) - { - pSelectedObj->SetTitle( pDlg->GetTitle() ); - pSelectedObj->SetDescription( pDlg->GetDescription() ); - pSelectedObj->SetDecorative(pDlg->IsDecorative()); - } + pDlg->StartExecuteAsync( + [pDlg, pSelectedObj] (sal_Int32 nResult)->void + { + if (nResult == RET_OK) + { + pSelectedObj->SetTitle( pDlg->GetTitle() ); + pSelectedObj->SetDescription( pDlg->GetDescription() ); + pSelectedObj->SetDecorative(pDlg->IsDecorative()); + } + pDlg->disposeOnce(); + } + ); } void ShapeController::executeDispatch_RenameObject() |