diff options
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index af35a3a3dc7b..5cb16f8f1f58 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -62,6 +62,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <cassert> #include <osl/diagnose.h> +#include <officecfg/Office/Common.hxx> namespace basctl { @@ -308,7 +309,8 @@ void ModulWindow::BasicExecute() { // #116444# check security settings before macro execution ScriptDocument aDocument( GetDocument() ); - if (!aDocument.allowMacros()) + bool bMacrosDisabled = officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get(); + if (bMacrosDisabled || (aDocument.isDocument() && !aDocument.allowMacros())) { std::unique_ptr<weld::MessageDialog> xBox( Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Warning, |