summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-12-25 13:09:00 -0400
committerMichael Meeks <michael.meeks@collabora.com>2021-04-09 17:53:44 +0100
commit4b1c6ee557978fe253ebabeeaf93964a5deaf7eb (patch)
tree699ac3e3c4b822da6ce96ae3ddb7290adfc5aea9 /vcl
parent91ce0453fab671df3cdf1e202a9baed281b2b9e9 (diff)
lok: add missing global notifier private/mmeeks/backports
Occurs when server shows the "Macro Security Warning" before load the document if enable/disable macros, but there are no instances for document/view/controller yet. So it is required to use the global notifier so it can be sent messages to the client side using the JSDialog framework. Change-Id: I67f15b21cbaf21906b88145f3c5835cf0e1ff79d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108288 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/svapp.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 676fa26e1038..332075cccd93 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -164,6 +164,8 @@ Application::Application()
osl_setEnvironment(aVar.pData, aValue.pData);
ImplGetSVData()->mpApp = this;
+ m_pCallbackData = nullptr;
+ m_pCallback = nullptr;
}
Application::~Application()
@@ -313,6 +315,23 @@ void Application::EndAllPopups()
Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplEndAllPopupsMsg ) );
}
+void Application::notifyWindow(vcl::LOKWindowId /*nLOKWindowId*/,
+ const OUString& /*rAction*/,
+ const std::vector<vcl::LOKPayloadItem>& /*rPayload = std::vector<LOKPayloadItem>()*/) const
+{
+}
+
+void Application::libreOfficeKitViewCallback(int nType, const char* pPayload) const
+{
+ if (!comphelper::LibreOfficeKit::isActive())
+ return;
+
+ if (m_pCallback)
+ {
+ m_pCallback(nType, pPayload, m_pCallbackData);
+ }
+}
+
namespace
{