From 730e588b5ef31c72eccef23f359747f8248e5cf4 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Tue, 5 Nov 2019 09:17:41 +0100 Subject: Fix option to disable macros so that it indeeds disables any macro execution. Before, you could still add macros to the toolbar and execute them from there (and probably many more places). Now, if this option is set, any macro will no longer be executed. This includes Javascript, Beanshell and Python scripts Change-Id: Icfa845e836782c8e1b670a67694f79a60ad74fad Reviewed-on: https://gerrit.libreoffice.org/82052 Reviewed-by: Serge Krot (CIB) Tested-by: Serge Krot (CIB) --- scripting/source/protocolhandler/scripthandler.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripting/source') diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx index 1fbf0c8bbc46..ed960848d072 100644 --- a/scripting/source/protocolhandler/scripthandler.cxx +++ b/scripting/source/protocolhandler/scripthandler.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -70,7 +71,7 @@ namespace scripting_protocolhandler void SAL_CALL ScriptProtocolHandler::initialize( const css::uno::Sequence < css::uno::Any >& aArguments ) { - if ( m_bInitialised ) + if ( m_bInitialised || officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get() ) { return ; } -- cgit