diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-22 21:45:12 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-22 21:45:12 +0100 |
commit | a6eecdbc6e8277386f8bc8a4e970332acf780981 (patch) | |
tree | 27a6ff5a1f65d74f1e7023b7a19da530e2e8dfc3 | |
parent | f512cf5b1bf9e80cb430c1f06fbb7d86feb19ca3 (diff) |
Use rtl::isAscii* instead of ctype.h is* with sal_Unicode arg
Change-Id: I5e82b7f96c28ae89642bde603b941573820891c5
-rw-r--r-- | connectivity/source/commontools/CommonTools.cxx | 5 | ||||
-rw-r--r-- | 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 <jvmaccess/virtualmachine.hxx> #endif +#include <rtl/character.hxx> #include <rtl/process.h> #include <ctype.h> @@ -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 <com/sun/star/util/Date.hpp> #include <com/sun/star/util/Time.hpp> #include <com/sun/star/util/DateTime.hpp> +#include <rtl/character.hxx> #include <rtl/ustrbuf.hxx> #include <rtl/math.hxx> #include <unotools/datetime.hxx> @@ -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 ) ); } |