summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-12-25 13:09:00 -0400
committerHenry Castro <hcastro@collabora.com>2021-01-19 04:06:06 +0100
commitfc67bb78c08847d8ce96b3b53a902cabcf6106c1 (patch)
tree59fb883df06b689d4c8bcdff85e2d0ae8239b635 /desktop
parent68016cd0d8f21c2e9760ad1f3400d2e1df7c4d4c (diff)
lok: add missing global notifier
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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109168 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 1800ff5ed7db..35ea08209e7e 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2472,11 +2472,14 @@ static void lo_registerCallback (LibreOfficeKit* pThis,
{
SolarMutexGuard aGuard;
+ Application* pApp = GetpApp();
+ assert(pApp);
+
LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
pLib->maLastExceptionMsg.clear();
- pLib->mpCallback = pCallback;
- pLib->mpCallbackData = pData;
+ pApp->m_pCallback = pLib->mpCallback = pCallback;
+ pApp->m_pCallbackData = pLib->mpCallbackData = pData;
}
static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const char* pFormat, const char* pFilterOptions)