test/prj/build.lst | 2 +- test/source/bootstrapfixture.cxx | 12 ++++++++---- test/source/makefile.mk | 3 ++- 3 files changed, 11 insertions(+), 6 deletions(-)
New commits: commit 377316db2b02c56a552c8ebb9ee4d4fc02e1a708 Author: Markus Mohrhard <[email protected]> Date: Thu Sep 29 14:24:07 2011 +0200 change to the old way to set the language to en-US for unit tests diff --git a/test/prj/build.lst b/test/prj/build.lst index f2209a9..a06591b 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 d46cf4d..358036f 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 c2266ce..63109a8 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) _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
