From 9b9e5cfd2fa629b2e1dc4a193e48a4a4e8d34126 Mon Sep 17 00:00:00 2001 From: Gökhan Gurbetoğlu Date: Mon, 20 Jun 2016 17:40:13 +0300 Subject: tdf#99589 - tolower / toupper - dangerous to Turks ... Change-Id: I8b0fe9354232a7b60f3605fa6f90f6741f7bf683 Reviewed-on: https://gerrit.libreoffice.org/26537 Tested-by: Jenkins Reviewed-by: jan iversen --- filter/source/t602/t602filter.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'filter/source/t602') 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 #include #include +#include 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('@'); -- cgit