diff options
author | Eike Rathke <erack@redhat.com> | 2012-11-23 23:06:10 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-11-23 23:09:16 +0100 |
commit | af60316514f3ae3d4c475819bf86f2af837171e3 (patch) | |
tree | ccfbd673bd4a53047a04dad6457d09c7eea1566c /lingucomponent/source | |
parent | prepend module local include (diff) | |
download | core-af60316514f3ae3d4c475819bf86f2af837171e3.tar.gz core-af60316514f3ae3d4c475819bf86f2af837171e3.zip |
some i18n wrappers with LanguageTag
Change-Id: I2ceaa3159e8669c2c569fa8559c1e061dcad399d
Diffstat (limited to 'lingucomponent/source')
-rw-r--r-- | lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx | 5 | ||||
-rw-r--r-- | lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 5 |
2 files changed, 6 insertions, 4 deletions
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. |