diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-11-07 16:01:32 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-12-05 15:28:20 +0100 |
commit | 8ff0a20d1ebbd8aebbf0473d0586479b160bdd87 (patch) | |
tree | 47262c8864f37a6772d378a162dc90860bd8fdd6 | |
parent | c58f8ac77e38d23bb5737a1e58e8f90509956c38 (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>
(cherry picked from commit 8d69ca60f3c8f53699986f924291a2acda5694a1)
Reviewed-on: https://gerrit.libreoffice.org/82251
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit c7be35e618eddf7b83faae1fd8211a4c52a9d35b)
Reviewed-on: https://gerrit.libreoffice.org/84309
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-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 08ee292a6d94..2d72558feb00 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -298,15 +298,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(); |