summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-09-12 18:38:12 +0200
committerEike Rathke <erack@redhat.com>2013-09-12 18:44:22 +0200
commit08e4d51f04734b952f42e3c334920dfd859bba02 (patch)
tree78cb0714e38f90a5dbfac45aea9d4640c777e76b /lingucomponent
parentfa031ec8eb216978b1646ab2459cf5900891d98c (diff)
if valid accept whatever the dictionary's name might comprise
Change-Id: Ia6ea53f1a9e1c575606901e173bc952449135522
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/lingutil/lingutil.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index b6db0b9fca66..590206c6c318 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -152,9 +152,7 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
// ctor as that triggers use of liblangtag and initializes its
// database which we do not want during startup. Convert
// instead.
- sal_Int32 nPos;
- if (sChunk.indexOf('-') < 0 && ((nPos = sChunk.indexOf('_')) > 0))
- sChunk = sChunk.replaceAt( nPos, 1, OUString('-'));
+ sChunk = sChunk.replace( '_', '-');
LanguageTag aLangTag(sChunk, true);
if (!aLangTag.isValidBcp47())
continue;