[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - basctl/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 8 10:54:05 UTC 2019
basctl/source/basicide/baside2.cxx | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
New commits:
commit c7be35e618eddf7b83faae1fd8211a4c52a9d35b
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Thu Nov 7 16:01:32 2019 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Nov 8 11:53:20 2019 +0100
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 at cib.de>
(cherry picked from commit 8d69ca60f3c8f53699986f924291a2acda5694a1)
Reviewed-on: https://gerrit.libreoffice.org/82251
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
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();
More information about the Libreoffice-commits
mailing list