diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-25 17:35:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-04 10:11:08 +0200 |
commit | 5285beeaa49f6678b471d472868c305c7d9da5f9 (patch) | |
tree | a3dbd28995142ab16b448f28e95821115ef5408f /connectivity | |
parent | remove redundant calls to OUString constructor (diff) | |
download | core-5285beeaa49f6678b471d472868c305c7d9da5f9.tar.gz core-5285beeaa49f6678b471d472868c305c7d9da5f9.zip |
remove redundant calls to OUString constructor in if expression
Convert code like:
if( aStr == OUString("xxxx") )
to this:
if( aStr == "xxxx" )
Change-Id: I8d201f048477731eff590fb988259ef0935c080c
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/hsqldb/HTables.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/mork/MDriver.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/mozab/MDriver.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql/YTables.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/odbcbase/OConnection.cxx | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index 0b5d97928660..1d75b8667e6a 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -132,7 +132,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString _sElementName) Reference<XPropertySet> xProp(xObject,UNO_QUERY); sal_Bool bIsView; - if((bIsView = (xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == OUString("VIEW")))) // here we have a view + if((bIsView = (xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == "VIEW"))) // here we have a view aSql += "VIEW "; else aSql += "TABLE "; diff --git a/connectivity/source/drivers/mork/MDriver.cxx b/connectivity/source/drivers/mork/MDriver.cxx index c11ff08080e1..1a70ed251048 100644 --- a/connectivity/source/drivers/mork/MDriver.cxx +++ b/connectivity/source/drivers/mork/MDriver.cxx @@ -104,7 +104,7 @@ sal_Bool MorkDriver::acceptsURL(OUString const & url) { aAddrbookScheme= aAddrbookURI; } - else if(url == OUString("sdbc:address:") ) + else if( url == "sdbc:address:" ) { return false; } diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx index d292687b767d..766d251468c9 100644 --- a/connectivity/source/drivers/mozab/MDriver.cxx +++ b/connectivity/source/drivers/mozab/MDriver.cxx @@ -220,7 +220,7 @@ EDriverType MozabDriver::impl_classifyURL( const OUString& url ) // There isn't any subschema: - but could be just subschema if ( !aAddrbookURI.isEmpty() ) aAddrbookScheme= aAddrbookURI; - else if(url == OUString("sdbc:address:") ) + else if(url == "sdbc:address:" ) return Unknown; // TODO check else return Unknown; diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx index 25fbf73ff712..08957989a178 100644 --- a/connectivity/source/drivers/mysql/YTables.cxx +++ b/connectivity/source/drivers/mysql/YTables.cxx @@ -136,7 +136,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString _sElementName) OUString aSql( "DROP " ); Reference<XPropertySet> xProp(xObject,UNO_QUERY); - sal_Bool bIsView = xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == OUString("VIEW"); + sal_Bool bIsView = xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == "VIEW"; if(bIsView) // here we have a view aSql += "VIEW "; else diff --git a/connectivity/source/drivers/odbcbase/OConnection.cxx b/connectivity/source/drivers/odbcbase/OConnection.cxx index cae97e22a356..2e09b8287714 100644 --- a/connectivity/source/drivers/odbcbase/OConnection.cxx +++ b/connectivity/source/drivers/odbcbase/OConnection.cxx @@ -161,7 +161,7 @@ SQLRETURN OConnection::OpenConnection(const OUString& aConnectStr,sal_Int32 nTim { OUString sVersion; OTools::GetInfo(this,m_aConnectionHandle,SQL_DRIVER_ODBC_VER,sVersion,*this,getTextEncoding()); - m_bUseOldDateFormat = sVersion == OUString("02.50") || sVersion == OUString("02.00"); + m_bUseOldDateFormat = sVersion == "02.50" || sVersion == "02.00"; } catch(Exception&) { |