diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2020-02-04 10:36:09 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-02-04 22:19:41 +0100 |
commit | c161478ed50f6ee8878335db113f8850a136615b (patch) | |
tree | 1dd179f250ad4729ec68d1ce45dd84b2453a8959 | |
parent | 98c7c52e30a921a1bde3e4b2aa8c240d95ed577d (diff) |
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.Behrens@CIB.de>
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Common.xcs | 6 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index dbe38f526f05..0a880488324d 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -2728,6 +2728,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 5b7eb70d946a..56b8fdde8e0a 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -3583,7 +3583,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 ) |