summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-21 15:52:45 +0200
committerNoel Grandin <noel@peralex.com>2013-11-22 08:07:19 +0200
commit73342dbb82ba074d01962359dac50fb2aa36cbeb (patch)
treeaddab0397681725810b42ad55ab15be3fdb4c236 /connectivity/source
parent071c3f3e93c4c00cf57ce3c382325cd717fed511 (diff)
remove unnecessary RTL_CONSTASCII_STRINGPARAM
A final pass through the code, converting code to use the new OUString and OString methods that can detect string literals. Change-Id: Ifa6382335e5650a1c67e52006b26354e0692c710
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/drivers/ado/ACatalog.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.cxx24
-rw-r--r--connectivity/source/drivers/postgresql/pq_xcolumns.cxx4
3 files changed, 13 insertions, 19 deletions
diff --git a/connectivity/source/drivers/ado/ACatalog.cxx b/connectivity/source/drivers/ado/ACatalog.cxx
index 4583503f8b7a..01e4aee0640d 100644
--- a/connectivity/source/drivers/ado/ACatalog.cxx
+++ b/connectivity/source/drivers/ado/ACatalog.cxx
@@ -60,8 +60,8 @@ void OCatalog::refreshTables()
if ( aElement.IsValid() )
{
OUString sTypeName = aElement.get_Type();
- if ( !sTypeName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("SYSTEM TABLE"))
- && !sTypeName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("ACCESS TABLE")) )
+ if ( !sTypeName.equalsIgnoreAsciiCase("SYSTEM TABLE")
+ && !sTypeName.equalsIgnoreAsciiCase("ACCESS TABLE") )
aVector.push_back(aElement.get_Name());
}
}
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index f6f929549985..afb296565898 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -1070,12 +1070,6 @@ void bufferKey2TableConstraint(
}
-static bool equalsIgnoreCase( const OString & str, const char *str2, int length2 )
-{
- return 0 == rtl_str_compareIgnoreAsciiCase_WithLength(
- str.pData->buffer, str.pData->length, str2, length2 );
-}
-
void extractNameValuePairsFromInsert( String2StringMap & map, const OString & lastQuery )
{
OStringVector vec;
@@ -1084,15 +1078,15 @@ void extractNameValuePairsFromInsert( String2StringMap & map, const OString & la
int nSize = vec.size();
// printf( "1 %d\n", nSize );
if( nSize > 6 &&
- equalsIgnoreCase( vec[0] , RTL_CONSTASCII_STRINGPARAM( "insert" ) ) &&
- equalsIgnoreCase( vec[1] , RTL_CONSTASCII_STRINGPARAM( "into" ) ) )
+ vec[0].equalsIgnoreAsciiCase( "insert" ) &&
+ vec[1].equalsIgnoreAsciiCase( "into" ) )
{
int n = 2;
// printf( "1a\n" );
// extract table name
OString tableName;
- if( equalsIgnoreCase( vec[n+1], RTL_CONSTASCII_STRINGPARAM( "." ) ) )
+ if( vec[n+1].equalsIgnoreAsciiCase( "." ) )
{
tableName = vec[n];
tableName += vec[n+1];
@@ -1106,15 +1100,15 @@ void extractNameValuePairsFromInsert( String2StringMap & map, const OString & la
OStringVector names;
n ++;
- if( equalsIgnoreCase( vec[n], RTL_CONSTASCII_STRINGPARAM( "(" ) ) )
+ if( vec[n].equalsIgnoreAsciiCase( "(" ) )
{
// printf( "2\n" );
// extract names
n++;
- while( nSize > n && ! equalsIgnoreCase(vec[n] , RTL_CONSTASCII_STRINGPARAM( ")" ) ) )
+ while( nSize > n && ! vec[n].equalsIgnoreAsciiCase( ")" ) )
{
names.push_back( vec[n] );
- if( nSize > n+1 && equalsIgnoreCase( vec[n+1] , RTL_CONSTASCII_STRINGPARAM( "," ) ) )
+ if( nSize > n+1 && vec[n+1].equalsIgnoreAsciiCase( "," ) )
{
n ++;
}
@@ -1123,15 +1117,15 @@ void extractNameValuePairsFromInsert( String2StringMap & map, const OString & la
n++;
// now read the values
- if( nSize > n +1 && equalsIgnoreCase( vec[n], RTL_CONSTASCII_STRINGPARAM("VALUES") ) &&
- equalsIgnoreCase(vec[n+1], RTL_CONSTASCII_STRINGPARAM( "(" ) ) )
+ if( nSize > n +1 && vec[n].equalsIgnoreAsciiCase("VALUES") &&
+ vec[n+1].equalsIgnoreAsciiCase( "(" ) )
{
n +=2;
// printf( "3\n" );
for ( OStringVector::size_type i = 0 ; i < names.size() && nSize > n ; i ++ )
{
map[names[i]] = vec[n];
- if( nSize > n+1 && equalsIgnoreCase( vec[n+1] , RTL_CONSTASCII_STRINGPARAM(",") ) )
+ if( nSize > n+1 && vec[n+1].equalsIgnoreAsciiCase(",") )
{
n ++;
}
diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
index a7ec8884a635..466e4fb2abe0 100644
--- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
@@ -88,8 +88,8 @@ static Any isCurrency( const OUString & typeName )
// static sal_Bool isAutoIncrement8( const OUString & typeName )
// {
-// return typeName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("serial8")) ||
-// typeName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("bigserial"));
+// return typeName.equalsIgnoreAsciiCase("serial8") ||
+// typeName.equalsIgnoreAsciiCase("bigserial");
// }
static Any isAutoIncrement( const OUString & defaultValue )