diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx index d468bbff152e..3e8c52b616c5 100644 --- a/connectivity/source/commontools/CommonTools.cxx +++ b/connectivity/source/commontools/CommonTools.cxx @@ -2,9 +2,9 @@ * * $RCSfile: CommonTools.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: fs $ $Date: 2001-03-15 08:45:56 $ + * last change: $Author: pl $ $Date: 2001-05-11 17:25:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,9 +64,6 @@ #ifndef _CONNECTIVITY_COMMONTOOLS_HXX_ #include "connectivity/CommonTools.hxx" #endif -#ifndef _RTL_CHAR_H_ -#include -#endif #ifndef _COM_SUN_STAR_UTIL_DATE_HPP_ #include #endif @@ -87,6 +84,11 @@ #include #endif +inline sal_Unicode rtl_ascii_toUpperCase( sal_Unicode ch ) +{ + return ch >= 0x0061 && ch <= 0x007a ? ch + 0x20 : ch; +} + namespace connectivity { using namespace ::com::sun::star::uno; @@ -149,7 +151,7 @@ namespace connectivity default: if (*pWild && (*pWild == cEscape) && ((*(pWild+1)== CHAR_PLACE) || (*(pWild+1) == CHAR_WILD)) ) pWild++; - if ( rtl_char_toUpperCase(*pWild) != rtl_char_toUpperCase(*pStr) ) + if ( rtl_ascii_toUpperCase(*pWild) != rtl_ascii_toUpperCase(*pStr) ) if ( !pos ) return sal_False; else diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx index 668cbe17e031..071c35abdbaa 100644 --- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx +++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FDatabaseMetaDataResultSet.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:13:37 $ + * last change: $Author: pl $ $Date: 2001-05-11 17:25:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -199,7 +199,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( const ::rtl::OUString sal_Int32 nLen = xMeta->getColumnCount(); sal_Int32 i = 1; for(;i<=nLen;++i) - if(xMeta->isCaseSensitive(i) ? columnName == xMeta->getColumnName(i) : columnName.equalsIgnoreCase(xMeta->getColumnName(i))) + if(xMeta->isCaseSensitive(i) ? columnName == xMeta->getColumnName(i) : columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(i))) break; return i; } diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx index 39fb6f7f9184..5db79e6ce3a0 100644 --- a/connectivity/source/commontools/dbconversion.cxx +++ b/connectivity/source/commontools/dbconversion.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dbconversion.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: jl $ $Date: 2001-03-27 12:19:34 $ + * last change: $Author: pl $ $Date: 2001-05-11 17:25:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -136,7 +136,7 @@ void DBTypeConversion::setValue(const Reference& xVariant, sal_Int16 nKeyType) throw(::com::sun::star::lang::IllegalArgumentException) { double fValue = 0; - if (rString.len()) + if (rString.getLength()) { // Muss der String formatiert werden? sal_Int16 nTypeClass = nKeyType & ~NumberFormat::DEFINED; @@ -795,6 +795,9 @@ Date DBTypeConversion::getNULLDate(const Reference< XNumberFormatsSupplier > &xS /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.13 2001/03/27 12:19:34 jl + * calls to sal_setInt64 hhave been removed + * * Revision 1.12 2001/03/21 13:37:07 jl * OSL_ENSHURE replaced by OSL_ENSURE * diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 862431addee4..6ed2169f9b61 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dbtools.cxx,v $ * - * $Revision: 1.23 $ + * $Revision: 1.24 $ * - * last change: $Author: oj $ $Date: 2001-04-27 10:09:14 $ + * last change: $Author: pl $ $Date: 2001-05-11 17:25:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -572,24 +572,29 @@ SQLContext prependContextInfo(SQLException& _rException, const Reference< XInter if (sCatalogSep.getLength()) aSeparator = sCatalogSep[0]; - if (aTableName.getTokenCount(aSeparator) >= 2) + sal_Int32 nIndex = 0; + ::rtl::OUString aFirstToken = aTableName.getToken(0, aSeparator, nIndex); + if( nIndex != -1 ) // one or more tokens follow { - ::rtl::OUString aDatabaseName(aTableName.getToken(0, aSeparator)); + ::rtl::OUString aDatabaseName( aFirstToken ); sQuotedName += quoteName(sQuote, aDatabaseName); sQuotedName = sQuotedName.concat(::rtl::OUString(&aSeparator, 1)); aTableName = aTableName.replaceAt(0, aDatabaseName.getLength() + 1, s_sEmptyString); - // have no "erase" so simulate this with replaceAt } + } if (_rxMeta->supportsSchemasInDataManipulation()) { - if (aTableName.getTokenCount(aGenericSep) == 2) + sal_Int32 nIndex = 0; + ::rtl::OUString aFirstToken( aTableName.getToken( 0, aGenericSep, nIndex ) ); + ::rtl::OUString aSecondToken( nIndex != -1 ? aTableName.getToken( 1, aGenericSep, nIndex ) : ::rtl::OUString() ); + if (nIndex == -1 && aSecondToken.getLength()) { static ::rtl::OUString s_aGenericSep(&aGenericSep, 1); - // need a method on the OUString to cancat a single unicode character .... - sQuotedName += quoteName(sQuote, aTableName.getToken(0, aGenericSep)); + // need a method on the OUString to cancat a single unicode character .... + sQuotedName += quoteName(sQuote, aFirstToken); sQuotedName = sQuotedName.concat(s_aGenericSep); - sQuotedName += quoteName(sQuote, aTableName.getToken(1, aGenericSep)); + sQuotedName += quoteName(sQuote, aSecondToken); } else sQuotedName += quoteName(sQuote, aTableName); @@ -1257,6 +1262,9 @@ void showError(const SQLExceptionInfo& _rInfo, /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.23 2001/04/27 10:09:14 oj + * comment out the OSL_ESNURE in QualifiedNameComponents + * * Revision 1.22 2001/04/20 13:33:25 oj * #85736# if catalogseparator is empty don't append catalog *