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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user