summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-09-12 19:13:53 +0200
committerEike Rathke <erack@redhat.com>2013-09-12 19:31:44 +0200
commit2f6551b0167c2651f900b9c727bd74240b493754 (patch)
tree516fe60cde73a9e968fd4f47c713662dc7d89f44 /lingucomponent
parent22dc925e3580de0a33e61f91fbce654016d31343 (diff)
a set of LanguageType fallback converted to is utter nonsense here
Change-Id: I02881a2a7ab3178521388b76e2413b7e1cd6c443
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/lingutil/lingutil.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index 6afd28c53905..48fe7c582134 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -185,7 +185,7 @@ void MergeNewStyleDicsAndOldStyleDics(
const std::vector< SvtLinguConfigDictionaryEntry > &rOldStyleDics )
{
// get list of languages supported by new style dictionaries
- std::set< LanguageType > aNewStyleLanguages;
+ std::set< OUString > aNewStyleLanguages;
std::list< SvtLinguConfigDictionaryEntry >::const_iterator aIt;
for (aIt = rNewStyleDics.begin() ; aIt != rNewStyleDics.end(); ++aIt)
{
@@ -193,8 +193,7 @@ void MergeNewStyleDicsAndOldStyleDics(
sal_Int32 nLocaleNames = aLocaleNames.getLength();
for (sal_Int32 k = 0; k < nLocaleNames; ++k)
{
- LanguageType nLang = LanguageTag::convertToLanguageTypeWithFallback( aLocaleNames[k] );
- aNewStyleLanguages.insert( nLang );
+ aNewStyleLanguages.insert( aLocaleNames[k] );
}
}
@@ -209,8 +208,10 @@ void MergeNewStyleDicsAndOldStyleDics(
DBG_ASSERT( nOldStyleDics, "old style dictionary with more then one language found!");
if (nOldStyleDics > 0)
{
+ /* TODO: this conversion exists only to check with
+ * LinguIsUnspecified(), add another check that takes the tag
+ * string instead. */
LanguageType nLang = LanguageTag::convertToLanguageTypeWithFallback( aIt2->aLocaleNames[0] );
-
if (nLang == LANGUAGE_DONTKNOW || linguistic::LinguIsUnspecified( nLang))
{
OSL_FAIL( "old style dictionary with invalid language found!" );
@@ -218,7 +219,7 @@ void MergeNewStyleDicsAndOldStyleDics(
}
// language not yet added?
- if (aNewStyleLanguages.find( nLang ) == aNewStyleLanguages.end())
+ if (aNewStyleLanguages.find( aIt2->aLocaleNames[0] ) == aNewStyleLanguages.end())
rNewStyleDics.push_back( *aIt2 );
}
else