summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/drwtxtsh.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-01-23 12:58:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-01-24 10:51:00 +0100
commita9ee88cc47783a809f6c49f5b7326180dc0bbead (patch)
tree1eac89c6e6434517c7d8611f2a9de6b17d7aac86 /sw/source/uibase/shells/drwtxtsh.cxx
parentad8248bcc7ed19285147aeff777771a508453a61 (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 'sw/source/uibase/shells/drwtxtsh.cxx')
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx24
1 files changed, 15 insertions, 9 deletions
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 26cd846edcb9..209e3bf0a04a 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -439,19 +439,25 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
SfxItemSet aNewAttr(m_pSdrView->GetModel().GetItemPool());
m_pSdrView->GetAttributes( aNewAttr );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(
+ VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(
GetView().GetFrameWeld(),
&aNewAttr, m_pSdrView ));
- sal_uInt16 nResult = pDlg->Execute();
-
- if (nResult == RET_OK)
- {
- if (m_pSdrView->AreObjectsMarked())
+ auto xRequest = std::make_shared<SfxRequest>(rReq);
+ rReq.Ignore(); // the 'old' request is not relevant any more
+ pDlg->StartExecuteAsync(
+ [this, pDlg, xRequest] (sal_Int32 nResult)->void
{
- m_pSdrView->SetAttributes(*pDlg->GetOutputItemSet());
- rReq.Done(*(pDlg->GetOutputItemSet()));
+ if (nResult == RET_OK)
+ {
+ if (m_pSdrView->AreObjectsMarked())
+ {
+ m_pSdrView->SetAttributes(*pDlg->GetOutputItemSet());
+ xRequest->Done(*(pDlg->GetOutputItemSet()));
+ }
+ }
+ pDlg->disposeOnce();
}
- }
+ );
}
break;
case SID_TABLE_VERT_NONE: