From 8af90b6ede741990e33ca842e096ba3d7ee5d53d Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Tue, 29 Dec 2020 16:40:14 -0400 Subject: lok: fix the "disable button" of the "Macro Security Warning"... Dialog. The client side cannot disable macros and close the message dialog Change-Id: Id78060d3c2b3c9c8ac010d8b951e7640b02ca715 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108489 Tested-by: Jenkins Reviewed-by: Henry Castro --- uui/source/secmacrowarnings.cxx | 6 ++++++ uui/source/secmacrowarnings.hxx | 1 + 2 files changed, 7 insertions(+) (limited to 'uui') diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index 1f048f0cb663..7a657d03ca2d 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -73,6 +73,7 @@ MacroWarning::MacroWarning(weld::Window* pParent, bool _bWithSignatures) InitControls(); 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 } @@ -120,6 +121,11 @@ IMPL_LINK_NOARG(MacroWarning, EnableBtnHdl, weld::Button&, void) m_xDialog->response(RET_OK); } +IMPL_LINK_NOARG(MacroWarning, DisableBtnHdl, weld::Button&, void) +{ + m_xDialog->response(RET_CANCEL); +} + IMPL_LINK_NOARG(MacroWarning, AlwaysTrustCheckHdl, weld::Button&, void) { const bool bEnable = (mnActSecLevel < 2 || mxAlwaysTrustCB->get_active()); diff --git a/uui/source/secmacrowarnings.hxx b/uui/source/secmacrowarnings.hxx index 536f70e09fc2..6a0c97e5f8d2 100644 --- a/uui/source/secmacrowarnings.hxx +++ b/uui/source/secmacrowarnings.hxx @@ -48,6 +48,7 @@ private: DECL_LINK(ViewSignsBtnHdl, weld::Button&, void); DECL_LINK(EnableBtnHdl, weld::Button&, void); + DECL_LINK(DisableBtnHdl, weld::Button&, void); DECL_LINK(AlwaysTrustCheckHdl, weld::Button&, void); void InitControls(); -- cgit