diff options
author | Gökhan Gurbetoğlu <gokhan.gurbetoglu@pardus.org.tr> | 2016-06-20 17:40:13 +0300 |
---|---|---|
committer | jan iversen <jani@documentfoundation.org> | 2016-06-23 09:59:49 +0000 |
commit | 9b9e5cfd2fa629b2e1dc4a193e48a4a4e8d34126 (patch) | |
tree | 61a81a6bd407cb9a06bfd8920d982ea714d63bcf /filter/source/t602 | |
parent | 8ab7db320ff158949d2eadaa6e654115201ddf61 (diff) |
tdf#99589 - tolower / toupper - dangerous to Turks ...
Change-Id: I8b0fe9354232a7b60f3605fa6f90f6741f7bf683
Reviewed-on: https://gerrit.libreoffice.org/26537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'filter/source/t602')
-rw-r--r-- | filter/source/t602/t602filter.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx index 3a4b3ea84174..ade1e60e0c05 100644 --- a/filter/source/t602/t602filter.cxx +++ b/filter/source/t602/t602filter.cxx @@ -38,6 +38,7 @@ #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <comphelper/oslfile2streamwrap.hxx> #include <rtl/ref.hxx> +#include <rtl/character.hxx> using namespace ::cppu; using namespace ::osl; @@ -679,14 +680,14 @@ tnode T602ImportFilter::PointCmd602(unsigned char *ch) char pcmd[2]; // warning: uChar -> char - pcmd[0] = (char) toupper(*ch); inschr(*ch); + pcmd[0] = (char) rtl::toAsciiUpperCase(*ch); inschr(*ch); *ch = Readchar602(); if (!*ch) return tnode::EEND; if (*ch=='\n') return tnode::EOL; if (!isalpha(*ch)) return (*ch<32) ? tnode::SETCH : tnode::WRITE; // warning: uChar -> char - pcmd[1] = (char) toupper(*ch); inschr(*ch); + pcmd[1] = (char) rtl::toAsciiUpperCase(*ch); inschr(*ch); if (pcmd[0]=='P' && pcmd[1]=='A') { if (pst.pars) pst.willbeeop = true; } else if (pcmd[0]=='C' && pcmd[1]=='P') { if (pst.pars) pst.willbeeop = true; } @@ -761,12 +762,12 @@ void T602ImportFilter::Read602() case tnode::EXPCMD: ch = Readchar602(); if(ch == 0) {inschr('@'); node = tnode::EEND; } - else if(isupper(ch)) { + else if(rtl::isAsciiUpperCase(ch)) { cmd602[0] = ch; ch = Readchar602(); cmd602[1] = ch; cmd602[2] = '\0'; - if(isupper(ch)) + if(rtl::isAsciiUpperCase(ch)) node = tnode::SETCMD; //nedodelano else { inschr('@'); |