diff options
author | Henry Castro <hcastro@collabora.com> | 2020-12-25 13:09:00 -0400 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2021-04-09 17:53:44 +0100 |
commit | 4b1c6ee557978fe253ebabeeaf93964a5deaf7eb (patch) | |
tree | 699ac3e3c4b822da6ce96ae3ddb7290adfc5aea9 /include/vcl/svapp.hxx | |
parent | lok: async exception dialog messages for VBA macros (diff) | |
download | core-4b1c6ee557978fe253ebabeeaf93964a5deaf7eb.tar.gz core-4b1c6ee557978fe253ebabeeaf93964a5deaf7eb.zip |
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 'include/vcl/svapp.hxx')
-rw-r--r-- | include/vcl/svapp.hxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index b1d7759765c3..bfa92cf88321 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -27,12 +27,14 @@ #include <vector> #include <comphelper/solarmutex.hxx> +#include <LibreOfficeKit/LibreOfficeKitTypes.h> #include <osl/mutex.hxx> #include <rtl/ustring.hxx> #include <osl/thread.h> #include <tools/gen.hxx> #include <tools/link.hxx> #include <vcl/dllapi.h> +#include <vcl/IDialogRenderable.hxx> #include <vcl/inputtypes.hxx> #include <vcl/exceptiontypes.hxx> #include <vcl/vclevent.hxx> @@ -227,7 +229,7 @@ enum class DialogCancelMode { @see Desktop, ImplSVData */ -class VCL_DLLPUBLIC Application +class VCL_DLLPUBLIC Application : public vcl::ILibreOfficeKitNotifier { public: /** @name Initialization @@ -1319,6 +1321,16 @@ public: bool bMobile = false); static weld::Window* GetFrameWeld(const css::uno::Reference<css::awt::XWindow>& rWindow); + + // ILibreOfficeKitNotifier + void* m_pCallbackData; + LibreOfficeKitCallback m_pCallback; + + virtual void notifyWindow(vcl::LOKWindowId nLOKWindowId, + const OUString& rAction, + const std::vector<vcl::LOKPayloadItem>& rPayload = std::vector<vcl::LOKPayloadItem>()) const override; + virtual void libreOfficeKitViewCallback(int nType, const char* pPayload) const override; + private: DECL_STATIC_LINK( Application, PostEventHandler, void*, void ); }; |