diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-22 21:32:40 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-22 21:32:40 +0100 |
commit | bd556163d9fa3a01a285a818a01712cff55f5c69 (patch) | |
tree | 36123803c3db379be1329e5b94139384a2e45594 /tools | |
parent | 2595ad876024d6df4249dcdac39501d2fdf9e0c9 (diff) |
Use rtl::isAscii* instead of ctype.h is* (and fix passing plain char)
Change-Id: I83576b55ca421abfe056eb7b66f8f74782100a09
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/ref/globname.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx index d6395b79a33a..28042a78f4b8 100644 --- a/tools/source/ref/globname.cxx +++ b/tools/source/ref/globname.cxx @@ -184,8 +184,8 @@ bool SvGlobalName::MakeId( const OUString & rIdStr ) int i = 0; for( i = 0; i < 8; i++ ) { - if( isxdigit( *pStr ) ) - if( isdigit( *pStr ) ) + if( rtl::isAsciiHexDigit( static_cast<unsigned char>(*pStr) ) ) + if( rtl::isAsciiDigit( static_cast<unsigned char>(*pStr) ) ) nFirst = nFirst * 16 + (*pStr - '0'); else nFirst = nFirst * 16 + (rtl::toAsciiUpperCase( static_cast<unsigned char>(*pStr) ) - 'A' + 10 ); @@ -198,8 +198,8 @@ bool SvGlobalName::MakeId( const OUString & rIdStr ) pStr++; for( i = 0; i < 4; i++ ) { - if( isxdigit( *pStr ) ) - if( isdigit( *pStr ) ) + if( rtl::isAsciiHexDigit( static_cast<unsigned char>(*pStr) ) ) + if( rtl::isAsciiDigit( static_cast<unsigned char>(*pStr) ) ) nSec = nSec * 16 + (*pStr - '0'); else nSec = nSec * 16 + (sal_uInt16)(rtl::toAsciiUpperCase( static_cast<unsigned char>(*pStr) ) - 'A' + 10 ); @@ -212,8 +212,8 @@ bool SvGlobalName::MakeId( const OUString & rIdStr ) pStr++; for( i = 0; i < 4; i++ ) { - if( isxdigit( *pStr ) ) - if( isdigit( *pStr ) ) + if( rtl::isAsciiHexDigit( static_cast<unsigned char>(*pStr) ) ) + if( rtl::isAsciiDigit( static_cast<unsigned char>(*pStr) ) ) nThird = nThird * 16 + (*pStr - '0'); else nThird = nThird * 16 + (sal_uInt16)(rtl::toAsciiUpperCase( static_cast<unsigned char>(*pStr) ) - 'A' + 10 ); @@ -227,8 +227,8 @@ bool SvGlobalName::MakeId( const OUString & rIdStr ) pStr++; for( i = 0; i < 16; i++ ) { - if( isxdigit( *pStr ) ) - if( isdigit( *pStr ) ) + if( rtl::isAsciiHexDigit( static_cast<unsigned char>(*pStr) ) ) + if( rtl::isAsciiDigit( static_cast<unsigned char>(*pStr) ) ) szRemain[i/2] = szRemain[i/2] * 16 + (*pStr - '0'); else szRemain[i/2] = szRemain[i/2] * 16 + (sal_Int8)(rtl::toAsciiUpperCase( static_cast<unsigned char>(*pStr) ) - 'A' + 10 ); |