summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-03-20 13:02:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-03-20 13:05:35 +0100
commit2d9ce9191da681e4fd9f1d08933ca5117c56601b (patch)
treeeecfa2690dcaffca064cc5712d7a5c9662a32b87 /connectivity
parentdc06576d8809760b79f771831bed3122878e0505 (diff)
Remove uses of rtl::OUString::compareToAscii(asciiStr, maxLength)
...which is a confusing overload with unexpectedly different semantics from the one-parameter form. In preparation of marking it as deprecated. Change-Id: I4f176995546ae583fc570d770647ffc315eecc75
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;
}