rtl string api changes
This commit is contained in:
parent
d2512faf84
commit
c8f692f4c8
4 changed files with 34 additions and 21 deletions
|
@ -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 <rtl/char.h>
|
||||
#endif
|
||||
#ifndef _COM_SUN_STAR_UTIL_DATE_HPP_
|
||||
#include <com/sun/star/util/Date.hpp>
|
||||
#endif
|
||||
|
@ -87,6 +84,11 @@
|
|||
#include <comphelper/extract.hxx>
|
||||
#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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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<XColumnUpdate>& 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
|
||||
*
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue