summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-12-25 13:36:03 -0400
committerMichael Meeks <michael.meeks@collabora.com>2021-04-10 15:49:33 +0100
commitacbf57b47fecc78ab31af151f6540c83ecc1d983 (patch)
tree967590422376fb8ed49d50a34080ccc9b86db654 /uui
parent110438d568e15c4b6c0baa91d32f53bd9f752d53 (diff)
lok: add global notifier to the "Macro Security Warning"
dialog. This message dialog is especial, because it is shown before loading the document so no way to get access to view shell notifier when the model/view/controller were not created. Change-Id: I5da3ca9d1009f174f2d96c1302770f4509a807cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108291 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'uui')
-rw-r--r--uui/source/secmacrowarnings.cxx7
-rw-r--r--uui/source/secmacrowarnings.hxx1
2 files changed, 8 insertions, 0 deletions
diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx
index 7a657d03ca2d..90d76d75e6ce 100644
--- a/uui/source/secmacrowarnings.cxx
+++ b/uui/source/secmacrowarnings.cxx
@@ -20,6 +20,7 @@
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <com/sun/star/security/DocumentDigitalSignatures.hpp>
#include <comphelper/processfactory.hxx>
+#include <vcl/svapp.hxx>
#include <osl/file.h>
#include <rtl/ustrbuf.hxx>
#include <tools/debug.hxx>
@@ -75,6 +76,12 @@ MacroWarning::MacroWarning(weld::Window* pParent, bool _bWithSignatures)
mxEnableBtn->connect_clicked(LINK(this, MacroWarning, EnableBtnHdl));
mxDisableBtn->connect_clicked(LINK(this, MacroWarning, DisableBtnHdl));
mxDisableBtn->grab_focus(); // Default button, but focus is on view button
+ m_xDialog->SetInstallLOKNotifierHdl(LINK(this, MacroWarning, InstallLOKNotifierHdl));
+}
+
+IMPL_STATIC_LINK_NOARG(MacroWarning, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*)
+{
+ return GetpApp();
}
void MacroWarning::SetDocumentURL( const OUString& rDocURL )
diff --git a/uui/source/secmacrowarnings.hxx b/uui/source/secmacrowarnings.hxx
index 6a0c97e5f8d2..b91cc092c708 100644
--- a/uui/source/secmacrowarnings.hxx
+++ b/uui/source/secmacrowarnings.hxx
@@ -50,6 +50,7 @@ private:
DECL_LINK(EnableBtnHdl, weld::Button&, void);
DECL_LINK(DisableBtnHdl, weld::Button&, void);
DECL_LINK(AlwaysTrustCheckHdl, weld::Button&, void);
+ DECL_STATIC_LINK(MacroWarning, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*);
void InitControls();