[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - officecfg/registry sfx2/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 22 08:18:02 UTC 2020


 officecfg/registry/schema/org/openoffice/Office/Common.xcs |    6 ++++++
 sfx2/source/doc/objstor.cxx                                |    4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 5dd2945ee2ea533de229a43eeee790ece651775a
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Tue Feb 4 10:36:09 2020 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Dec 22 09:17:24 2020 +0100

    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/+/108141
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 3e9590a22977..2df062a36c62 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2664,6 +2664,12 @@
           </info>
           <value>false</value>
         </prop>
+        <prop oor:name="CheckDocumentEvents" oor:type="xs:boolean" oor:nillable="false">
+          <info>
+            <desc>Warn on load when a document binds an event to a macro</desc>
+          </info>
+          <value>true</value>
+        </prop>
         <set oor:name="TrustedAuthors" oor:node-type="TrustedAuthor">
           <info>
             <desc>List with trusted authors.</desc>
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 0b4b933318ad..43d61cf247bc 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3569,7 +3569,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 )


More information about the Libreoffice-commits mailing list