From af60316514f3ae3d4c475819bf86f2af837171e3 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 23 Nov 2012 23:06:10 +0100 Subject: some i18n wrappers with LanguageTag Change-Id: I2ceaa3159e8669c2c569fa8559c1e061dcad399d --- lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx | 5 +++-- lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'lingucomponent') diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx index 4582a663867a..91bdfe42705a 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx @@ -202,10 +202,11 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales() // Once for each of it's supported locales. for (sal_Int32 i = 0; i < nLocales; ++i) { + LanguageTag aLanguageTag( aDictIt->aLocaleNames[i] ); aDicts[k].aPtr = NULL; aDicts[k].eEnc = RTL_TEXTENCODING_DONTKNOW; - aDicts[k].aLoc = LanguageTag( aDictIt->aLocaleNames[i] ).getLocale(); - aDicts[k].apCC = new CharClass( aDicts[k].aLoc ); + aDicts[k].aLoc = aLanguageTag.getLocale(); + aDicts[k].apCC = new CharClass( aLanguageTag ); // also both files have to be in the same directory and the // file names must only differ in the extension (.aff/.dic). // Thus we use the first location only and strip the extension part. diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index 22c96229c916..5adc00702cf8 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -231,10 +231,11 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales() // Once for each of it's supported locales. for (sal_Int32 i = 0; i < nLocales; ++i) { + LanguageTag aLanguageTag( aDictIt->aLocaleNames[i] ); aThes[k] = NULL; aTEncs[k] = RTL_TEXTENCODING_DONTKNOW; - aTLocs[k] = LanguageTag( aDictIt->aLocaleNames[i] ).getLocale(); - aCharSetInfo[k] = new CharClass( aTLocs[k] ); + aTLocs[k] = aLanguageTag.getLocale(); + aCharSetInfo[k] = new CharClass( aLanguageTag ); // also both files have to be in the same directory and the // file names must only differ in the extension (.aff/.dic). // Thus we use the first location only and strip the extension part. -- cgit v1.2.3