summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-04-28 14:57:53 +0100
committerCaolán McNamara <caolanm@redhat.com>2023-04-28 21:23:25 +0200
commit2b7773ebb8e8e1662adc4f90ae90f4f746254169 (patch)
tree8f81cc1f3e5a906aa59681b9f3e8dca3899d15c1 /unotools
parentf701edb6f72e50fae5857a81081d3503e5363b8f (diff)
survive exporting to pdf without config for fuzzing
Change-Id: I229f25a8a15b21257756ecfa008b9e99681003c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151172 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/securityoptions.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index 4749065fb431..b222b8e70502 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -165,12 +165,12 @@ bool isTrustedLocationUriForUpdatingLinks(OUString const & uri)
sal_Int32 GetMacroSecurityLevel()
{
- return officecfg::Office::Common::Security::Scripting::MacroSecurityLevel::get();
+ return utl::ConfigManager::IsFuzzing() ? 3 : officecfg::Office::Common::Security::Scripting::MacroSecurityLevel::get();
}
void SetMacroSecurityLevel( sal_Int32 _nLevel )
{
- if( officecfg::Office::Common::Security::Scripting::MacroSecurityLevel::isReadOnly() )
+ if (utl::ConfigManager::IsFuzzing() || officecfg::Office::Common::Security::Scripting::MacroSecurityLevel::isReadOnly())
return;
if( _nLevel > 3 || _nLevel < 0 )
@@ -183,7 +183,7 @@ void SetMacroSecurityLevel( sal_Int32 _nLevel )
bool IsMacroDisabled()
{
- return officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get();
+ return utl::ConfigManager::IsFuzzing() || officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get();
}
std::vector< SvtSecurityOptions::Certificate > GetTrustedAuthors()