summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-20 13:46:07 +0200
committerNoel Grandin <noel@peralex.com>2013-11-20 13:56:09 +0200
commitf8b22654197178a441d383398b515bb2fb6deaf2 (patch)
tree5bc460ea1a3a2016172cd2db2646937822d8a894 /connectivity
parent9cb0fc7801db40ab337c20591ec4674b941ba01a (diff)
remove RTL_CONSTASCII_STRINGPARAM in OUString::matchAsciiL calls
Convert code like: defaultValue.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "nextval(" ) ); to: defaultValue.startsWith( "nextval(" ); Change-Id: I77bdcbf46bec6ded3c16a8248634b1424a1eb4f0
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/mysql/YDriver.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_databasemetadata.cxx8
-rw-r--r--connectivity/source/drivers/postgresql/pq_driver.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_xcolumns.cxx2
4 files changed, 9 insertions, 9 deletions
diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx
index 50d0e3a21d5b..10af859d0dcd 100644
--- a/connectivity/source/drivers/mysql/YDriver.cxx
+++ b/connectivity/source/drivers/mysql/YDriver.cxx
@@ -319,9 +319,9 @@ namespace connectivity
{
Sequence< PropertyValue > info;
- sal_Bool bOK = url.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "sdbc:mysql:odbc:" ) )
- || url.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "sdbc:mysql:jdbc:" ) )
- || ( url.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "sdbc:mysql:mysqlc:" ) )
+ sal_Bool bOK = url.startsWith( "sdbc:mysql:odbc:" )
+ || url.startsWith( "sdbc:mysql:jdbc:" )
+ || ( url.startsWith( "sdbc:mysql:mysqlc:" )
&& loadDriver( url, info ).is()
);
return bOK;
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 9a502a07e7e4..11e36b3851c6 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1235,16 +1235,16 @@ struct SortInternalSchemasLastAndPublicFirst
{
ret = false;
}
- else if( valueA.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "pg_" ) ) &&
- valueB.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "pg_" ) ) )
+ else if( valueA.startsWith( "pg_" ) &&
+ valueB.startsWith( "pg_" ) )
{
ret = valueA.compareTo( valueB ) < 0; // sorts equal !
}
- else if( valueA.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "pg_" ) ))
+ else if( valueA.startsWith( "pg_" ))
{
ret = false; // sorts last !
}
- else if( valueB.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "pg_" ) ) )
+ else if( valueB.startsWith( "pg_" ) )
{
ret = true; // sorts first !
}
diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx b/connectivity/source/drivers/postgresql/pq_driver.cxx
index 5f1fedb72e36..d2742ec251ab 100644
--- a/connectivity/source/drivers/postgresql/pq_driver.cxx
+++ b/connectivity/source/drivers/postgresql/pq_driver.cxx
@@ -119,7 +119,7 @@ Reference< XConnection > Driver::connect(
sal_Bool Driver::acceptsURL( const OUString& url )
throw (SQLException, RuntimeException)
{
- return url.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "sdbc:postgresql:" ) );
+ return url.startsWith( "sdbc:postgresql:" );
}
Sequence< DriverPropertyInfo > Driver::getPropertyInfo(
diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
index a3dccb4fc55f..a7ec8884a635 100644
--- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
@@ -94,7 +94,7 @@ static Any isCurrency( const OUString & typeName )
static Any isAutoIncrement( const OUString & defaultValue )
{
- sal_Bool ret = defaultValue.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "nextval(" ) );
+ sal_Bool ret = defaultValue.startsWith( "nextval(" );
// printf( "%s %d\n",
// OUStringToOString(defaultValue, RTL_TEXTENCODING_ASCII_US).getStr(),
// ret );