summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-11-07 16:01:32 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-12-04 13:42:21 +0100
commit5f17232d9403a1d740ac49edc9dedf90dfa61b85 (patch)
treecbef8e6803b715fea39611d2ccb976cfce8cf92a
parentf9843477ffe9a195460d2a9e7977ab9c9e62ba49 (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>
-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 dd1da4e144d6..4ee60fb48146 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -302,15 +302,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();