summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/dbmetadata.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_databasemetadata.cxx8
2 files changed, 6 insertions, 6 deletions
diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx
index 70dd05740d8d..6ec14fb57e87 100644
--- a/connectivity/source/commontools/dbmetadata.cxx
+++ b/connectivity/source/commontools/dbmetadata.cxx
@@ -406,7 +406,7 @@ namespace dbtools
{
Reference< XDatabaseMetaData > xMeta( m_pImpl->xConnectionMetaData, UNO_SET_THROW );
::rtl::OUString sConnectionURL( xMeta->getURL() );
- doDisplay = sConnectionURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "sdbc:mysql:mysqlc" ) ) == 0;
+ doDisplay = sConnectionURL.startsWith( "sdbc:mysql:mysqlc" );
}
catch( const Exception& )
{
@@ -423,7 +423,7 @@ namespace dbtools
{
Reference< XDatabaseMetaData > xMeta( m_pImpl->xConnectionMetaData, UNO_SET_THROW );
::rtl::OUString sConnectionURL( xMeta->getURL() );
- bSupported = sConnectionURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "sdbc:mysql:mysqlc" ) ) != 0;
+ bSupported = !sConnectionURL.startsWith( "sdbc:mysql:mysqlc" );
}
catch( const Exception& )
{
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index df012107f8f9..a7b63df958a5 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1263,11 +1263,11 @@ struct SortInternalSchemasLastAndPublicFirst
a[0] >>= valueA;
b[0] >>= valueB;
bool ret = false;
- if( valueA.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "public" ) ) == 0 )
+ if( valueA.startsWith( "public" ) )
{
ret = true;
}
- else if( valueB.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "public" ) ) == 0 )
+ else if( valueB.startsWith( "public" ) )
{
ret = false;
}
@@ -2202,9 +2202,9 @@ struct TypeInfoByDataTypeSorter
OUString nameB;
a[0 /*TYPE_NAME*/] >>= nameA;
b[0 /*TYPE_NAME*/] >>= nameB;
- if( nameA.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "int4" ) ) == 0 )
+ if( nameA.startsWith( "int4" ) )
return 1;
- if( nameB.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "int4" ) ) == 0 )
+ if( nameB.startsWith( "int4" ) )
return 0;
return nameA.compareTo( nameB ) < 0;
}