summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-12-25 13:36:03 -0400
committerHenry Castro <hcastro@collabora.com>2021-01-19 11:12:36 +0100
commitd135c247ab56c505c4830546607ef086c20a0990 (patch)
tree3c4b0e8cfbeba630dd28d7259f9bcfe23542e6f5 /uui
parent2054b11539d2c2e67930c1ee32326ebe20f25c3e (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109147 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.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 e02c6946f393..c63c0a3f9499 100644
--- a/uui/source/secmacrowarnings.cxx
+++ b/uui/source/secmacrowarnings.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/security/DocumentDigitalSignatures.hpp>
#include <comphelper/documentconstants.hxx>
#include <comphelper/processfactory.hxx>
+#include <vcl/svapp.hxx>
#include <osl/file.h>
#include <sal/macros.h>
#include <tools/debug.hxx>
@@ -78,6 +79,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 6e4b433a2a55..808b77a9aee9 100644
--- a/uui/source/secmacrowarnings.hxx
+++ b/uui/source/secmacrowarnings.hxx
@@ -53,6 +53,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();