diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-09 22:47:20 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-03-11 11:07:09 +0100 |
commit | 937b63af3322f7f8b5e869b2c7431a2deaec3113 (patch) | |
tree | a832f6672188551a5be9538a02fb80d6e3fc8497 /connectivity/source | |
parent | 5c32ac5104e9cade52c8a373033644282de9ceff (diff) |
use startsWith() instead of compareToAscii()
brain damage...
Change-Id: I4dc63c7346f724eded9ac7b82cda25c2bb60beff
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/commontools/AutoRetrievingBase.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AConnection.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/connectivity/source/commontools/AutoRetrievingBase.cxx b/connectivity/source/commontools/AutoRetrievingBase.cxx index e88fe4160214..6e39c85cc8b4 100644 --- a/connectivity/source/commontools/AutoRetrievingBase.cxx +++ b/connectivity/source/commontools/AutoRetrievingBase.cxx @@ -27,7 +27,7 @@ namespace connectivity OSL_ENSURE( m_bAutoRetrievingEnabled,"Illegal call here. isAutoRetrievingEnabled is false!"); sStmt = sStmt.toAsciiUpperCase(); ::rtl::OUString sStatement; - if ( sStmt.compareToAscii("INSERT",6) == 0 ) + if ( sStmt.startsWith("INSERT") ) { sStatement = m_sGeneratedValueStatement; static const ::rtl::OUString sColumn(RTL_CONSTASCII_USTRINGPARAM("$column")); diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index 2b24b24d67ed..9ffc553f3182 100644 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx @@ -106,7 +106,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV sal_Int32 nLen = url.indexOf(':'); nLen = url.indexOf(':',nLen+1); ::rtl::OUString aDSN(url.copy(nLen+1)),aUID,aPWD; - if ( aDSN.compareToAscii("access:",7) == 0 ) + if ( aDSN.startsWith("access:") ) aDSN = aDSN.copy(7); sal_Int32 nTimeout = 20; diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 3f2a96bfbd68..d58c8f56d941 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -399,7 +399,7 @@ namespace connectivity { sal_Bool bEnabled = sal_False; OSL_VERIFY_EQUALS( jfw_getEnabled( &bEnabled ), JFW_E_NONE, "error in jfw_getEnabled" ); - return bEnabled && url.compareToAscii("sdbc:embedded:hsqldb",sizeof("sdbc:embedded:hsqldb")) == 0; + return bEnabled && url.startsWith("sdbc:embedded:hsqldb"); } //-------------------------------------------------------------------- |