summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGökhan Gurbetoğlu <gokhan.gurbetoglu@pardus.org.tr>2016-06-20 17:40:13 +0300
committerjan iversen <jani@documentfoundation.org>2016-06-23 09:59:49 +0000
commit9b9e5cfd2fa629b2e1dc4a193e48a4a4e8d34126 (patch)
tree61a81a6bd407cb9a06bfd8920d982ea714d63bcf /tools
parent8ab7db320ff158949d2eadaa6e654115201ddf61 (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 'tools')
-rw-r--r--tools/source/ref/globname.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx
index 807af1774b9c..8ba0b21c7b0a 100644
--- a/tools/source/ref/globname.cxx
+++ b/tools/source/ref/globname.cxx
@@ -22,6 +22,7 @@
#include <string.h>
#include <rtl/strbuf.hxx>
+#include <rtl/character.hxx>
#include <tools/stream.hxx>
#include <tools/globname.hxx>
@@ -181,7 +182,7 @@ bool SvGlobalName::MakeId( const OUString & rIdStr )
if( isdigit( *pStr ) )
nFirst = nFirst * 16 + (*pStr - '0');
else
- nFirst = nFirst * 16 + (toupper( *pStr ) - 'A' + 10 );
+ nFirst = nFirst * 16 + (rtl::toAsciiUpperCase( *pStr ) - 'A' + 10 );
else
return false;
pStr++;
@@ -195,7 +196,7 @@ bool SvGlobalName::MakeId( const OUString & rIdStr )
if( isdigit( *pStr ) )
nSec = nSec * 16 + (*pStr - '0');
else
- nSec = nSec * 16 + (sal_uInt16)(toupper( *pStr ) - 'A' + 10 );
+ nSec = nSec * 16 + (sal_uInt16)(rtl::toAsciiUpperCase( *pStr ) - 'A' + 10 );
else
return false;
pStr++;
@@ -209,7 +210,7 @@ bool SvGlobalName::MakeId( const OUString & rIdStr )
if( isdigit( *pStr ) )
nThird = nThird * 16 + (*pStr - '0');
else
- nThird = nThird * 16 + (sal_uInt16)(toupper( *pStr ) - 'A' + 10 );
+ nThird = nThird * 16 + (sal_uInt16)(rtl::toAsciiUpperCase( *pStr ) - 'A' + 10 );
else
return false;
pStr++;
@@ -224,7 +225,7 @@ bool SvGlobalName::MakeId( const OUString & rIdStr )
if( isdigit( *pStr ) )
szRemain[i/2] = szRemain[i/2] * 16 + (*pStr - '0');
else
- szRemain[i/2] = szRemain[i/2] * 16 + (sal_Int8)(toupper( *pStr ) - 'A' + 10 );
+ szRemain[i/2] = szRemain[i/2] * 16 + (sal_Int8)(rtl::toAsciiUpperCase( *pStr ) - 'A' + 10 );
else
return false;
pStr++;