summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 00:02:32 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 00:02:32 +0000
commit80597041697999d7455dba15ca1ff574260789be (patch)
tree5899082164768e6c0d943b5400339c2cc1deddba /connectivity/source/commontools
parente0de3320d961f6e5ec4bca0d7f1193560bb2d7f2 (diff)
INTEGRATION: CWS warnings01 (1.20.20); FILE MERGED
2006/01/25 20:47:08 sb 1.20.20.2: RESYNC: (1.20-1.21); FILE MERGED 2005/12/22 11:44:01 fs 1.20.20.1: #i57457# warning-free code
Diffstat (limited to 'connectivity/source/commontools')
-rw-r--r--connectivity/source/commontools/CommonTools.cxx22
1 files changed, 10 insertions, 12 deletions
diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx
index 8f35f85740ae..f5354d3bcdd2 100644
--- a/connectivity/source/commontools/CommonTools.cxx
+++ b/connectivity/source/commontools/CommonTools.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: CommonTools.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: obo $ $Date: 2005-12-21 13:14:19 $
+ * last change: $Author: hr $ $Date: 2006-06-20 01:02:32 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -327,15 +327,20 @@ namespace connectivity
#include <ctype.h> //isdigit
namespace dbtools
{
-sal_Bool isCharOk(char c,const ::rtl::OUString& _rSpecials);
+//------------------------------------------------------------------
+sal_Bool isCharOk(sal_Unicode c,const ::rtl::OUString& _rSpecials)
+{
+
+ return ( ((c >= 97) && (c <= 122)) || ((c >= 65) && (c <= 90)) || ((c >= 48) && (c <= 57)) ||
+ c == '_' || _rSpecials.indexOf(c) != -1);
+}
//------------------------------------------------------------------------------
sal_Bool isValidSQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSpecials)
{
// Ueberpruefung auf korrekte Namensgebung im SQL Sinne
// Dieses ist wichtig fuer Tabellennamen beispielsweise
- ::rtl::OString aName(rName,rName.getLength(),RTL_TEXTENCODING_ASCII_US);
- const char* pStr = aName.getStr();
+ const sal_Unicode* pStr = rName.getStr();
if (*pStr > 127 || isdigit(*pStr))
return sal_False;
@@ -359,13 +364,6 @@ sal_Bool isValidSQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSp
return sal_True;
}
//------------------------------------------------------------------
-sal_Bool isCharOk(char c,const ::rtl::OUString& _rSpecials)
-{
-
- return ( ((c >= 97) && (c <= 122)) || ((c >= 65) && (c <= 90)) || ((c >= 48) && (c <= 57)) ||
- c == '_' || _rSpecials.indexOf(c) != -1);
-}
-//------------------------------------------------------------------
// Erzeugt einen neuen Namen falls noetig
::rtl::OUString convertName2SQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSpecials)
{