summaryrefslogtreecommitdiff
path: root/sc/source/ui/drawfunc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2024-01-22 08:36:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-01-24 06:58:14 +0100
commit76e9023c8abc823447b1128056e55238f90da8d6 (patch)
treede637aa9059a5baee266de2e48e9568a6b40e70f /sc/source/ui/drawfunc
parent0d37cbb937e4c8a72de07621ae7d4943b4a032e8 (diff)
convert more calc dialogs to async
Change-Id: I6349942f0a4d6156ef59f43a6e96049128f47524 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162360 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/drawfunc')
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx54
1 files changed, 32 insertions, 22 deletions
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 43ef902ddd6b..dfc3d94ef79f 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -557,20 +557,25 @@ void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
weld::Window* pWin = rViewData.GetDialogParent();
- ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(pWin, &aNewAttr, pView));
+ VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(pWin, &aNewAttr, pView));
- sal_uInt16 nResult = pDlg->Execute();
+ pDlg->StartExecuteAsync(
+ [pDlg, bHasMarked, pView] (sal_Int32 nResult)->void
+ {
+ if (nResult == RET_OK)
+ {
+ if ( bHasMarked )
+ pView->SetAttributes( *pDlg->GetOutputItemSet() );
+ else
+ pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
- if ( RET_OK == nResult )
- {
- if ( bHasMarked )
- pView->SetAttributes( *pDlg->GetOutputItemSet() );
- else
- pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
+ pView->InvalidateAttribs();
+ }
+ pDlg->disposeOnce();
+ }
+ );
- pView->InvalidateAttribs();
- rReq.Done();
- }
+ rReq.Done();
}
void ScDrawShell::ExecuteMeasureDlg( SfxRequest& rReq )
@@ -584,20 +589,25 @@ void ScDrawShell::ExecuteMeasureDlg( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
weld::Window* pWin = rViewData.GetDialogParent();
- ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog(pWin, aNewAttr, pView, RID_SVXPAGE_MEASURE));
+ VclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog(pWin, aNewAttr, pView, RID_SVXPAGE_MEASURE));
- sal_uInt16 nResult = pDlg->Execute();
+ pDlg->StartExecuteAsync(
+ [pDlg, bHasMarked, pView] (sal_Int32 nResult)->void
+ {
+ if (nResult == RET_OK)
+ {
+ if ( bHasMarked )
+ pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
+ else
+ pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
- if ( RET_OK == nResult )
- {
- if ( bHasMarked )
- pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
- else
- pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
+ pView->InvalidateAttribs();
+ }
+ pDlg->disposeOnce();
+ }
+ );
- pView->InvalidateAttribs();
- rReq.Done();
- }
+ rReq.Done();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */