summaryrefslogtreecommitdiff
path: root/lingucomponent/source
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-11-23 23:06:10 +0100
committerEike Rathke <erack@redhat.com>2012-11-23 23:09:16 +0100
commitaf60316514f3ae3d4c475819bf86f2af837171e3 (patch)
treeccfbd673bd4a53047a04dad6457d09c7eea1566c /lingucomponent/source
parent37f5b864014e9ad17a561b77ea9f6141650e92ad (diff)
some i18n wrappers with LanguageTag
Change-Id: I2ceaa3159e8669c2c569fa8559c1e061dcad399d
Diffstat (limited to 'lingucomponent/source')
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx5
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesimp.cxx5
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.