summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx8
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx5
-rw-r--r--sw/source/uibase/shells/textsh1.cxx14
3 files changed, 20 insertions, 7 deletions
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 46825f29a320..a0f7ec33225f 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -283,7 +283,13 @@ short AbstractSwContentControlListItemDlg_Impl::Execute()
short AbstractSwModalRedlineAcceptDlg_Impl::Execute()
{
- return m_xDlg->run();
+ assert(false);
+ return -1;
+}
+
+bool AbstractSwModalRedlineAcceptDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx)
+{
+ return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
}
short AbstractGlossaryDlg_Impl::Execute()
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 88e9d2b632c7..9e04a8b70db3 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -509,13 +509,14 @@ public:
class AbstractSwModalRedlineAcceptDlg_Impl : public AbstractSwModalRedlineAcceptDlg
{
- std::unique_ptr<SwModalRedlineAcceptDlg> m_xDlg;
+ std::shared_ptr<SwModalRedlineAcceptDlg> m_xDlg;
public:
- explicit AbstractSwModalRedlineAcceptDlg_Impl(std::unique_ptr<SwModalRedlineAcceptDlg> p)
+ explicit AbstractSwModalRedlineAcceptDlg_Impl(std::shared_ptr<SwModalRedlineAcceptDlg> p)
: m_xDlg(std::move(p))
{
}
virtual short Execute() override;
+ virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &) override;
};
class SwGlossaryDlg;
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;