diff options
author | Krishna Keshav <princy.krishnakeshav@gmail.com> | 2016-05-05 23:28:29 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-05-10 15:25:16 +0000 |
commit | 1fcd8dfb70124acc935c24e066dfd3e2144baec9 (patch) | |
tree | 166e7f3d27840eefd27d8d0a164bff588e3c56a3 /lingucomponent | |
parent | 6bf020fb7ef0a13188ece51d41dd101141b42b41 (diff) |
tdf#99589 tolower / toupper - dangerous to Turks ...
replaced tolower with to AsciiLowerCase() in
lingucomponent/source/languageguessing/altstrfunc.cxx
l10ntools/source/gL10nMem.cxx
Change-Id: I1340da18b263a4a921e2e8d96c0f133fe300086e
Reviewed-on: https://gerrit.libreoffice.org/24682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'lingucomponent')
-rw-r--r-- | lingucomponent/source/languageguessing/altstrfunc.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lingucomponent/source/languageguessing/altstrfunc.cxx b/lingucomponent/source/languageguessing/altstrfunc.cxx index 1fb29436c624..a155ee026885 100644 --- a/lingucomponent/source/languageguessing/altstrfunc.cxx +++ b/lingucomponent/source/languageguessing/altstrfunc.cxx @@ -20,6 +20,9 @@ #include "altstrfunc.hxx" #include <sal/types.h> +#include<rtl/character.hxx> + +using namespace rtl; int start(const std::string &s1, const std::string &s2){ size_t i; @@ -30,7 +33,7 @@ int start(const std::string &s1, const std::string &s2){ min = s2.length(); for(i = 0; i < min && s2[i] && s1[i] && !ret; i++){ - ret = toupper(s1[i]) - toupper(s2[i]); + ret = toAsciiUpperCase(s1[i]) - toAsciiUpperCase(s2[i]); if(s1[i] == '.' || s2[i] == '.'){ret = 0;}//. is a neutral character } return ret; |