[Libreoffice-commits] core.git: connectivity/source
Stephan Bergmann
sbergman at redhat.com
Wed Mar 22 20:45:38 UTC 2017
connectivity/source/commontools/CommonTools.cxx | 5 +++--
connectivity/source/commontools/dbconversion.cxx | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
New commits:
commit a6eecdbc6e8277386f8bc8a4e970332acf780981
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Mar 22 21:45:12 2017 +0100
Use rtl::isAscii* instead of ctype.h is* with sal_Unicode arg
Change-Id: I5e82b7f96c28ae89642bde603b941573820891c5
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 ) );
}
More information about the Libreoffice-commits
mailing list