diff options
-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 2830a61082ba..cf4154524599 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -2668,6 +2668,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 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 ) |