summaryrefslogtreecommitdiff
path: root/unotools/source/misc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-07-10 11:04:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-19 01:04:00 +0000
commit6b7354ae66db40246a09e00aa876443057655a43 (patch)
treee7eb5d71ecd2a6ec8110945a946549500dae7a8a /unotools/source/misc
parent5120b3f30614f6e4988c512577da1d70be8d25b1 (diff)
for testing allow disabling configmgr for time critical paths
Change-Id: I08021f18d53e1748927f8847649994f95252bbc2 Reviewed-on: https://gerrit.libreoffice.org/17844 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'unotools/source/misc')
-rw-r--r--unotools/source/misc/syslocale.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/unotools/source/misc/syslocale.cxx b/unotools/source/misc/syslocale.cxx
index 179052045869..117d5d854380 100644
--- a/unotools/source/misc/syslocale.cxx
+++ b/unotools/source/misc/syslocale.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <sal/log.hxx>
+#include <unotools/configmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/syslocaleoptions.hxx>
#include <comphelper/processfactory.hxx>
@@ -54,7 +55,13 @@ private:
SvtSysLocale_Impl::SvtSysLocale_Impl() : pCharClass(NULL)
{
- pLocaleData = new LocaleDataWrapper( aSysLocaleOptions.GetRealLanguageTag() );
+ if (utl::ConfigManager::IsAvoidConfig())
+ {
+ pLocaleData = NULL;
+ return;
+ }
+
+ pLocaleData = new LocaleDataWrapper(aSysLocaleOptions.GetRealLanguageTag());
setDateAcceptancePatternsConfig();
// listen for further changes
@@ -114,6 +121,9 @@ void SvtSysLocale_Impl::setDateAcceptancePatternsConfig()
SvtSysLocale::SvtSysLocale()
{
+ if (utl::ConfigManager::IsAvoidConfig())
+ return;
+
MutexGuard aGuard( GetMutex() );
if ( !pImpl )
pImpl = new SvtSysLocale_Impl;