diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2020-02-04 10:36:09 +0100 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-02-03 23:59:23 +0100 |
commit | fc1bb2e5271f4810f7abebaf84eb6d839a3f3e43 (patch) | |
tree | 4dbd32e0ff4395872ec6c7d4e65cc8d8968ff9c7 /sfx2 | |
parent | 02c1cd9f93e5b5da469e9d6ff8668f415965ecfc (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/+/108141
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 4df362520b10..6daa9d5e507d 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -3591,7 +3591,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 ) |