diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index 8f33efdb29cb..185cfe69f26e 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -2713,6 +2713,7 @@ Specifies whether the macro execution is disabled in general. + This will disable Basic, Beanshell, Javascript and Python scripts. If it is set to true, the "MacroSecurityLevel" is ignored. If it is set to false, the mentioned entry specified the level of macro security. diff --git a/scripting/Library_protocolhandler.mk b/scripting/Library_protocolhandler.mk index 3d243f7f849b..b14add0fe7a6 100644 --- a/scripting/Library_protocolhandler.mk +++ b/scripting/Library_protocolhandler.mk @@ -20,6 +20,10 @@ $(eval $(call gb_Library_use_external,protocolhandler,boost_headers)) $(eval $(call gb_Library_use_sdk_api,protocolhandler)) +$(eval $(call gb_Library_use_custom_headers,protocolhandler,\ + officecfg/registry \ +)) + $(eval $(call gb_Library_use_libraries,protocolhandler,\ comphelper \ cppu \ 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 ; }