summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-11-07 16:01:32 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-05-27 22:27:32 +0200
commit3264bd6aea2a8389cf0398da48381c8a3dd9504a (patch)
tree174f4672ef0ddb2f465f66dd126cc6df62a479bb /basctl
parentae41e431bc12311360c406351193595f0b479c93 (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>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 81efba1d5b3d..cfcb5f56c7b1 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -296,15 +296,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();