From a6eecdbc6e8277386f8bc8a4e970332acf780981 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 22 Mar 2017 21:45:12 +0100 Subject: Use rtl::isAscii* instead of ctype.h is* with sal_Unicode arg Change-Id: I5e82b7f96c28ae89642bde603b941573820891c5 --- connectivity/source/commontools/CommonTools.cxx | 5 +++-- connectivity/source/commontools/dbconversion.cxx | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx index 30f8538ca906..9846d0fbc56e 100644 --- a/connectivity/source/commontools/CommonTools.cxx +++ b/connectivity/source/commontools/CommonTools.cxx @@ -34,6 +34,7 @@ #if HAVE_FEATURE_JAVA #include #endif +#include #include #include @@ -183,7 +184,7 @@ bool isValidSQLName(const OUString& rName,const OUString& _rSpecials) // Test for correct naming (in SQL sense) // This is important for table names for example const sal_Unicode* pStr = rName.getStr(); - if (*pStr > 127 || isdigit(*pStr)) + if (*pStr > 127 || rtl::isAsciiDigit(*pStr)) return false; for (; *pStr; ++pStr ) @@ -214,7 +215,7 @@ OUString convertName2SQLName(const OUString& rName,const OUString& _rSpecials) OUString aNewName(rName); const sal_Unicode* pStr = rName.getStr(); sal_Int32 nLength = rName.getLength(); - bool bValid(*pStr < 128 && !isdigit(*pStr)); + bool bValid(*pStr < 128 && !rtl::isAsciiDigit(*pStr)); for (sal_Int32 i=0; bValid && i < nLength; ++pStr,++i ) if(!isCharOk(*pStr,_rSpecials)) { diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx index 763eb6c8ba46..5be258a7e698 100644 --- a/connectivity/source/commontools/dbconversion.cxx +++ b/connectivity/source/commontools/dbconversion.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -415,7 +416,7 @@ namespace dbtools { const sal_Unicode *p = _sSQLString.getStr() + nSeparation; const sal_Unicode *const begin = p; - while (isspace(*p)) { ++p; } + while (rtl::isAsciiWhiteSpace(*p)) { ++p; } nSeparation += p - begin; aTime = toTime( _sSQLString.copy( nSeparation ) ); } -- cgit