diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-01-30 16:14:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-01-30 20:13:17 +0100 |
commit | 84572ef8c27fc4d4a7720303972f877ed2db8f79 (patch) | |
tree | 8b63d2fb8956731f28dd3109769019d767240b21 /sw/source/uibase/shells | |
parent | 9f5dd47de9c0dc9e95980fa08b4358aa9228c5c0 (diff) |
make redline-accept dialog async
Change-Id: Ib0cd3145b1f2d12926c1c17335551f0ba576bd7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162763
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/shells')
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 1a70f027fdef..a1680e5be43a 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1253,10 +1253,16 @@ void SwTextShell::Execute(SfxRequest &rReq) rVFrame.ToggleChildWindow(FN_REDLINE_ACCEPT); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSwModalRedlineAcceptDlg> xDlg(pFact->CreateSwModalRedlineAcceptDlg(GetView().GetEditWin().GetFrameWeld())); - - xDlg->Execute(); - rReq.Done(); + auto xRequest = std::make_shared<SfxRequest>(rReq); + rReq.Ignore(); // the 'old' request is not relevant any more + VclPtr<AbstractSwModalRedlineAcceptDlg> pDlg(pFact->CreateSwModalRedlineAcceptDlg(GetView().GetEditWin().GetFrameWeld())); + pDlg->StartExecuteAsync( + [pDlg, xRequest] (sal_Int32 /*nResult*/)->void + { + pDlg->disposeOnce(); + xRequest->Done(); + } + ); } break; |