diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-01-23 12:58:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-01-24 10:51:00 +0100 |
commit | a9ee88cc47783a809f6c49f5b7326180dc0bbead (patch) | |
tree | 1eac89c6e6434517c7d8611f2a9de6b17d7aac86 /chart2 | |
parent | ad8248bcc7ed19285147aeff777771a508453a61 (diff) |
make text-table dialog async
Change-Id: Ic24b2b935f1d539cf257194d136d901b52e00a84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162433
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/main/ShapeController.cxx | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx index fe09d3e9af61..c440a7d97925 100644 --- a/chart2/source/controller/main/ShapeController.cxx +++ b/chart2/source/controller/main/ShapeController.cxx @@ -320,20 +320,26 @@ void ShapeController::executeDispatch_TextAttributes() pDrawViewWrapper->MergeAttrFromMarked( aAttr, false ); } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr< SfxAbstractTabDialog > pDlg( + VclPtr< SfxAbstractTabDialog > pDlg( pFact->CreateTextTabDialog(pChartWindow, &aAttr, pDrawViewWrapper)); - if ( pDlg->Execute() == RET_OK ) - { - const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet(); - if ( bHasMarked ) - { - pDrawViewWrapper->SetAttributes( *pOutAttr ); - } - else + pDlg->StartExecuteAsync( + [pDlg, bHasMarked, pDrawViewWrapper] (sal_Int32 nResult)->void { - pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false ); + if ( RET_OK == nResult ) + { + const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet(); + if ( bHasMarked ) + { + pDrawViewWrapper->SetAttributes( *pOutAttr ); + } + else + { + pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false ); + } + } + pDlg->disposeOnce(); } - } + ); } void ShapeController::executeDispatch_TransformDialog() |