summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-11-05 16:43:50 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-11-06 08:11:52 +0100
commitf5d01aef7697478fe315098ed4855cfcdfc0379f (patch)
treee684c06d3f684aac969eff2ef15b6aca791fe4bf /scripting
parent23a040ea1e067ea6caada601868faf213231be7d (diff)
Check if scripting disabled for each dispatch call
Not only when initializing. This way, changing the property during runtime has an effect. Change-Id: Iba5f00996f0079fc4bafb5d373f34c6fd86c7959 Reviewed-on: https://gerrit.libreoffice.org/82078 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/protocolhandler/scripthandler.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index ed960848d072..c167fb3c42d8 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -71,7 +71,7 @@ namespace scripting_protocolhandler
void SAL_CALL ScriptProtocolHandler::initialize(
const css::uno::Sequence < css::uno::Any >& aArguments )
{
- if ( m_bInitialised || officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get() )
+ if ( m_bInitialised )
{
return ;
}
@@ -123,6 +123,9 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
const URL& aURL, const Sequence < PropertyValue >& lArgs,
const Reference< XDispatchResultListener >& xListener )
{
+ if (officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get())
+ return;
+
bool bSuccess = false;
Any invokeResult;
bool bCaughtException = false;