From 84572ef8c27fc4d4a7720303972f877ed2db8f79 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 30 Jan 2024 16:14:08 +0200 Subject: make redline-accept dialog async Change-Id: Ib0cd3145b1f2d12926c1c17335551f0ba576bd7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162763 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/uibase/shells/textsh1.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'sw/source/uibase/shells') 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 xDlg(pFact->CreateSwModalRedlineAcceptDlg(GetView().GetEditWin().GetFrameWeld())); - - xDlg->Execute(); - rReq.Done(); + auto xRequest = std::make_shared(rReq); + rReq.Ignore(); // the 'old' request is not relevant any more + VclPtr pDlg(pFact->CreateSwModalRedlineAcceptDlg(GetView().GetEditWin().GetFrameWeld())); + pDlg->StartExecuteAsync( + [pDlg, xRequest] (sal_Int32 /*nResult*/)->void + { + pDlg->disposeOnce(); + xRequest->Done(); + } + ); } break; -- cgit