diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-04-28 14:57:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-04-28 21:23:25 +0200 |
commit | 2b7773ebb8e8e1662adc4f90ae90f4f746254169 (patch) | |
tree | 8f81cc1f3e5a906aa59681b9f3e8dca3899d15c1 /vcl/source/window/settings.cxx | |
parent | f701edb6f72e50fae5857a81081d3503e5363b8f (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 'vcl/source/window/settings.cxx')
-rw-r--r-- | vcl/source/window/settings.cxx | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx index 378ba1c6004d..329b63038f7a 100644 --- a/vcl/source/window/settings.cxx +++ b/vcl/source/window/settings.cxx @@ -226,17 +226,21 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl ) c aFont.SetFontHeight( defFontheight ); aStyleSettings.SetGroupFont( aFont ); - static const char* pEnvHC = getenv( "SAL_FORCE_HC" ); - const bool bForceHCMode = pEnvHC && *pEnvHC; - if (bForceHCMode) - aStyleSettings.SetHighContrastMode( true ); - else + static const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + if (!bFuzzing) { - sal_Int32 nHighContrastMode = officecfg::Office::Common::Accessibility::HighContrast::get(); - if (nHighContrastMode != 0) // 0 Automatic, 1 Disable, 2 Enable + static const char* pEnvHC = getenv( "SAL_FORCE_HC" ); + const bool bForceHCMode = pEnvHC && *pEnvHC; + if (bForceHCMode) + aStyleSettings.SetHighContrastMode( true ); + else { - const bool bEnable = nHighContrastMode == 2; - aStyleSettings.SetHighContrastMode(bEnable); + sal_Int32 nHighContrastMode = officecfg::Office::Common::Accessibility::HighContrast::get(); + if (nHighContrastMode != 0) // 0 Automatic, 1 Disable, 2 Enable + { + const bool bEnable = nHighContrastMode == 2; + aStyleSettings.SetHighContrastMode(bEnable); + } } } |