[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - basctl/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Thu Dec 5 14:29:54 UTC 2019
basctl/source/basicide/baside2.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit c1b4599ecff125894a1c83f3fdbaf6d49acef9b0
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Mon Nov 11 14:53:51 2019 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Dec 5 15:28:50 2019 +0100
Fix macro disabling in Basic IDE
After 8d69ca60f3c8f53699986f924291a2acda5694a1 macros were always disabled
as ScriptDocument::allowMacros always returned false when called from
non-document context.
Change-Id: Ibef4c7d561f4ee01cd44f5327e4ab948282bb07d
Reviewed-on: https://gerrit.libreoffice.org/82444
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
(cherry picked from commit 6a40737e1feb2e8d1992c46ee6c0e5cf30bab025)
Reviewed-on: https://gerrit.libreoffice.org/82489
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
(cherry picked from commit bed9f9b118566abcb96026e2e795c4c89fe18bb4)
Reviewed-on: https://gerrit.libreoffice.org/84310
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 2d72558feb00..ba19471502e4 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -53,6 +53,7 @@
#include <vcl/xtextedt.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <cassert>
+#include <officecfg/Office/Common.hxx>
namespace basctl
{
@@ -298,7 +299,8 @@ void ModulWindow::BasicExecute()
{
// #116444# check security settings before macro execution
ScriptDocument aDocument( GetDocument() );
- if (!aDocument.allowMacros())
+ bool bMacrosDisabled = officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get();
+ if (bMacrosDisabled || (aDocument.isDocument() && !aDocument.allowMacros()))
{
std::unique_ptr<weld::MessageDialog> xBox(
Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Warning,
More information about the Libreoffice-commits
mailing list