diff options
author | Henry Castro <hcastro@collabora.com> | 2020-12-04 17:34:48 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2020-12-18 18:21:37 +0100 |
commit | 4ea3ec3d3aaa304b9769c2d5c7556529cc4df9ff (patch) | |
tree | f512fc2607ab375e1fbb256664488f60d0ea40f2 /cui | |
parent | ca839b341883c1238f27ba42236f08ebb49d53a4 (diff) |
lok: run async the Macro Selector Dialog
Required to be called by the client side
Change-Id: I9c9d22dd249839009bdc6a701553f3b9d776347a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107246
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 1 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 7 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 5 |
3 files changed, 10 insertions, 3 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 778e2940ba1d..f694f26fd6bc 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -42,6 +42,7 @@ #include <sfx2/minfitem.hxx> #include <comphelper/SetFlagContextHelper.hxx> #include <comphelper/documentinfo.hxx> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> #include <svtools/imagemgr.hxx> diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index e43b027602c4..d10914440db5 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -145,6 +145,11 @@ short AbstractTitleDialog_Impl::Execute() return m_xDlg->run(); } +bool AbstractScriptSelectorDialog_Impl::StartExecuteAsync(AsyncContext &rCtx) +{ + return SfxDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} + short AbstractScriptSelectorDialog_Impl::Execute() { return m_xDlg->run(); @@ -1113,7 +1118,7 @@ void AbstractDialogFactory_Impl::ShowAsyncScriptErrorDialog(weld::Window* pParen VclPtr<AbstractScriptSelectorDialog> AbstractDialogFactory_Impl::CreateScriptSelectorDialog(weld::Window* pParent, const Reference<frame::XFrame>& rxFrame) { - return VclPtr<AbstractScriptSelectorDialog_Impl>::Create(std::make_unique<SvxScriptSelectorDialog>(pParent, rxFrame)); + return VclPtr<AbstractScriptSelectorDialog_Impl>::Create(std::make_shared<SvxScriptSelectorDialog>(pParent, rxFrame)); } OUString AbstractScriptSelectorDialog_Impl::GetScriptURL() const diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index a9d521708f5d..87ad9730b307 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -283,13 +283,14 @@ public: class SvxScriptSelectorDialog; class AbstractScriptSelectorDialog_Impl : public AbstractScriptSelectorDialog { - std::unique_ptr<SvxScriptSelectorDialog> m_xDlg; + std::shared_ptr<SvxScriptSelectorDialog> m_xDlg; public: - explicit AbstractScriptSelectorDialog_Impl(std::unique_ptr<SvxScriptSelectorDialog> p) + explicit AbstractScriptSelectorDialog_Impl(std::shared_ptr<SvxScriptSelectorDialog> p) : m_xDlg(std::move(p)) { } virtual short Execute() override; + virtual bool StartExecuteAsync(AsyncContext &rCtx) override; virtual OUString GetScriptURL() const override; virtual void SetRunLabel() override; }; |