diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-04 13:51:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-11 11:21:25 +0200 |
commit | 1bdb2b6f06c556b9af91dba4f29f3ac73190b09e (patch) | |
tree | 1d941e17952cd891f5309fd862215dd09a84b001 /connectivity/source/drivers | |
parent | 2f2416ff060c780ad87b4d3979112f52da2ae902 (diff) |
remove unnecessary use of OUString constructor in CONNECTIVITY module
Change-Id: Ie32d03920d996db2793ead9940fc90668cde03dd
Diffstat (limited to 'connectivity/source/drivers')
47 files changed, 137 insertions, 143 deletions
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx index b1b6dfe47a7c..74ccdee09ec3 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx @@ -907,8 +907,8 @@ void ODatabaseMetaDataResultSet::setColumnsMap() m_aValueRange[12] = aMap; ::std::map< sal_Int32,OUString> aMap2; - aMap2[0] = OUString("YES"); - aMap2[1] = OUString("NO"); + aMap2[0] = "YES"; + aMap2[1] = "NO"; m_aIntValueRange[18] = aMap2; ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(m_pRecordSet,this); @@ -1040,9 +1040,9 @@ void ODatabaseMetaDataResultSet::setIndexInfoMap() m_aValueRange[8] = aMap2; ::std::map< sal_Int32,OUString> aMap3; - aMap3[0] = OUString(); - aMap3[DB_COLLATION_ASC] = OUString("A"); - aMap3[DB_COLLATION_DESC] = OUString("D"); + aMap3[0] = ""; + aMap3[DB_COLLATION_ASC] = "A"; + aMap3[DB_COLLATION_DESC] = "D"; m_aIntValueRange[21] = aMap3; @@ -1063,8 +1063,8 @@ void ODatabaseMetaDataResultSet::setTablePrivilegesMap() m_aColMapping.push_back(7); ::std::map< sal_Int32,OUString> aMap; - aMap[0] = OUString("YES"); - aMap[1] = OUString("NO"); + aMap[0] = "YES"; + aMap[1] = "NO"; m_aIntValueRange[7] = aMap; diff --git a/connectivity/source/drivers/ado/ADriver.cxx b/connectivity/source/drivers/ado/ADriver.cxx index b1db42458a54..f55a03f5f974 100644 --- a/connectivity/source/drivers/ado/ADriver.cxx +++ b/connectivity/source/drivers/ado/ADriver.cxx @@ -90,8 +90,8 @@ OUString ODriver::getImplementationName_Static( ) throw(RuntimeException) Sequence< OUString > ODriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 2 ); - aSNS[0] = OUString("com.sun.star.sdbc.Driver"); - aSNS[1] = OUString("com.sun.star.sdbcx.Driver"); + aSNS[0] = "com.sun.star.sdbc.Driver"; + aSNS[1] = "com.sun.star.sdbcx.Driver"; return aSNS; } //------------------------------------------------------------------ @@ -155,8 +155,8 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString ::std::vector< DriverPropertyInfo > aDriverInfo; Sequence< OUString > aBooleanValues(2); - aBooleanValues[0] = OUString( "false" ); - aBooleanValues[1] = OUString( "true" ); + aBooleanValues[0] = "false"; + aBooleanValues[1] = "true"; aDriverInfo.push_back(DriverPropertyInfo( OUString("IgnoreDriverPrivileges") diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx index 8994dc16cf85..08c2fc88917a 100644 --- a/connectivity/source/drivers/ado/AResultSet.cxx +++ b/connectivity/source/drivers/ado/AResultSet.cxx @@ -61,8 +61,8 @@ OUString SAL_CALL OResultSet::getImplementationName( ) throw (::com::sun::star: ::com::sun::star::uno::Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Sequence< OUString > aSupported(2); - aSupported[0] = OUString("com.sun.star.sdbc.ResultSet"); - aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet"); + aSupported[0] = "com.sun.star.sdbc.ResultSet"; + aSupported[1] = "com.sun.star.sdbcx.ResultSet"; return aSupported; } diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx index 7cba8b0dea6f..39ada1a70ac5 100644 --- a/connectivity/source/drivers/calc/CConnection.cxx +++ b/connectivity/source/drivers/calc/CConnection.cxx @@ -87,7 +87,7 @@ void OCalcConnection::construct(const OUString& url,const Sequence< PropertyValu } m_aFileName = aURL.GetMainURL(INetURLObject::NO_DECODE); - m_sPassword = OUString(); + m_sPassword = ""; const char* pPwd = "password"; const PropertyValue *pIter = info.getConstArray(); @@ -114,16 +114,16 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc() } // open read-only as long as updating isn't implemented Sequence<PropertyValue> aArgs(2); - aArgs[0].Name = OUString("Hidden"); + aArgs[0].Name = "Hidden"; aArgs[0].Value <<= (sal_Bool) sal_True; - aArgs[1].Name = OUString("ReadOnly"); + aArgs[1].Name = "ReadOnly"; aArgs[1].Value <<= (sal_Bool) sal_True; if ( !m_sPassword.isEmpty() ) { const sal_Int32 nPos = aArgs.getLength(); aArgs.realloc(nPos+1); - aArgs[nPos].Name = OUString("Password"); + aArgs[nPos].Name = "Password"; aArgs[nPos].Value <<= m_sPassword; } diff --git a/connectivity/source/drivers/calc/CResultSet.cxx b/connectivity/source/drivers/calc/CResultSet.cxx index 81edb1093888..f6f977c0c8e5 100644 --- a/connectivity/source/drivers/calc/CResultSet.cxx +++ b/connectivity/source/drivers/calc/CResultSet.cxx @@ -51,8 +51,8 @@ OUString SAL_CALL OCalcResultSet::getImplementationName( ) throw ( RuntimeExcep Sequence< OUString > SAL_CALL OCalcResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< OUString > aSupported(2); - aSupported[0] = OUString("com.sun.star.sdbc.ResultSet"); - aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet"); + aSupported[0] = "com.sun.star.sdbc.ResultSet"; + aSupported[1] = "com.sun.star.sdbcx.ResultSet"; return aSupported; } diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 9f05e883dff7..5b8630d63718 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -479,23 +479,23 @@ void OCalcTable::fillColumns() } break; case DataType::DECIMAL: - aTypeName = OUString("DECIMAL"); + aTypeName = "DECIMAL"; break; case DataType::BIT: - aTypeName = OUString("BOOL"); + aTypeName = "BOOL"; break; case DataType::DATE: - aTypeName = OUString("DATE"); + aTypeName = "DATE"; break; case DataType::TIME: - aTypeName = OUString("TIME"); + aTypeName = "TIME"; break; case DataType::TIMESTAMP: - aTypeName = OUString("TIMESTAMP"); + aTypeName = "TIMESTAMP"; break; default: SAL_WARN( "connectivity.drivers","missing type name"); - aTypeName = OUString(); + aTypeName = ""; } // check if the column name already exists diff --git a/connectivity/source/drivers/dbase/DConnection.cxx b/connectivity/source/drivers/dbase/DConnection.cxx index 99658b39e542..0ef1c4229b38 100644 --- a/connectivity/source/drivers/dbase/DConnection.cxx +++ b/connectivity/source/drivers/dbase/DConnection.cxx @@ -45,7 +45,7 @@ DBG_NAME(ODbaseConnection) ODbaseConnection::ODbaseConnection(ODriver* _pDriver) : OConnection(_pDriver) { DBG_CTOR(ODbaseConnection,NULL); - m_aFilenameExtension = OUString("dbf"); + m_aFilenameExtension = "dbf"; } //----------------------------------------------------------------------------- ODbaseConnection::~ODbaseConnection() diff --git a/connectivity/source/drivers/dbase/DDriver.cxx b/connectivity/source/drivers/dbase/DDriver.cxx index 5711503bf7d6..67748a843ae8 100644 --- a/connectivity/source/drivers/dbase/DDriver.cxx +++ b/connectivity/source/drivers/dbase/DDriver.cxx @@ -81,8 +81,8 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString ::std::vector< DriverPropertyInfo > aDriverInfo; Sequence< OUString > aBoolean(2); - aBoolean[0] = OUString("0"); - aBoolean[1] = OUString("1"); + aBoolean[0] = "0"; + aBoolean[1] = "1"; aDriverInfo.push_back(DriverPropertyInfo( OUString("CharSet") diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx index 0ae11dd5d27e..dc5ac7d08c00 100644 --- a/connectivity/source/drivers/dbase/DResultSet.cxx +++ b/connectivity/source/drivers/dbase/DResultSet.cxx @@ -55,8 +55,8 @@ OUString SAL_CALL ODbaseResultSet::getImplementationName( ) throw ( RuntimeExce Sequence< OUString > SAL_CALL ODbaseResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< OUString > aSupported(2); - aSupported[0] = OUString("com.sun.star.sdbc.ResultSet"); - aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet"); + aSupported[0] = "com.sun.star.sdbc.ResultSet"; + aSupported[1] = "com.sun.star.sdbcx.ResultSet"; return aSupported; } diff --git a/connectivity/source/drivers/evoab2/NCatalog.cxx b/connectivity/source/drivers/evoab2/NCatalog.cxx index 06be9242db79..95ce61830f5a 100644 --- a/connectivity/source/drivers/evoab2/NCatalog.cxx +++ b/connectivity/source/drivers/evoab2/NCatalog.cxx @@ -43,7 +43,7 @@ void OEvoabCatalog::refreshTables() { TStringVector aVector; Sequence< OUString > aTypes(1); - aTypes[0] = OUString("TABLE"); + aTypes[0] = "TABLE"; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), OUString("%"),OUString("%"),aTypes); diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx index 366ea73df94b..af4d24d6a3fc 100644 --- a/connectivity/source/drivers/evoab2/NDriver.cxx +++ b/connectivity/source/drivers/evoab2/NDriver.cxx @@ -92,7 +92,7 @@ Sequence< OUString > OEvoabDriver::getSupportedServiceNames_Static( ) throw (Ru // which service is supported // for more information @see com.sun.star.sdbc.Driver Sequence< OUString > aSNS( 1 ); - aSNS[0] = OUString("com.sun.star.sdbc.Driver"); + aSNS[0] = "com.sun.star.sdbc.Driver"; return aSNS; } //------------------------------------------------------------------ diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx index 75743e68a123..4bff96debd98 100644 --- a/connectivity/source/drivers/evoab2/NResultSet.cxx +++ b/connectivity/source/drivers/evoab2/NResultSet.cxx @@ -72,7 +72,7 @@ OUString SAL_CALL OEvoabResultSet::getImplementationName( ) throw ( RuntimeExce Sequence< OUString > SAL_CALL OEvoabResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< OUString > aSupported(1); - aSupported[0] = OUString("com.sun.star.sdbc.ResultSet"); + aSupported[0] = "com.sun.star.sdbc.ResultSet"; return aSupported; } diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx index c756cb6dfdcb..208cb6b83c0d 100644 --- a/connectivity/source/drivers/evoab2/NTables.cxx +++ b/connectivity/source/drivers/evoab2/NTables.cxx @@ -50,7 +50,7 @@ ObjectType OEvoabTables::createObject(const OUString& aName) OUString aSchema( "%" ); Sequence< OUString > aTypes(1); - aTypes[0] = OUString("TABLE"); + aTypes[0] = "TABLE"; OUString sEmpty; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),aSchema,aName,aTypes); diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index 01c5e82761cc..91beb1414048 100644 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx @@ -167,7 +167,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& // set fields to fetch Sequence< OUString > aProps(1); OUString* pProps = aProps.getArray(); - pProps[ 0 ] = OUString("Title"); + pProps[ 0 ] = "Title"; try { @@ -394,7 +394,7 @@ Reference< XDynamicResultSet > OConnection::getDir() const Reference<XDynamicResultSet> xContent; Sequence< OUString > aProps(1); OUString* pProps = aProps.getArray(); - pProps[ 0 ] = OUString("Title"); + pProps[ 0 ] = "Title"; try { Reference<XContentIdentifier> xIdent = getContent()->getIdentifier(); @@ -437,7 +437,7 @@ void OConnection::throwUrlNotValid(const OUString & _rsUrl,const OUString & _rsM "$URL$", _rsUrl ); - aError.SQLState = OUString("S1000"); + aError.SQLState = "S1000"; aError.ErrorCode = 0; aError.Context = static_cast< XConnection* >(this); if (!_rsMessage.isEmpty()) diff --git a/connectivity/source/drivers/file/FDateFunctions.cxx b/connectivity/source/drivers/file/FDateFunctions.cxx index 1bea9fec099f..447037f8fa2a 100644 --- a/connectivity/source/drivers/file/FDateFunctions.cxx +++ b/connectivity/source/drivers/file/FDateFunctions.cxx @@ -104,25 +104,25 @@ ORowSetValue OOp_DayName::operate(const ORowSetValue& lhs) const switch(eDayOfWeek) { case MONDAY: - sRet = OUString("Monday"); + sRet = "Monday"; break; case TUESDAY: - sRet = OUString("Tuesday"); + sRet = "Tuesday"; break; case WEDNESDAY: - sRet = OUString("Wednesday"); + sRet = "Wednesday"; break; case THURSDAY: - sRet = OUString("Thursday"); + sRet = "Thursday"; break; case FRIDAY: - sRet = OUString("Friday"); + sRet = "Friday"; break; case SATURDAY: - sRet = OUString("Saturday"); + sRet = "Saturday"; break; case SUNDAY: - sRet = OUString("Sunday"); + sRet = "Sunday"; break; default: OSL_FAIL("Error in enum values for date"); @@ -140,40 +140,40 @@ ORowSetValue OOp_MonthName::operate(const ORowSetValue& lhs) const switch(aD.Month) { case 1: - sRet = OUString("January"); + sRet = "January"; break; case 2: - sRet = OUString("February"); + sRet = "February"; break; case 3: - sRet = OUString("March"); + sRet = "March"; break; case 4: - sRet = OUString("April"); + sRet = "April"; break; case 5: - sRet = OUString("May"); + sRet = "May"; break; case 6: - sRet = OUString("June"); + sRet = "June"; break; case 7: - sRet = OUString("July"); + sRet = "July"; break; case 8: - sRet = OUString("August"); + sRet = "August"; break; case 9: - sRet = OUString("September"); + sRet = "September"; break; case 10: - sRet = OUString("October"); + sRet = "October"; break; case 11: - sRet = OUString("November"); + sRet = "November"; break; case 12: - sRet = OUString("December"); + sRet = "December"; break; } return sRet; diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx index 0cbeb2a66e5a..6bb859620124 100644 --- a/connectivity/source/drivers/file/FDriver.cxx +++ b/connectivity/source/drivers/file/FDriver.cxx @@ -70,8 +70,8 @@ OUString OFileDriver::getImplementationName_Static( ) throw(RuntimeException) Sequence< OUString > OFileDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 2 ); - aSNS[0] = OUString("com.sun.star.sdbc.Driver"); - aSNS[1] = OUString("com.sun.star.sdbcx.Driver"); + aSNS[0] = "com.sun.star.sdbc.Driver"; + aSNS[1] = "com.sun.star.sdbcx.Driver"; return aSNS; } @@ -122,8 +122,8 @@ Sequence< DriverPropertyInfo > SAL_CALL OFileDriver::getPropertyInfo( const OUSt ::std::vector< DriverPropertyInfo > aDriverInfo; Sequence< OUString > aBoolean(2); - aBoolean[0] = OUString("0"); - aBoolean[1] = OUString("1"); + aBoolean[0] = "0"; + aBoolean[1] = "1"; aDriverInfo.push_back(DriverPropertyInfo( OUString("CharSet") diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx index 63e884cd159e..16abcde2df29 100644 --- a/connectivity/source/drivers/firebird/Driver.cxx +++ b/connectivity/source/drivers/firebird/Driver.cxx @@ -105,8 +105,8 @@ rtl::OUString FirebirdDriver::getImplementationName_Static() throw(RuntimeExcept Sequence< OUString > FirebirdDriver::getSupportedServiceNames_Static() throw (RuntimeException) { Sequence< OUString > aSNS( 2 ); - aSNS[0] = OUString("com.sun.star.sdbc.Driver"); - aSNS[0] = OUString("com.sun.star.sdbcx.Driver"); + aSNS[0] = "com.sun.star.sdbc.Driver"; + aSNS[0] = "com.sun.star.sdbcx.Driver"; return aSNS; } diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx index f07048a0db1d..fa148bbd8acc 100644 --- a/connectivity/source/drivers/firebird/ResultSet.cxx +++ b/connectivity/source/drivers/firebird/ResultSet.cxx @@ -807,8 +807,8 @@ Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames() throw( RuntimeException) { Sequence< OUString > aSupported(2); - aSupported[0] = OUString("com.sun.star.sdbc.ResultSet"); - aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet"); + aSupported[0] = "com.sun.star.sdbc.ResultSet"; + aSupported[1] = "com.sun.star.sdbcx.ResultSet"; return aSupported; } diff --git a/connectivity/source/drivers/flat/EDriver.cxx b/connectivity/source/drivers/flat/EDriver.cxx index c9b5fac684a4..b5c8235acc7b 100644 --- a/connectivity/source/drivers/flat/EDriver.cxx +++ b/connectivity/source/drivers/flat/EDriver.cxx @@ -85,8 +85,8 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString ::std::vector< DriverPropertyInfo > aDriverInfo; Sequence< OUString > aBoolean(2); - aBoolean[0] = OUString("0"); - aBoolean[1] = OUString("1"); + aBoolean[0] = "0"; + aBoolean[1] = "1"; aDriverInfo.push_back(DriverPropertyInfo( OUString("FieldDelimiter") diff --git a/connectivity/source/drivers/flat/EResultSet.cxx b/connectivity/source/drivers/flat/EResultSet.cxx index b29aaf86a6bd..f766ce704277 100644 --- a/connectivity/source/drivers/flat/EResultSet.cxx +++ b/connectivity/source/drivers/flat/EResultSet.cxx @@ -52,8 +52,8 @@ OUString SAL_CALL OFlatResultSet::getImplementationName( ) throw ( RuntimeExcep Sequence< OUString > SAL_CALL OFlatResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< OUString > aSupported(2); - aSupported[0] = OUString("com.sun.star.sdbc.ResultSet"); - aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet"); + aSupported[0] = "com.sun.star.sdbc.ResultSet"; + aSupported[1] = "com.sun.star.sdbcx.ResultSet"; return aSupported; } diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx index 9c12e10e9fb2..2bbdbe859970 100644 --- a/connectivity/source/drivers/hsqldb/HCatalog.cxx +++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx @@ -71,7 +71,7 @@ void OHCatalog::refreshTables() void OHCatalog::refreshViews() { Sequence< OUString > aTypes(1); - aTypes[0] = OUString("VIEW"); + aTypes[0] = "VIEW"; sal_Bool bSupportsViews = sal_False; try diff --git a/connectivity/source/drivers/hsqldb/HColumns.cxx b/connectivity/source/drivers/hsqldb/HColumns.cxx index 07e3fb47aecf..78f2eac9352d 100644 --- a/connectivity/source/drivers/hsqldb/HColumns.cxx +++ b/connectivity/source/drivers/hsqldb/HColumns.cxx @@ -55,7 +55,7 @@ OHSQLColumn::OHSQLColumn( sal_Bool _bCase) // ------------------------------------------------------------------------- void OHSQLColumn::construct() { - m_sAutoIncrement = OUString("IDENTITY"); + m_sAutoIncrement = "IDENTITY"; registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, ::getCppuType(&m_sAutoIncrement)); } // ----------------------------------------------------------------------------- @@ -72,7 +72,7 @@ void OHSQLColumn::construct() Sequence< OUString > SAL_CALL OHSQLColumn::getSupportedServiceNames( ) throw(RuntimeException) { Sequence< OUString > aSupported(1); - aSupported[0] = OUString("com.sun.star.sdbcx.Column"); + aSupported[0] = "com.sun.star.sdbcx.Column"; return aSupported; } diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index e22bab21b33c..21ed0d2ccbde 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -510,8 +510,8 @@ namespace connectivity Sequence< OUString > ODriverDelegator::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 2 ); - aSNS[0] = OUString("com.sun.star.sdbc.Driver"); - aSNS[1] = OUString("com.sun.star.sdbcx.Driver"); + aSNS[0] = "com.sun.star.sdbc.Driver"; + aSNS[1] = "com.sun.star.sdbcx.Driver"; return aSNS; } //------------------------------------------------------------------ @@ -829,7 +829,7 @@ namespace connectivity //.............................................................. OUString lcl_getSystemLocale( const Reference< XComponentContext >& _rxContext ) { - OUString sLocaleString = OUString( "en-US" ); + OUString sLocaleString = "en-US"; try { //......................................................... diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx index 0de62212a542..d867e50e784c 100644 --- a/connectivity/source/drivers/jdbc/JDriver.cxx +++ b/connectivity/source/drivers/jdbc/JDriver.cxx @@ -63,7 +63,7 @@ OUString java_sql_Driver::getImplementationName_Static( ) throw(RuntimeExceptio Sequence< OUString > java_sql_Driver::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 1 ); - aSNS[0] = OUString("com.sun.star.sdbc.Driver"); + aSNS[0] = "com.sun.star.sdbc.Driver"; return aSNS; } //------------------------------------------------------------------ @@ -136,8 +136,8 @@ Sequence< DriverPropertyInfo > SAL_CALL java_sql_Driver::getPropertyInfo( const ::std::vector< DriverPropertyInfo > aDriverInfo; Sequence< OUString > aBooleanValues(2); - aBooleanValues[0] = OUString( "false" ); - aBooleanValues[1] = OUString( "true" ); + aBooleanValues[0] = "false"; + aBooleanValues[1] = "true"; aDriverInfo.push_back(DriverPropertyInfo( OUString("JavaDriverClass") diff --git a/connectivity/source/drivers/kab/KCatalog.cxx b/connectivity/source/drivers/kab/KCatalog.cxx index fb6e330fac6a..a0b22b34e6e1 100644 --- a/connectivity/source/drivers/kab/KCatalog.cxx +++ b/connectivity/source/drivers/kab/KCatalog.cxx @@ -43,7 +43,7 @@ void KabCatalog::refreshTables() { TStringVector aVector; Sequence< OUString > aTypes(1); - aTypes[0] = OUString("%"); + aTypes[0] = "%"; Reference< XResultSet > xResult = m_xMetaData->getTables( Any(), OUString("%"), diff --git a/connectivity/source/drivers/kab/KDriver.cxx b/connectivity/source/drivers/kab/KDriver.cxx index 9b1da8574b77..798d7405e224 100644 --- a/connectivity/source/drivers/kab/KDriver.cxx +++ b/connectivity/source/drivers/kab/KDriver.cxx @@ -233,7 +233,7 @@ void KabImplModule::impl_throwGenericSQLException( const OUString& _rMessage ) { SQLException aError; aError.Message = _rMessage; - aError.SQLState = OUString( "S1000" ); + aError.SQLState = "S1000"; aError.ErrorCode = 0; throw aError; } @@ -249,7 +249,7 @@ void KabImplModule::impl_throwKdeTooNewException() "$major$",OUString::number(MIN_KDE_VERSION_MAJOR), "$minor$",OUString::number(MIN_KDE_VERSION_MINOR) ); - aError.SQLState = OUString( "S1000" ); + aError.SQLState = "S1000"; aError.ErrorCode = 0; SQLContext aDetails; @@ -351,7 +351,7 @@ Sequence< OUString > KabDriver::getSupportedServiceNames_Static( ) throw (Runti // which service is supported // for more information @see com.sun.star.sdbc.Driver Sequence< OUString > aSNS( 1 ); - aSNS[0] = OUString("com.sun.star.sdbc.Driver"); + aSNS[0] = "com.sun.star.sdbc.Driver"; return aSNS; } diff --git a/connectivity/source/drivers/kab/KTables.cxx b/connectivity/source/drivers/kab/KTables.cxx index 285759543cbb..f0ec31cad9ba 100644 --- a/connectivity/source/drivers/kab/KTables.cxx +++ b/connectivity/source/drivers/kab/KTables.cxx @@ -38,11 +38,11 @@ using namespace ::com::sun::star::lang; sdbcx::ObjectType KabTables::createObject(const OUString& _rName) { OUString aName,aSchema; - aSchema = OUString("%"); + aSchema = "%"; aName = _rName; Sequence< OUString > aTypes(1); - aTypes[0] = OUString("%"); + aTypes[0] = "%"; OUString sEmpty; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), aSchema, aName, aTypes); diff --git a/connectivity/source/drivers/macab/MacabCatalog.cxx b/connectivity/source/drivers/macab/MacabCatalog.cxx index 1061782d9c93..17e7ed69cd35 100644 --- a/connectivity/source/drivers/macab/MacabCatalog.cxx +++ b/connectivity/source/drivers/macab/MacabCatalog.cxx @@ -43,7 +43,7 @@ void MacabCatalog::refreshTables() { TStringVector aVector; Sequence< OUString > aTypes(1); - aTypes[0] = OUString("%"); + aTypes[0] = "%"; Reference< XResultSet > xResult = m_xMetaData->getTables( Any(), OUString("%"), @@ -84,7 +84,7 @@ void MacabCatalog::refreshUsers() // ------------------------------------------------------------------------- const OUString& MacabCatalog::getDot() { - static const OUString sDot = OUString("."); + static const OUString sDot = "."; return sDot; } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx b/connectivity/source/drivers/macab/MacabDriver.cxx index b6d3066ce7cc..b08e754a7e20 100644 --- a/connectivity/source/drivers/macab/MacabDriver.cxx +++ b/connectivity/source/drivers/macab/MacabDriver.cxx @@ -141,7 +141,7 @@ void MacabImplModule::impl_throwGenericSQLException( const OUString& _rMessage ) { SQLException aError; aError.Message = _rMessage; - aError.SQLState = OUString( "S1000" ); + aError.SQLState = "S1000"; aError.ErrorCode = 0; throw aError; } @@ -219,7 +219,7 @@ Sequence< OUString > MacabDriver::getSupportedServiceNames_Static( ) throw (Run // which service is supported // for more information @see com.sun.star.sdbc.Driver Sequence< OUString > aSNS( 1 ); - aSNS[0] = OUString("com.sun.star.sdbc.Driver"); + aSNS[0] = "com.sun.star.sdbc.Driver"; return aSNS; } diff --git a/connectivity/source/drivers/macab/MacabTables.cxx b/connectivity/source/drivers/macab/MacabTables.cxx index 285d6d992a58..32fd6ab96cbf 100644 --- a/connectivity/source/drivers/macab/MacabTables.cxx +++ b/connectivity/source/drivers/macab/MacabTables.cxx @@ -38,11 +38,11 @@ using namespace ::com::sun::star::lang; sdbcx::ObjectType MacabTables::createObject(const OUString& _rName) { OUString aName,aSchema; - aSchema = OUString("%"); + aSchema = "%"; aName = _rName; Sequence< OUString > aTypes(1); - aTypes[0] = OUString("%"); + aTypes[0] = "%"; OUString sEmpty; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), aSchema, aName, aTypes); diff --git a/connectivity/source/drivers/mork/MCatalog.cxx b/connectivity/source/drivers/mork/MCatalog.cxx index 869cdb44164a..663ee08d2267 100644 --- a/connectivity/source/drivers/mork/MCatalog.cxx +++ b/connectivity/source/drivers/mork/MCatalog.cxx @@ -51,7 +51,7 @@ void OCatalog::refreshTables() { TStringVector aVector; Sequence< OUString > aTypes(1); - aTypes[0] = OUString("%"); + aTypes[0] = "%"; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), OUString("%"),OUString("%"),aTypes); diff --git a/connectivity/source/drivers/mork/MNSINIParser.cxx b/connectivity/source/drivers/mork/MNSINIParser.cxx index bd7ac6e97d79..641fbbd4061d 100644 --- a/connectivity/source/drivers/mork/MNSINIParser.cxx +++ b/connectivity/source/drivers/mork/MNSINIParser.cxx @@ -75,7 +75,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce sectionName = OStringToOUString( line.copy(nIndexStart + 1,nIndexEnd - nIndexStart -1).trim(), RTL_TEXTENCODING_ASCII_US ); if (sectionName.isEmpty()) - sectionName = OUString("no name section"); + sectionName = "no name section"; ini_Section *aSection = &mAllSection[sectionName]; aSection->sName = sectionName; diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx index d14a0468d7e3..163054e46110 100644 --- a/connectivity/source/drivers/mork/MResultSet.cxx +++ b/connectivity/source/drivers/mork/MResultSet.cxx @@ -71,8 +71,8 @@ OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames( ) throw( RuntimeException) { ::com::sun::star::uno::Sequence< OUString > aSupported(2); - aSupported[0] = OUString("com.sun.star.sdbc.ResultSet"); - aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet"); + aSupported[0] = "com.sun.star.sdbc.ResultSet"; + aSupported[1] = "com.sun.star.sdbcx.ResultSet"; return aSupported; } @@ -734,11 +734,11 @@ void OResultSet::parseParameter( const OSQLParseNode* pNode, OUString& rMatchStr OSQLParseNode *pMark = pNode->getChild(0); // Initialize to empty string - rMatchString = OUString(""); + rMatchString = ""; OUString aParameterName; if (SQL_ISPUNCTUATION(pMark,"?")) { - aParameterName = OUString("?"); + aParameterName = "?"; } else if (SQL_ISPUNCTUATION(pMark,":")) { aParameterName = pNode->getChild(1)->getTokenValue(); @@ -940,7 +940,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT // String containing only a '%' and nothing else op = MQueryOp::Exists; // Will be ignored for Exists case, but clear anyway. - matchString = OUString(""); + matchString = ""; } else if ( matchString.indexOf ( WILDCARD ) == -1 && matchString.indexOf ( MATCHCHAR ) == -1 ) @@ -1369,7 +1369,7 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow, if (xTableColumn.is()) xTableColumn->getPropertyValue(sName) >>= sTableColumnName; else - sTableColumnName = OUString(); + sTableColumnName = ""; // look if we have such a select column // TODO: would like to have a O(log n) search here ... diff --git a/connectivity/source/drivers/mork/MTables.cxx b/connectivity/source/drivers/mork/MTables.cxx index e1f8bfae0c69..546103ec4c40 100644 --- a/connectivity/source/drivers/mork/MTables.cxx +++ b/connectivity/source/drivers/mork/MTables.cxx @@ -47,11 +47,11 @@ using namespace dbtools; sdbcx::ObjectType OTables::createObject(const OUString& _rName) { OUString aName,aSchema; - aSchema = OUString("%"); + aSchema = "%"; aName = _rName; Sequence< OUString > aTypes(1); - aTypes[0] = OUString("%"); + aTypes[0] = "%"; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),aSchema,aName,aTypes); diff --git a/connectivity/source/drivers/mozab/MCatalog.cxx b/connectivity/source/drivers/mozab/MCatalog.cxx index 06cf96816710..a4a288d1a70c 100644 --- a/connectivity/source/drivers/mozab/MCatalog.cxx +++ b/connectivity/source/drivers/mozab/MCatalog.cxx @@ -51,7 +51,7 @@ void OCatalog::refreshTables() { TStringVector aVector; Sequence< OUString > aTypes(1); - aTypes[0] = OUString("%"); + aTypes[0] = "%"; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), OUString("%"),OUString("%"),aTypes); diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx index fbf0b8538e3b..13ce879b32c2 100644 --- a/connectivity/source/drivers/mozab/MResultSet.cxx +++ b/connectivity/source/drivers/mozab/MResultSet.cxx @@ -70,8 +70,8 @@ OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames( ) throw( RuntimeException) { ::com::sun::star::uno::Sequence< OUString > aSupported(2); - aSupported[0] = OUString("com.sun.star.sdbc.ResultSet"); - aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet"); + aSupported[0] = "com.sun.star.sdbc.ResultSet"; + aSupported[1] = "com.sun.star.sdbcx.ResultSet"; return aSupported; } @@ -716,11 +716,11 @@ void OResultSet::parseParameter( const OSQLParseNode* pNode, OUString& rMatchStr OSQLParseNode *pMark = pNode->getChild(0); // Initialize to empty string - rMatchString = OUString(""); + rMatchString = ""; OUString aParameterName; if (SQL_ISPUNCTUATION(pMark,"?")) { - aParameterName = OUString("?"); + aParameterName = "?"; } else if (SQL_ISPUNCTUATION(pMark,":")) { aParameterName = pNode->getChild(1)->getTokenValue(); @@ -922,7 +922,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT // String containing only a '%' and nothing else op = MQueryOp::Exists; // Will be ignored for Exists case, but clear anyway. - matchString = OUString(""); + matchString = ""; } else if ( matchString.indexOf ( WILDCARD ) == -1 && matchString.indexOf ( MATCHCHAR ) == -1 ) @@ -1088,9 +1088,9 @@ void OResultSet::fillRowData() OSL_ENSURE(m_pStatement, "Cannot determine Parent Statement"); OUString aStr; if (xConnection->isLDAP()) - aStr = OUString("PrimaryEmail"); + aStr = "PrimaryEmail"; else - aStr = OUString("card:nsIAbCard"); + aStr = "card:nsIAbCard"; eVector.push_back( new MQueryExpressionString(aStr, MQueryOp::Exists) ); queryExpression.setExpressions( eVector ); @@ -1370,7 +1370,7 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow, if (xTableColumn.is()) xTableColumn->getPropertyValue(sName) >>= sTableColumnName; else - sTableColumnName = OUString(); + sTableColumnName = ""; // look if we have such a select column // TODO: would like to have a O(log n) search here ... diff --git a/connectivity/source/drivers/mozab/MTables.cxx b/connectivity/source/drivers/mozab/MTables.cxx index be6239457d0b..91bd7da14abe 100644 --- a/connectivity/source/drivers/mozab/MTables.cxx +++ b/connectivity/source/drivers/mozab/MTables.cxx @@ -47,11 +47,11 @@ using namespace dbtools; sdbcx::ObjectType OTables::createObject(const OUString& _rName) { OUString aName,aSchema; - aSchema = OUString("%"); + aSchema = "%"; aName = _rName; Sequence< OUString > aTypes(1); - aTypes[0] = OUString("%"); + aTypes[0] = "%"; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),aSchema,aName,aTypes); diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx index 55e57f573401..358cb930843c 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx @@ -82,7 +82,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce sectionName = OStringToOUString( line.copy(nIndexStart + 1,nIndexEnd - nIndexStart -1).trim(), RTL_TEXTENCODING_ASCII_US ); if (sectionName.isEmpty()) - sectionName = OUString("no name section"); + sectionName = "no name section"; ini_Section *aSection = &mAllSection[sectionName]; aSection->sName = sectionName; diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx index 0de2424fd0f1..c4790a5e7eb9 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx @@ -440,7 +440,7 @@ nsresult getTableStringsProxied(const sal_Char* sAbURI, sal_Int32 *nDirectoryTyp // Insert table into map if ( aTableName.isEmpty() ) - aTableName = OUString("AddressBook"); + aTableName = "AddressBook"; OSL_TRACE("TableName = >%s<", OUtoCStr( aTableName ) ); @@ -624,7 +624,7 @@ sal_Bool MDatabaseMetaDataHelper::getTables( OConnection* _pCon, ::std::vector< OUString > tables; ::std::vector< OUString > tabletypes; - OUString matchAny = OUString("%"); + OUString matchAny = "%"; if ( !getTableStrings( _pCon, tables,tabletypes ) ) return sal_False; @@ -643,7 +643,7 @@ sal_Bool MDatabaseMetaDataHelper::getTables( OConnection* _pCon, 0 != ::comphelper::findValue( types, aTableType, sal_True ).getLength() || 0 != ::comphelper::findValue( types, matchAny, sal_True ).getLength())) { if ( aTableName.isEmpty() ) { - aTableName = OUString("AddressBook"); + aTableName = "AddressBook"; } OSL_TRACE( "TableName = %s ; TableType = %s", OUtoCStr(aTableName), OUtoCStr(aTableType) ); diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx index cab7b9d0045f..e8d1d3323641 100644 --- a/connectivity/source/drivers/mysql/YCatalog.cxx +++ b/connectivity/source/drivers/mysql/YCatalog.cxx @@ -74,7 +74,7 @@ void OMySQLCatalog::refreshTables() void OMySQLCatalog::refreshViews() { Sequence< OUString > aTypes(1); - aTypes[0] = OUString("VIEW"); + aTypes[0] = "VIEW"; // let's simply assume the server is new enough to support views. Current drivers // as of this writing might not return the proper information in getTableTypes, so diff --git a/connectivity/source/drivers/mysql/YColumns.cxx b/connectivity/source/drivers/mysql/YColumns.cxx index 169bdc57c0de..f936432e76e7 100644 --- a/connectivity/source/drivers/mysql/YColumns.cxx +++ b/connectivity/source/drivers/mysql/YColumns.cxx @@ -55,7 +55,7 @@ OMySQLColumn::OMySQLColumn( sal_Bool _bCase) // ------------------------------------------------------------------------- void OMySQLColumn::construct() { - m_sAutoIncrement = OUString("auto_increment"); + m_sAutoIncrement = "auto_increment"; registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, ::getCppuType(&m_sAutoIncrement)); } // ----------------------------------------------------------------------------- @@ -72,7 +72,7 @@ void OMySQLColumn::construct() Sequence< OUString > SAL_CALL OMySQLColumn::getSupportedServiceNames( ) throw(RuntimeException) { Sequence< OUString > aSupported(1); - aSupported[0] = OUString("com.sun.star.sdbcx.Column"); + aSupported[0] = "com.sun.star.sdbcx.Column"; return aSupported; } diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx index cb005e9e7363..d7cd83bfc91f 100644 --- a/connectivity/source/drivers/mysql/YDriver.cxx +++ b/connectivity/source/drivers/mysql/YDriver.cxx @@ -137,17 +137,12 @@ namespace connectivity { OUString sNewUrl = _sUrl.copy(11); if ( isOdbcUrl( _sUrl ) ) - sNewUrl = OUString("sdbc:") + sNewUrl; + sNewUrl = "sdbc:" + sNewUrl; else if ( isNativeUrl( _sUrl ) ) - sNewUrl = OUString("sdbc:") + sNewUrl; + sNewUrl = "sdbc:" + sNewUrl; else { - sNewUrl = sNewUrl.copy(5); - - OUString sTempUrl = OUString("jdbc:mysql://"); - - sTempUrl += sNewUrl; - sNewUrl = sTempUrl; + sNewUrl = "jdbc:mysql://" + sNewUrl.copy(5); } return sNewUrl; } @@ -340,8 +335,8 @@ namespace connectivity return Sequence< DriverPropertyInfo >(); Sequence< OUString > aBoolean(2); - aBoolean[0] = OUString("0"); - aBoolean[1] = OUString("1"); + aBoolean[0] = "0"; + aBoolean[1] = "1"; aDriverInfo.push_back(DriverPropertyInfo( @@ -478,8 +473,8 @@ namespace connectivity Sequence< OUString > ODriverDelegator::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 2 ); - aSNS[0] = OUString("com.sun.star.sdbc.Driver"); - aSNS[1] = OUString("com.sun.star.sdbcx.Driver"); + aSNS[0] = "com.sun.star.sdbc.Driver"; + aSNS[1] = "com.sun.star.sdbcx.Driver"; return aSNS; } //------------------------------------------------------------------ diff --git a/connectivity/source/drivers/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx index 36b3930ba870..6e6f6ce2de48 100644 --- a/connectivity/source/drivers/odbc/OFunctions.cxx +++ b/connectivity/source/drivers/odbc/OFunctions.cxx @@ -91,16 +91,16 @@ sal_Bool LoadLibrary_ODBC3(OUString &_rPath) if (bLoaded) return sal_True; #ifdef WNT - _rPath = OUString("ODBC32.DLL"); + _rPath = "ODBC32.DLL"; #endif #ifdef UNX #ifdef MACOSX - _rPath = OUString("libiodbc.dylib"); + _rPath = "libiodbc.dylib"; #else - _rPath = OUString("libodbc.so.1"); + _rPath = "libodbc.so.1"; pODBCso = osl_loadModule( _rPath.pData,SAL_LOADMODULE_NOW ); if ( !pODBCso ) - _rPath = OUString("libodbc.so"); + _rPath = "libodbc.so"; #endif /* MACOSX */ #endif diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx index df7cf2aee687..63f20e2ee020 100644 --- a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx +++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx @@ -51,7 +51,7 @@ ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon { m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); OUString sVersion = getDriverVersion(); - m_bOdbc3 = sVersion != OUString("02.50") && sVersion != OUString("02.00"); + m_bOdbc3 = sVersion != "02.50" && sVersion != "02.00"; } catch(SQLException& ) { // doesn't matter here @@ -1188,8 +1188,7 @@ OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeExcep OUString aValue = m_pConnection->getURL(); if ( aValue.isEmpty() ) { - aValue = OUString("sdbc:odbc:"); - aValue += getURLImpl(); + aValue = "sdbc:odbc:" + getURLImpl(); } return aValue; } diff --git a/connectivity/source/drivers/odbcbase/ODriver.cxx b/connectivity/source/drivers/odbcbase/ODriver.cxx index e5871f012918..091efa9a696c 100644 --- a/connectivity/source/drivers/odbcbase/ODriver.cxx +++ b/connectivity/source/drivers/odbcbase/ODriver.cxx @@ -68,7 +68,7 @@ OUString ODBCDriver::getImplementationName_Static( ) throw(RuntimeException) Sequence< OUString > ODBCDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 1 ); - aSNS[0] = OUString("com.sun.star.sdbc.Driver"); + aSNS[0] = "com.sun.star.sdbc.Driver"; return aSNS; } @@ -122,8 +122,8 @@ Sequence< DriverPropertyInfo > SAL_CALL ODBCDriver::getPropertyInfo( const OUStr ::std::vector< DriverPropertyInfo > aDriverInfo; Sequence< OUString > aBooleanValues(2); - aBooleanValues[0] = OUString( "false" ); - aBooleanValues[1] = OUString( "true" ); + aBooleanValues[0] = "false"; + aBooleanValues[1] = "true"; aDriverInfo.push_back(DriverPropertyInfo( OUString("CharSet") diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx index bf6e9e95e146..1812e8722765 100644 --- a/connectivity/source/drivers/odbcbase/OResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx @@ -75,8 +75,8 @@ OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< OUString > aSupported(2); - aSupported[0] = OUString("com.sun.star.sdbc.ResultSet"); - aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet"); + aSupported[0] = "com.sun.star.sdbc.ResultSet"; + aSupported[1] = "com.sun.star.sdbcx.ResultSet"; return aSupported; } diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx index e9cd423a55d1..8910f8afe5d5 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.cxx +++ b/connectivity/source/drivers/postgresql/pq_connection.cxx @@ -148,7 +148,7 @@ static sal_Int32 readLogLevelFromConfiguration() OUString fileName; osl_getModuleURLFromAddress( (void*) readLogLevelFromConfiguration, (rtl_uString **) &fileName ); - fileName = OUString( fileName.getStr(), fileName.lastIndexOf( '/' )+1 ); + fileName = fileName.copy( fileName.lastIndexOf( '/' )+1 ); fileName += "postgresql-sdbc.ini"; rtl::Bootstrap bootstrapHandle( fileName ); @@ -558,7 +558,7 @@ void Connection::initialize( const Sequence< Any >& aArguments ) free(err); } else - errorMessage = OUString("#no error message#"); + errorMessage = "#no error message#"; OUStringBuffer buf( 128 ); buf.appendAscii( "Error in database URL '" ); buf.append( url ); |