diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx index aebaf385e64b..2ce40b75a3f0 100644 --- a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx +++ b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx @@ -27,8 +27,10 @@ #include #include +#include #include #include +#include #include namespace dbaccess @@ -166,6 +168,16 @@ namespace dbaccess if ( bDispatchScriptURL && bNonEmptyScript ) { + // the same three tests an office document takes before a bound script runs + if ( !SfxObjectShell::isScriptURLAllowed( sScript ) ) + return; + + if ( !SfxObjectShell::isScriptAccessAllowed( cppu::getXWeak( xDocument.get() ) ) ) + return; + + if ( SfxObjectShell::UnTrustedScript( sScript ) ) + return; + lcl_dispatchScriptURL_throw( mxDocument, mxURLTransformer, sScript, Event ); } }