diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-09-29 14:24:07 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-09-29 14:25:16 +0200 |
commit | 377316db2b02c56a552c8ebb9ee4d4fc02e1a708 (patch) | |
tree | f64fff01be48303fc35950d041455ac2a6b7a900 /test | |
parent | a08df51f64757e5c785d89b9fdd55a9dbe32bd6d (diff) |
change to the old way to set the language to en-US for unit tests
Diffstat (limited to 'test')
-rw-r--r-- | test/prj/build.lst | 2 | ||||
-rw-r--r-- | test/source/bootstrapfixture.cxx | 12 | ||||
-rw-r--r-- | test/source/makefile.mk | 3 |
3 files changed, 11 insertions, 6 deletions
diff --git a/test/prj/build.lst b/test/prj/build.lst index f2209a95be98..a06591bb32c0 100644 --- a/test/prj/build.lst +++ b/test/prj/build.lst @@ -1,2 +1,2 @@ -te test : unotest vcl NULL +te test : unotest vcl i18npool NULL te test\source nmake - all source_cpp NULL diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx index d46cf4d11230..358036f2127a 100644 --- a/test/source/bootstrapfixture.cxx +++ b/test/source/bootstrapfixture.cxx @@ -32,6 +32,7 @@ #include <cppuhelper/bootstrap.hxx> #include <ucbhelper/contentbroker.hxx> #include <comphelper/processfactory.hxx> +#include <i18npool/mslangid.hxx> #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/lang/XComponent.hpp> @@ -78,13 +79,16 @@ test::BootstrapFixture::BootstrapFixture( bool bAssertOnDialog ) xUcb->registerContentProvider(xFileProvider, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file")), sal_True); // force locale (and resource files loaded) to en-US - rtl::OUString aLang( RTL_CONSTASCII_USTRINGPARAM( "en" ) ); - rtl::OUString aCountry( RTL_CONSTASCII_USTRINGPARAM( "US" ) ); - rtl::OUString aISO( RTL_CONSTASCII_USTRINGPARAM( "en-US" ) ); + const LanguageType eLang=LANGUAGE_ENGLISH_US; + + rtl::OUString aLang, aCountry; + MsLangId::convertLanguageToIsoNames(eLang, aLang, aCountry); lang::Locale aLocale(aLang, aCountry, rtl::OUString()); ResMgr::SetDefaultLocale( aLocale ); + SvtSysLocaleOptions aLocalOptions; - aLocalOptions.SetUILocaleConfigString( aISO ); + aLocalOptions.SetUILocaleConfigString( + MsLangId::convertLanguageToIsoString( eLang ) ); InitVCL(m_xSFactory); diff --git a/test/source/makefile.mk b/test/source/makefile.mk index c2266ce54cfa..63109a819019 100644 --- a/test/source/makefile.mk +++ b/test/source/makefile.mk @@ -57,7 +57,8 @@ SHL1STDLIBS = \ $(UNOTOOLSLIB) \ $(CPPULIB) \ $(CPPUNITLIB) \ - $(SALLIB) + $(SALLIB) \ + $(I18NISOLANGLIB) SHL1TARGET = test SHL1USE_EXPORTS = name DEF1NAME = $(SHL1TARGET) |