summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-12-04 17:34:48 -0400
committerMichael Meeks <michael.meeks@collabora.com>2021-04-10 15:51:14 +0100
commitc00215413afb9f3ba99e5aedff08269d8434728d (patch)
tree5c6c4d281d84d73194a104b4ecf46465711288de /cui
parent0dda8ba9cdc7fe6806d5ebca98cc628ec3d32db3 (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.cxx1
-rw-r--r--cui/source/factory/dlgfact.cxx7
-rw-r--r--cui/source/factory/dlgfact.hxx5
3 files changed, 10 insertions, 3 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index f1c5ccef7221..82e9f32a988d 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;
};