sfx2/source/doc/objstor.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 46e48a45cd9251df12feee30a194708bcb3ba8bb Author: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> AuthorDate: Tue Feb 4 10:36:09 2020 +0100 Commit: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> CommitDate: Tue Jan 18 15:44:35 2022 +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/+/87961 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> (cherry picked from commit c161478ed50f6ee8878335db113f8850a136615b) 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 )