diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-11-07 16:01:32 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-11-07 17:13:09 +0100 |
commit | 8d69ca60f3c8f53699986f924291a2acda5694a1 (patch) | |
tree | 86d025f60bfa10f272a39aa25c6bd72700b0f30d /basctl/source | |
parent | 498c2d3944b666c2f016b65903001920db2cb2a4 (diff) |
Always check whether macro execution is allowed
No only when this executing from a document.
Setting 'DisableMacrosExecution' had no effect on the macro editor,
macros could still be executed there.
Change-Id: I400ed25050173d2ce1fb612aebd2dbcb73720a73
Reviewed-on: https://gerrit.libreoffice.org/82229
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'basctl/source')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 7e0dc2b0288d..e8bac4aa19af 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -303,15 +303,13 @@ void ModulWindow::BasicExecute() { // #116444# check security settings before macro execution ScriptDocument aDocument( GetDocument() ); - if ( aDocument.isDocument() ) + if (!aDocument.allowMacros()) { - if ( !aDocument.allowMacros() ) - { - std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(), - VclMessageType::Warning, VclButtonsType::Ok, IDEResId(RID_STR_CANNOTRUNMACRO))); - xBox->run(); - return; - } + std::unique_ptr<weld::MessageDialog> xBox( + Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Warning, + VclButtonsType::Ok, IDEResId(RID_STR_CANNOTRUNMACRO))); + xBox->run(); + return; } CheckCompileBasic(); |