summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2021-10-18 22:42:11 +0200
committerEike Rathke <erack@redhat.com>2021-10-19 11:35:40 +0200
commit80b5d83f8ac858fddb32d2d72d1c2d4f3c64b32a (patch)
treedc87046720e0101b228360ef190172b3ac8f5590 /linguistic
parentc1c6eea1c11d9711e101fc76efa0ec4460e8e448 (diff)
Ditch that CharClass constructing ToLower() nonsense
... and use SvtSysLocale CharClass instead. Change-Id: I300c3e8ffb1502ef4303cba859dc0b8311be54ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123788 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/dlistimp.cxx7
-rw-r--r--linguistic/source/misc.cxx6
2 files changed, 4 insertions, 9 deletions
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 3fcb59f5d43c..90067e1d4da8 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -38,6 +38,7 @@
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <svtools/strings.hrc>
#include <unotools/resmgr.hxx>
+#include <unotools/charclass.hxx>
#include <sal/log.hxx>
#include "dlistimp.hxx"
@@ -273,6 +274,7 @@ void DicList::SearchForDictionaries(
const uno::Sequence< OUString > aDirCnt( utl::LocalFileHelper::
GetFolderContents( rDicDirURL, false ) );
+ SvtSysLocale aSysLocale;
for (const OUString& aURL : aDirCnt)
{
@@ -296,8 +298,7 @@ void DicList::SearchForDictionaries(
// Record in the list of Dictionaries
// When it already exists don't record
- LanguageType nSystemLanguage = MsLangId::getSystemLanguage();
- OUString aTmp1 = ToLower( aURL, nSystemLanguage );
+ OUString aTmp1 = aSysLocale.GetCharClass().lowercase( aURL);
sal_Int32 nPos = aTmp1.lastIndexOf( '/' );
if (-1 != nPos)
aTmp1 = aTmp1.copy( nPos + 1 );
@@ -307,7 +308,7 @@ void DicList::SearchForDictionaries(
for(j = 0; j < nCount; j++)
{
aTmp2 = rDicList[j]->getName();
- aTmp2 = ToLower( aTmp2, nSystemLanguage );
+ aTmp2 = aSysLocale.GetCharClass().lowercase( aTmp2);
if(aTmp1 == aTmp2)
break;
}
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index f541b97551e6..c2ff50b7f527 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -599,12 +599,6 @@ CapType capitalType(const OUString& aTerm, CharClass const * pCC)
return CapType::UNKNOWN;
}
-OUString ToLower( const OUString &rText, LanguageType nLanguage )
-{
- CharClass aCC(( LanguageTag( nLanguage ) ));
- return aCC.lowercase( rText );
-}
-
// sorted(!) array of unicode ranges for code points that are exclusively(!) used as numbers
// and thus may NOT not be part of names or words like the Chinese/Japanese number characters
const sal_uInt32 the_aDigitZeroes [] =