summaryrefslogtreecommitdiff
path: root/vcl/source/app/settings.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-19 15:27:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-19 20:28:35 +0100
commitf0e90c712b701b2d3b4f4725dfbed8c5ea924b0f (patch)
treef6de2296f69e8ea7ef9f2d51b79bd254b8dc042a /vcl/source/app/settings.cxx
parentb27417623835b1c82475783979a1fb9656b5155e (diff)
for testing allow disabling configmgr for time critical paths
Change-Id: I83396e7c90d3b182f353a77c9bdf06fd17af92a1
Diffstat (limited to 'vcl/source/app/settings.cxx')
-rw-r--r--vcl/source/app/settings.cxx25
1 files changed, 23 insertions, 2 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 33674f8371a3..a8fb56a9633d 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -50,6 +50,7 @@
#include "unotools/localedatawrapper.hxx"
#include "unotools/collatorwrapper.hxx"
#include "unotools/confignode.hxx"
+#include "unotools/configmgr.hxx"
#include "unotools/syslocaleoptions.hxx"
using namespace ::com::sun::star;
@@ -687,7 +688,10 @@ void ImplStyleData::SetStandardStyles()
vcl::Font aStdFont( FAMILY_SWISS, Size( 0, 8 ) );
aStdFont.SetCharSet( osl_getThreadTextEncoding() );
aStdFont.SetWeight( WEIGHT_NORMAL );
- aStdFont.SetName( utl::DefaultFontConfiguration::get().getUserInterfaceFont( LanguageTag("en")) );
+ if (!utl::ConfigManager::IsAvoidConfig())
+ aStdFont.SetName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en")));
+ else
+ aStdFont.SetName("Liberation Serif");
maAppFont = aStdFont;
maHelpFont = aStdFont;
maMenuFont = aStdFont;
@@ -2707,7 +2711,8 @@ ImplAllSettingsData::ImplAllSettingsData()
mpUILocaleDataWrapper = NULL;
mpI18nHelper = NULL;
mpUII18nHelper = NULL;
- maMiscSettings.SetEnableLocalizedDecimalSep( maSysLocale.GetOptions().IsDecimalSeparatorAsLocale() );
+ if (!utl::ConfigManager::IsAvoidConfig())
+ maMiscSettings.SetEnableLocalizedDecimalSep( maSysLocale.GetOptions().IsDecimalSeparatorAsLocale() );
}
ImplAllSettingsData::ImplAllSettingsData( const ImplAllSettingsData& rData ) :
@@ -2913,16 +2918,26 @@ namespace
bool AllSettings::GetLayoutRTL()
{
+ if (utl::ConfigManager::IsAvoidConfig())
+ return false;
return GetConfigLayoutRTL(false);
}
bool AllSettings::GetMathLayoutRTL()
{
+ if (utl::ConfigManager::IsAvoidConfig())
+ return false;
return GetConfigLayoutRTL(true);
}
const LanguageTag& AllSettings::GetLanguageTag() const
{
+ if (utl::ConfigManager::IsAvoidConfig())
+ {
+ static LanguageTag aRet("en-US");
+ return aRet;
+ }
+
// SYSTEM locale means: use settings from SvtSysLocale that is resolved
if ( mxData->maLocale.isSystemLocale() )
mxData->maLocale = mxData->maSysLocale.GetLanguageTag();
@@ -2932,6 +2947,12 @@ const LanguageTag& AllSettings::GetLanguageTag() const
const LanguageTag& AllSettings::GetUILanguageTag() const
{
+ if (utl::ConfigManager::IsAvoidConfig())
+ {
+ static LanguageTag aRet("en-US");
+ return aRet;
+ }
+
// the UILocale is never changed
if ( mxData->maUILocale.isSystemLocale() )
mxData->maUILocale = mxData->maSysLocale.GetUILanguageTag();