summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-12-04 17:34:48 -0400
committerHenry Castro <hcastro@collabora.com>2021-01-18 22:06:56 +0100
commit3557bb2a5cb2119dba7d84bdd723c5887e64c2d0 (patch)
tree3b21c87ae445e7120f50cf6330ba61a8cc1f375c /cui
parent668fe5ba93a80f3949d0747917f74292a2606215 (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109137 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.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 1d94255e73eb..a980d4b7fa3f 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 be6351d04b8b..f8399d259071 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -148,6 +148,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();
@@ -1132,7 +1137,7 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateScriptErrorDialog(co
VclPtr<AbstractScriptSelectorDialog> AbstractDialogFactory_Impl::CreateScriptSelectorDialog(weld::Window* pParent,
const Reference<frame::XFrame>& rxFrame)
{
- return VclPtr<AbstractScriptSelectorDialog_Impl>::Create(std::make_unique<SvxScriptSelectorDialog>(pParent, false/*bShowSlots*/, rxFrame));
+ return VclPtr<AbstractScriptSelectorDialog_Impl>::Create(std::make_shared<SvxScriptSelectorDialog>(pParent, false/*bShowSlots*/, rxFrame));
}
OUString AbstractScriptSelectorDialog_Impl::GetScriptURL() const
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 27566e6a7224..08a78ef42d57 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -313,13 +313,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;
};