sfx2/source/doc/objstor.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 2a37b1a8b7c614fde66894c891f0ae57162a44a1
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Tue Feb 4 10:36:09 2020 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Jul 5 08:32:06 2021 +0200

    Allow opt-out from document events check
    
    Commit b3edf85e0fe6ca03dc26e1bf531be82193bc9627 added a warning on load
    when a document binds events to a macro.
    
    This adds an option to restore the old behavior, so that the warning only
    appears when a document actually has Macros.
    
    Change-Id: I5ad398d3d503a0954a746f4cba150f68630b820c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87961
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    (cherry picked from commit c161478ed50f6ee8878335db113f8850a136615b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118147
    Tested-by: Michael Weghorn <m.wegh...@posteo.de>
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index ab3dee35e5c2..b232a286900d 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3623,7 +3623,9 @@ void SfxObjectShell::SetMacroCallsSeenWhileLoading()
 
 bool SfxObjectShell::GetMacroCallsSeenWhileLoading() const
 {
-    return pImpl->m_bMacroCallsSeenWhileLoading;
+    if 
(officecfg::Office::Common::Security::Scripting::CheckDocumentEvents::get())
+        return pImpl->m_bMacroCallsSeenWhileLoading;
+    return false;
 }
 
 bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< 
task::XInteractionHandler >& xHandler )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to