diff options
author | Gert Faller <gertfaller@aliceadsl.fr> | 2010-11-19 18:15:54 +0100 |
---|---|---|
committer | Gert Faller <gertfaller@aliceadsl.fr> | 2010-11-19 18:15:54 +0100 |
commit | 3de60cfb7060314b52646bf555fb561b2446200e (patch) | |
tree | 9ccffafb5ed0c078203e88d56279f6d9062115c0 | |
parent | 61f34cbeaadc285a34c99771650f329e81cca78e (diff) |
TL_CONSTASCII_USTRINGPARAM in libs core 20
90 files changed, 433 insertions, 433 deletions
diff --git a/connectivity/source/drivers/calc/CCatalog.cxx b/connectivity/source/drivers/calc/CCatalog.cxx index 43142bc18e..985a3b21df 100644 --- a/connectivity/source/drivers/calc/CCatalog.cxx +++ b/connectivity/source/drivers/calc/CCatalog.cxx @@ -58,7 +58,7 @@ void OCalcCatalog::refreshTables() Sequence< ::rtl::OUString > aTypes; OCalcConnection::ODocHolder aDocHodler(((OCalcConnection*)m_pConnection)); Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - ::rtl::OUString::createFromAscii("%"),::rtl::OUString::createFromAscii("%"),aTypes); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx index bbe3990afb..b6f405a62c 100644 --- a/connectivity/source/drivers/calc/CConnection.cxx +++ b/connectivity/source/drivers/calc/CConnection.cxx @@ -124,21 +124,21 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc() } // open read-only as long as updating isn't implemented Sequence<PropertyValue> aArgs(2); - aArgs[0].Name = ::rtl::OUString::createFromAscii("Hidden"); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Hidden")); aArgs[0].Value <<= (sal_Bool) sal_True; - aArgs[1].Name = ::rtl::OUString::createFromAscii("ReadOnly"); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")); aArgs[1].Value <<= (sal_Bool) sal_True; if ( m_sPassword.getLength() ) { const sal_Int32 nPos = aArgs.getLength(); aArgs.realloc(nPos+1); - aArgs[nPos].Name = ::rtl::OUString::createFromAscii("Password"); + aArgs[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Password")); aArgs[nPos].Value <<= m_sPassword; } Reference< XComponentLoader > xDesktop( getDriver()->getFactory()->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))), UNO_QUERY ); if (!xDesktop.is()) { OSL_ASSERT("no desktop"); @@ -149,7 +149,7 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc() try { xComponent = xDesktop->loadComponentFromURL( - m_aFileName, ::rtl::OUString::createFromAscii("_blank"), 0, aArgs ); + m_aFileName, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_blank")), 0, aArgs ); } catch( const Exception& ) { diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx index 80f22f5f59..c25d533d57 100644 --- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx @@ -92,7 +92,7 @@ Reference< XResultSet > OCalcDatabaseMetaData::impl_getTypeInfo_throw( ) aRow.reserve(18); aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii("VARCHAR"))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")))); aRow.push_back(new ORowSetValueDecorator(DataType::VARCHAR)); aRow.push_back(new ORowSetValueDecorator((sal_Int32)65535)); aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue()); @@ -114,35 +114,35 @@ Reference< XResultSet > OCalcDatabaseMetaData::impl_getTypeInfo_throw( ) aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DECIMAL")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL"))); aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL); aRow[3] = ODatabaseMetaDataResultSet::get0Value(); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); aRow[15] = ODatabaseMetaDataResultSet::get0Value(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("BOOL")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BOOL"))); aRow[2] = new ORowSetValueDecorator(DataType::BIT); aRow[3] = new ORowSetValueDecorator((sal_Int32)20); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); aRow[15] = new ORowSetValueDecorator((sal_Int32)15); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DATE")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE"))); aRow[2] = new ORowSetValueDecorator(DataType::DATE); aRow[3] = ODatabaseMetaDataResultSet::get0Value(); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); aRow[15] = ODatabaseMetaDataResultSet::get0Value(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIME")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME"))); aRow[2] = new ORowSetValueDecorator(DataType::TIME); aRow[3] = ODatabaseMetaDataResultSet::get0Value(); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); aRow[15] = ODatabaseMetaDataResultSet::get0Value(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP); aRow[3] = ODatabaseMetaDataResultSet::get0Value(); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); @@ -231,10 +231,10 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getColumns( switch(sal_Int32(aRow[11]->getValue())) { case ColumnValue::NO_NULLS: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("NO")); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO"))); break; case ColumnValue::NULLABLE: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("YES")); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YES"))); break; default: aRow[18] = new ORowSetValueDecorator(::rtl::OUString()); @@ -310,7 +310,7 @@ sal_Bool lcl_IsEmptyOrHidden( const Reference<XSpreadsheets>& xSheets, const ::r if (xProp.is()) { sal_Bool bVisible = sal_Bool(); - Any aVisAny = xProp->getPropertyValue( ::rtl::OUString::createFromAscii("IsVisible") ); + Any aVisAny = xProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsVisible")) ); if ( aVisAny >>= bVisible ) if (!bVisible) return sal_True; // hidden @@ -353,7 +353,7 @@ sal_Bool lcl_IsUnnamed( const Reference<XDatabaseRanges>& xRanges, const ::rtl:: { try { - Any aUserAny = xRangeProp->getPropertyValue( ::rtl::OUString::createFromAscii("IsUserDefined") ); + Any aUserAny = xRangeProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsUserDefined")) ); sal_Bool bUserDefined = sal_Bool(); if ( aUserAny >>= bUserDefined ) bUnnamed = !bUserDefined; @@ -384,7 +384,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( // check if ORowSetValue type is given // when no types are given then we have to return all tables e.g. TABLE - ::rtl::OUString aTable(::rtl::OUString::createFromAscii("TABLE")); + ::rtl::OUString aTable(RTL_CONSTASCII_USTRINGPARAM("TABLE")); sal_Bool bTableFound = sal_True; sal_Int32 nLength = types.getLength(); @@ -438,7 +438,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( Reference<XPropertySet> xDocProp( xDoc, UNO_QUERY ); if ( xDocProp.is() ) { - Any aRangesAny = xDocProp->getPropertyValue( ::rtl::OUString::createFromAscii("DatabaseRanges") ); + Any aRangesAny = xDocProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DatabaseRanges")) ); Reference<XDatabaseRanges> xRanges; if ( aRangesAny >>= xRanges ) { diff --git a/connectivity/source/drivers/calc/CDriver.cxx b/connectivity/source/drivers/calc/CDriver.cxx index 4f3cb57ef4..4317829cf9 100644 --- a/connectivity/source/drivers/calc/CDriver.cxx +++ b/connectivity/source/drivers/calc/CDriver.cxx @@ -49,7 +49,7 @@ using namespace ::com::sun::star::lang; rtl::OUString ODriver::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString::createFromAscii("com.sun.star.comp.sdbc.calc.ODriver"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.calc.ODriver")); } ::rtl::OUString SAL_CALL ODriver::getImplementationName( ) throw(RuntimeException) @@ -89,7 +89,7 @@ Reference< XConnection > SAL_CALL ODriver::connect( const ::rtl::OUString& url, sal_Bool SAL_CALL ODriver::acceptsURL( const ::rtl::OUString& url ) throw(SQLException, RuntimeException) { - return url.compareTo(::rtl::OUString::createFromAscii("sdbc:calc:"),10) == 0; + return url.compareTo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:calc:")),10) == 0; } Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/calc/CResultSet.cxx b/connectivity/source/drivers/calc/CResultSet.cxx index e218ce7f00..5d76738ace 100644 --- a/connectivity/source/drivers/calc/CResultSet.cxx +++ b/connectivity/source/drivers/calc/CResultSet.cxx @@ -56,14 +56,14 @@ OCalcResultSet::OCalcResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTr // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OCalcResultSet::getImplementationName( ) throw ( RuntimeException) { - return ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.calc.ResultSet"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.calc.ResultSet")); } // ------------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL OCalcResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< ::rtl::OUString > aSupported(2); - aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.ResultSet"); - aSupported[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.ResultSet"); + aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet")); + aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.ResultSet")); return aSupported; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 5a005d22d3..8788fd9a46 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -494,19 +494,19 @@ void OCalcTable::fillColumns() } break; case DataType::DECIMAL: - aTypeName = ::rtl::OUString::createFromAscii("DECIMAL"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL")); break; case DataType::BIT: - aTypeName = ::rtl::OUString::createFromAscii("BOOL"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BOOL")); break; case DataType::DATE: - aTypeName = ::rtl::OUString::createFromAscii("DATE"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE")); break; case DataType::TIME: - aTypeName = ::rtl::OUString::createFromAscii("TIME"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME")); break; case DataType::TIMESTAMP: - aTypeName = ::rtl::OUString::createFromAscii("TIMESTAMP"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP")); break; default: OSL_ASSERT("missing type name"); diff --git a/connectivity/source/drivers/calc/CTables.cxx b/connectivity/source/drivers/calc/CTables.cxx index 1652523459..2cee66ace7 100644 --- a/connectivity/source/drivers/calc/CTables.cxx +++ b/connectivity/source/drivers/calc/CTables.cxx @@ -52,7 +52,7 @@ sdbcx::ObjectType OCalcTables::createObject(const ::rtl::OUString& _rName) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcTables::createObject" ); OCalcTable* pTable = new OCalcTable(this,(OCalcConnection*)static_cast<OFileCatalog&>(m_rParent).getConnection(), - _rName,::rtl::OUString::createFromAscii("TABLE")); + _rName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE"))); sdbcx::ObjectType xRet = pTable; pTable->construct(); return xRet; diff --git a/connectivity/source/drivers/calc/Cservices.cxx b/connectivity/source/drivers/calc/Cservices.cxx index 4af845930d..482cd0d23c 100644 --- a/connectivity/source/drivers/calc/Cservices.cxx +++ b/connectivity/source/drivers/calc/Cservices.cxx @@ -62,9 +62,9 @@ void REGISTER_PROVIDER( const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) { OUString aMainKeyName; - aMainKeyName = OUString::createFromAscii("/"); + aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aMainKeyName += aServiceImplName; - aMainKeyName += OUString::createFromAscii("/UNO/SERVICES"); + aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); OSL_ENSURE(xNewKey.is(), "FILE::component_writeInfo : could not create a registry key !"); diff --git a/connectivity/source/drivers/dbase/DCatalog.cxx b/connectivity/source/drivers/dbase/DCatalog.cxx index 5663835343..3e5f2b8bde 100644 --- a/connectivity/source/drivers/dbase/DCatalog.cxx +++ b/connectivity/source/drivers/dbase/DCatalog.cxx @@ -54,7 +54,7 @@ void ODbaseCatalog::refreshTables() TStringVector aVector; Sequence< ::rtl::OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - ::rtl::OUString::createFromAscii("%"),::rtl::OUString::createFromAscii("%"),aTypes); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index fc11724683..004875c606 100644 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx @@ -83,12 +83,12 @@ Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw( ) aRow.reserve(18); aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii("VARCHAR"))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")))); aRow.push_back(new ORowSetValueDecorator(DataType::VARCHAR)); aRow.push_back(new ORowSetValueDecorator((sal_Int32)254)); aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue()); aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue()); - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii("length"))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("length")))); aRow.push_back(new ORowSetValueDecorator((sal_Int32)ColumnValue::NULLABLE)); aRow.push_back(ODatabaseMetaDataResultSet::get1Value()); aRow.push_back(new ORowSetValueDecorator((sal_Int32)ColumnSearch::FULL)); @@ -104,20 +104,20 @@ Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw( ) aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("LONGVARCHAR")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LONGVARCHAR"))); aRow[2] = new ORowSetValueDecorator(DataType::LONGVARCHAR); aRow[3] = new ORowSetValueDecorator((sal_Int32)2147483647); aRow[6] = new ORowSetValueDecorator(); aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("M"))); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DATE")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE"))); aRow[2] = new ORowSetValueDecorator(DataType::DATE); aRow[3] = new ORowSetValueDecorator((sal_Int32)10); aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("D"))); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("BOOLEAN")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BOOLEAN"))); aRow[2] = new ORowSetValueDecorator(DataType::BIT); aRow[3] = ODatabaseMetaDataResultSet::get1Value(); aRow[4] = ODatabaseMetaDataResultSet::getEmptyValue(); @@ -127,36 +127,36 @@ Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw( ) aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("L"))); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DOUBLE")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOUBLE"))); aRow[2] = new ORowSetValueDecorator(DataType::DOUBLE); aRow[3] = new ORowSetValueDecorator((sal_Int32)8); aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("B"))); aRows.push_back(aRow); aRow[11] = new ORowSetValueDecorator(sal_True); - aRow[13] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("Y")); + aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Y"))); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP); aRow[11] = new ORowSetValueDecorator(sal_False); aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("T"))); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("INTEGER")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INTEGER"))); aRow[2] = new ORowSetValueDecorator(DataType::INTEGER); aRow[3] = new ORowSetValueDecorator((sal_Int32)10); aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("I"))); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DECIMAL")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL"))); aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL); aRow[3] = new ORowSetValueDecorator((sal_Int32)20); - aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("length,scale")); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("length,scale"))); aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("F"))); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("NUMERIC")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMERIC"))); aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL); aRow[3] = new ORowSetValueDecorator((sal_Int32)16); aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("N"))); @@ -239,10 +239,10 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getColumns( switch(sal_Int32(aRow[11]->getValue())) { case ColumnValue::NO_NULLS: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("NO")); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO"))); break; case ColumnValue::NULLABLE: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("YES")); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YES"))); break; default: aRow[18] = new ORowSetValueDecorator(::rtl::OUString()); @@ -278,7 +278,7 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo( ODatabaseMetaDataResultSet::ORow aRow(14); aRow[5] = new ORowSetValueDecorator(::rtl::OUString()); - aRow[10] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("A")); + aRow[10] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("A"))); Reference< XIndexesSupplier> xTable; ::cppu::extractInterface(xTable,xNames->getByName(table)); diff --git a/connectivity/source/drivers/dbase/DDriver.cxx b/connectivity/source/drivers/dbase/DDriver.cxx index 1920166416..27b802c53f 100644 --- a/connectivity/source/drivers/dbase/DDriver.cxx +++ b/connectivity/source/drivers/dbase/DDriver.cxx @@ -47,7 +47,7 @@ using namespace ::com::sun::star::lang; //------------------------------------------------------------------------------ rtl::OUString ODriver::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString::createFromAscii("com.sun.star.comp.sdbc.dbase.ODriver"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.dbase.ODriver")); } //------------------------------------------------------------------ @@ -81,7 +81,7 @@ Reference< XConnection > SAL_CALL ODriver::connect( const ::rtl::OUString& url, // -------------------------------------------------------------------------------- sal_Bool SAL_CALL ODriver::acceptsURL( const ::rtl::OUString& url ) throw(SQLException, RuntimeException) { - return !url.compareTo(::rtl::OUString::createFromAscii("sdbc:dbase:"),11); + return !url.compareTo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:")),11); } // ----------------------------------------------------------------------------- Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index 09103a277f..866c77f5a0 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -380,7 +380,7 @@ SvStream& connectivity::dbase::operator << (SvStream &rStream, ODbaseIndex& rInd ::rtl::OUString sDir = m_pTable->getConnection()->getURL(); sDir += OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELIMITER); sDir += m_Name; - sDir += ::rtl::OUString::createFromAscii(".ndx"); + sDir += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".ndx")); return sDir; } //------------------------------------------------------------------ @@ -393,7 +393,7 @@ void ODbaseIndex::createINFEntry() ::rtl::OUString sCfgFile(m_pTable->getConnection()->getURL()); sCfgFile += OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELIMITER); sCfgFile += m_pTable->getName(); - sCfgFile += ::rtl::OUString::createFromAscii(".inf"); + sCfgFile += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".inf")); String sPhysicalPath; LocalFileHelper::ConvertURLToPhysicalName(sCfgFile,sPhysicalPath); @@ -437,7 +437,7 @@ BOOL ODbaseIndex::DropImpl() ::rtl::OUString sCfgFile(m_pTable->getConnection()->getURL()); sCfgFile += OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELIMITER); sCfgFile += m_pTable->getName(); - sCfgFile += ::rtl::OUString::createFromAscii(".inf"); + sCfgFile += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".inf")); String sPhysicalPath; String sNDX(sCfgFile); diff --git a/connectivity/source/drivers/dbase/DIndexes.cxx b/connectivity/source/drivers/dbase/DIndexes.cxx index cd2090de7f..b5be60ff22 100644 --- a/connectivity/source/drivers/dbase/DIndexes.cxx +++ b/connectivity/source/drivers/dbase/DIndexes.cxx @@ -55,7 +55,7 @@ sdbcx::ObjectType ODbaseIndexes::createObject(const ::rtl::OUString& _rName) ::rtl::OUString sFile = m_pTable->getConnection()->getURL(); sFile += OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELIMITER); sFile += _rName; - sFile += ::rtl::OUString::createFromAscii(".ndx"); + sFile += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".ndx")); if ( !UCBContentHelper::Exists(sFile) ) { const ::rtl::OUString sError( m_pTable->getConnection()->getResources().getResourceStringWithSubstitution( diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx index 6b93961a52..d055bdb6b3 100644 --- a/connectivity/source/drivers/dbase/DResultSet.cxx +++ b/connectivity/source/drivers/dbase/DResultSet.cxx @@ -59,14 +59,14 @@ ODbaseResultSet::ODbaseResultSet( OStatement_Base* pStmt,connectivity::OSQLParse // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL ODbaseResultSet::getImplementationName( ) throw ( RuntimeException) { - return ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.dbase.ResultSet"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.dbase.ResultSet")); } // ------------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL ODbaseResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< ::rtl::OUString > aSupported(2); - aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.ResultSet"); - aSupported[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.ResultSet"); + aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet")); + aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.ResultSet")); return aSupported; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index fa286f3456..b452c3fe03 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1041,7 +1041,7 @@ BOOL ODbaseTable::CreateImpl() { ::rtl::OUString aIdent = m_pConnection->getContent()->getIdentifier()->getContentIdentifier(); if ( aIdent.lastIndexOf('/') != (aIdent.getLength()-1) ) - aIdent += ::rtl::OUString::createFromAscii("/"); + aIdent += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aIdent += m_Name; aName = aIdent.getStr(); } @@ -1080,7 +1080,7 @@ BOOL ODbaseTable::CreateImpl() try { Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>()); - aContent.executeCommand( rtl::OUString::createFromAscii( "delete" ),bool2any( sal_True ) ); + aContent.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")),bool2any( sal_True ) ); } catch(Exception&) // an exception is thrown when no file exists { @@ -1108,7 +1108,7 @@ BOOL ODbaseTable::CreateImpl() try { Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>()); - aMemoContent.executeCommand( rtl::OUString::createFromAscii( "delete" ),bool2any( sal_True ) ); + aMemoContent.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")),bool2any( sal_True ) ); } catch(const Exception&) { @@ -1124,7 +1124,7 @@ BOOL ODbaseTable::CreateImpl() { aURL.setExtension(aExt); // kill dbf file Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>()); - aMemoContent.executeCommand( rtl::OUString::createFromAscii( "delete" ),bool2any( sal_True ) ); + aMemoContent.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")),bool2any( sal_True ) ); return sal_False; } m_aHeader.db_typ = dBaseIIIMemo; @@ -1475,7 +1475,7 @@ BOOL ODbaseTable::Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFie try { ::ucbhelper::Content aDeleteContent( aURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment > () ); - aDeleteContent.executeCommand( ::rtl::OUString::createFromAscii( "delete" ), makeAny( sal_Bool( sal_True ) ) ); + aDeleteContent.executeCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), makeAny( sal_Bool( sal_True ) ) ); } catch(Exception&) { @@ -2319,7 +2319,7 @@ namespace { ::rtl::OUString aIdent = _pConenction->getContent()->getIdentifier()->getContentIdentifier(); if ( aIdent.lastIndexOf('/') != (aIdent.getLength()-1) ) - aIdent += ::rtl::OUString::createFromAscii("/"); + aIdent += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aIdent += oldName; aName = aIdent; } @@ -2336,11 +2336,11 @@ namespace Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>()); Sequence< PropertyValue > aProps( 1 ); - aProps[0].Name = ::rtl::OUString::createFromAscii("Title"); + aProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aProps[0].Handle = -1; // n/a aProps[0].Value = makeAny( ::rtl::OUString(sNewName) ); Sequence< Any > aValues; - aContent.executeCommand( rtl::OUString::createFromAscii( "setPropertyValues" ),makeAny(aProps) ) >>= aValues; + aContent.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setPropertyValues")),makeAny(aProps) ) >>= aValues; if(aValues.getLength() && aValues[0].hasValue()) throw Exception(); } @@ -2501,7 +2501,7 @@ String ODbaseTable::createTempFile() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::createTempFile" ); ::rtl::OUString aIdent = m_pConnection->getContent()->getIdentifier()->getContentIdentifier(); if ( aIdent.lastIndexOf('/') != (aIdent.getLength()-1) ) - aIdent += ::rtl::OUString::createFromAscii("/"); + aIdent += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); String sTempName(aIdent); String sExt; sExt.AssignAscii("."); diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx index 507d91fb3e..7c4b452e87 100644 --- a/connectivity/source/drivers/dbase/DTables.cxx +++ b/connectivity/source/drivers/dbase/DTables.cxx @@ -59,7 +59,7 @@ sdbcx::ObjectType ODbaseTables::createObject(const ::rtl::OUString& _rName) { ::rtl::OUString aName,aSchema; ODbaseTable* pRet = new ODbaseTable(this,(ODbaseConnection*)static_cast<OFileCatalog&>(m_rParent).getConnection(), - _rName,::rtl::OUString::createFromAscii("TABLE")); + _rName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE"))); sdbcx::ObjectType xRet = pRet; pRet->construct(); diff --git a/connectivity/source/drivers/dbase/Dservices.cxx b/connectivity/source/drivers/dbase/Dservices.cxx index 69bd7ffec0..27adb90676 100644 --- a/connectivity/source/drivers/dbase/Dservices.cxx +++ b/connectivity/source/drivers/dbase/Dservices.cxx @@ -62,9 +62,9 @@ void REGISTER_PROVIDER( const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) { OUString aMainKeyName; - aMainKeyName = OUString::createFromAscii("/"); + aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aMainKeyName += aServiceImplName; - aMainKeyName += OUString::createFromAscii("/UNO/SERVICES"); + aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); OSL_ENSURE(xNewKey.is(), "FILE::component_writeInfo : could not create a registry key !"); diff --git a/connectivity/source/drivers/evoab/LCatalog.cxx b/connectivity/source/drivers/evoab/LCatalog.cxx index 55ff6ca510..638b359a89 100644 --- a/connectivity/source/drivers/evoab/LCatalog.cxx +++ b/connectivity/source/drivers/evoab/LCatalog.cxx @@ -54,7 +54,7 @@ void OEvoabCatalog::refreshTables() TStringVector aVector; Sequence< ::rtl::OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - ::rtl::OUString::createFromAscii("%"),::rtl::OUString::createFromAscii("%"),aTypes); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/evoab/LColumnAlias.cxx b/connectivity/source/drivers/evoab/LColumnAlias.cxx index 24dd9d6b30..113cc72f69 100644 --- a/connectivity/source/drivers/evoab/LColumnAlias.cxx +++ b/connectivity/source/drivers/evoab/LColumnAlias.cxx @@ -43,39 +43,39 @@ using namespace ::com::sun::star::container; static const ::rtl::OUString sProgrammaticNames[] = { - ::rtl::OUString::createFromAscii("FirstName"), - ::rtl::OUString::createFromAscii("LastName"), - ::rtl::OUString::createFromAscii("DisplayName"), - ::rtl::OUString::createFromAscii("NickName"), - ::rtl::OUString::createFromAscii("PrimaryEmail"), - ::rtl::OUString::createFromAscii("SecondEmail"), - ::rtl::OUString::createFromAscii("PreferMailFormat"), - ::rtl::OUString::createFromAscii("WorkPhone"), - ::rtl::OUString::createFromAscii("HomePhone"), - ::rtl::OUString::createFromAscii("FaxNumber"), - ::rtl::OUString::createFromAscii("PagerNumber"), - ::rtl::OUString::createFromAscii("CellularNumber"), - ::rtl::OUString::createFromAscii("HomeAddress"), - ::rtl::OUString::createFromAscii("HomeAddress2"), - ::rtl::OUString::createFromAscii("HomeCity"), - ::rtl::OUString::createFromAscii("HomeState"), - ::rtl::OUString::createFromAscii("HomeZipCode"), - ::rtl::OUString::createFromAscii("HomeCountry"), - ::rtl::OUString::createFromAscii("WorkAddress"), - ::rtl::OUString::createFromAscii("WorkAddress2"), - ::rtl::OUString::createFromAscii("WorkCity"), - ::rtl::OUString::createFromAscii("WorkState"), - ::rtl::OUString::createFromAscii("WorkZipCode"), - ::rtl::OUString::createFromAscii("WorkCountry"), - ::rtl::OUString::createFromAscii("JobTitle"), - ::rtl::OUString::createFromAscii("Department"), - ::rtl::OUString::createFromAscii("Company"), - ::rtl::OUString::createFromAscii("WebPage1"), - ::rtl::OUString::createFromAscii("WebPage2"), - ::rtl::OUString::createFromAscii("BirthYear"), - ::rtl::OUString::createFromAscii("BirthMonth"), - ::rtl::OUString::createFromAscii("BirthDay"), - ::rtl::OUString::createFromAscii("Notes") + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FirstName")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LastName")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NickName")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PrimaryEmail")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SecondEmail")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PreferMailFormat")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkPhone")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomePhone")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FaxNumber")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PagerNumber")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CellularNumber")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeAddress")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeAddress2")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeCity")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeState")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeZipCode")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeCountry")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkAddress")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkAddress2")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkCity")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkState")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkZipCode")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkCountry")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JobTitle")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Department")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Company")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WebPage1")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WebPage2")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BirthYear")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BirthMonth")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BirthDay")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Notes")) }; //------------------------------------------------------------------------------ OColumnAlias::OColumnAlias() @@ -121,8 +121,8 @@ void OColumnAlias::setAlias(const ::com::sun::star::uno::Reference< //============================================================= Reference< XNameAccess > xEvoAliasesNode; Reference< XNameAccess > xMozAliasesNode; - xEvoDriverNode->getPropertyValue( ::rtl::OUString::createFromAscii("ColumnAliases") ) >>= xEvoAliasesNode; - xMozDriverNode->getPropertyValue( ::rtl::OUString::createFromAscii("ColumnAliases") ) >>= xMozAliasesNode; + xEvoDriverNode->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnAliases")) ) >>= xEvoAliasesNode; + xMozDriverNode->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnAliases")) ) >>= xMozAliasesNode; OSL_ENSURE( xEvoAliasesNode.is(), "OColumnAlias::setAlias: missing the evolution aliases node!" ); OSL_ENSURE( xMozAliasesNode.is(), "OColumnAlias::setAlias: missing the mozilla aliases node!" ); diff --git a/connectivity/source/drivers/evoab/LConfigAccess.cxx b/connectivity/source/drivers/evoab/LConfigAccess.cxx index 3b5da2ebc0..f92ff66f40 100644 --- a/connectivity/source/drivers/evoab/LConfigAccess.cxx +++ b/connectivity/source/drivers/evoab/LConfigAccess.cxx @@ -52,7 +52,7 @@ namespace connectivity //============================================================= // create the config provider Reference< XMultiServiceFactory > xConfigProvider( - _rxORB->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationProvider" ) ), + _rxORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider")) ), UNO_QUERY ); OSL_ENSURE( xConfigProvider.is(), "createDriverConfigNode: could not create the config provider!" ); @@ -70,14 +70,14 @@ namespace connectivity Sequence< Any > aArguments(2); // the path to the node to open aArguments[0] <<= PropertyValue( - ::rtl::OUString::createFromAscii( "nodepath"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")), 0, makeAny( sCompleteNodePath ), PropertyState_DIRECT_VALUE ); // the depth: -1 means unlimited aArguments[1] <<= PropertyValue( - ::rtl::OUString::createFromAscii( "depth"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("depth")), 0, makeAny( (sal_Int32)-1 ), PropertyState_DIRECT_VALUE @@ -86,7 +86,7 @@ namespace connectivity //========================================================= // create the access Reference< XInterface > xAccess = xConfigProvider->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationAccess" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), aArguments ); OSL_ENSURE( xAccess.is(), "createDriverConfigNode: invalid access returned (should throw an exception instead)!" ); @@ -142,10 +142,10 @@ namespace connectivity Reference< XPropertySet > xDriverNode = createDriverConfigNode( _rxORB, OEvoabDriver::getImplementationName_Static() ); Reference< XPropertySet > xEvoPrefsNode; if ( xDriverNode.is() ) - xDriverNode->getPropertyValue( ::rtl::OUString::createFromAscii( "EvolutionPreferences" ) ) >>= xEvoPrefsNode; + xDriverNode->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EvolutionPreferences")) ) >>= xEvoPrefsNode; OSL_ENSURE( xEvoPrefsNode.is(), "getFullPathExportingCommand: could not access the node for the evolution preferences!" ); if ( xEvoPrefsNode.is() ) - xEvoPrefsNode->getPropertyValue( ::rtl::OUString::createFromAscii( "FullPathExportingCommand" ) ) >>= sFullPathExportingCommand; + xEvoPrefsNode->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FullPathExportingCommand")) ) >>= sFullPathExportingCommand; } catch( const Exception& ) { diff --git a/connectivity/source/drivers/evoab/LConnection.cxx b/connectivity/source/drivers/evoab/LConnection.cxx index ba047b4e7d..cee8b601aa 100644 --- a/connectivity/source/drivers/evoab/LConnection.cxx +++ b/connectivity/source/drivers/evoab/LConnection.cxx @@ -63,12 +63,12 @@ using namespace ::com::sun::star::lang; { ::rtl::OUString aExceptionType = aExceptionType_; if( aExceptionType.getLength() == 0 ) - aExceptionType = ::rtl::OUString( ::rtl::OUString::createFromAscii("Unknown" ) ); + aExceptionType = ::rtl::OUString( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown")) ); - ::rtl::OUString aTypeLine( ::rtl::OUString::createFromAscii("\nType: " ) ); + ::rtl::OUString aTypeLine( RTL_CONSTASCII_USTRINGPARAM("\nType: ") ); aTypeLine += aExceptionType; - ::rtl::OUString aMessageLine( ::rtl::OUString::createFromAscii("\nMessage: " ) ); + ::rtl::OUString aMessageLine( RTL_CONSTASCII_USTRINGPARAM("\nMessage: ") ); aMessageLine += ::rtl::OUString( e.Message ); ::rtl::OUString aMsg(aTypeLine); @@ -138,23 +138,23 @@ void OEvoabConnection::construct(const ::rtl::OUString& url,const Sequence< Prop { OSL_TRACE("Error at execute evolution-addressbook-export to get VCards"); ::dbtools::throwGenericSQLException( - ::rtl::OUString::createFromAscii("Error at execute evolution-addressbook-export to get VCards"),NULL); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Error at execute evolution-addressbook-export to get VCards")),NULL); } Sequence<PropertyValue> aDriverParam; ::std::vector<PropertyValue> aParam; - aParam.push_back(PropertyValue(::rtl::OUString::createFromAscii("EnableSQL92Check"), 0, Any(), PropertyState_DIRECT_VALUE)); + aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EnableSQL92Check")), 0, Any(), PropertyState_DIRECT_VALUE)); ::dbtools::OCharsetMap aLookupIanaName; ::dbtools::OCharsetMap::const_iterator aLookup = aLookupIanaName.find(RTL_TEXTENCODING_UTF8); - aParam.push_back(PropertyValue(::rtl::OUString::createFromAscii("CharSet"), 0, + aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet")), 0, makeAny((*aLookup).getIanaName()), PropertyState_DIRECT_VALUE)); - aParam.push_back(PropertyValue(::rtl::OUString::createFromAscii("Extension"), 0, makeAny(getDriver()->getFileExt()), PropertyState_DIRECT_VALUE)); - aParam.push_back(PropertyValue(::rtl::OUString::createFromAscii("HeaderLine"), 0, makeAny(m_bHeaderLine), PropertyState_DIRECT_VALUE)); - aParam.push_back(PropertyValue(::rtl::OUString::createFromAscii("FieldDelimiter"), 0, makeAny(::rtl::OUString(&m_cFieldDelimiter,1)), PropertyState_DIRECT_VALUE)); - aParam.push_back(PropertyValue(::rtl::OUString::createFromAscii("StringDelimiter"), 0, makeAny(::rtl::OUString(&m_cStringDelimiter,1)), PropertyState_DIRECT_VALUE)); - aParam.push_back(PropertyValue(::rtl::OUString::createFromAscii("DecimalDelimiter"), 0, makeAny(::rtl::OUString(&m_cDecimalDelimiter,1)), PropertyState_DIRECT_VALUE)); - aParam.push_back(PropertyValue(::rtl::OUString::createFromAscii("ThousandDelimiter"), 0, makeAny(::rtl::OUString(&m_cThousandDelimiter,1)), PropertyState_DIRECT_VALUE)); + aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Extension")), 0, makeAny(getDriver()->getFileExt()), PropertyState_DIRECT_VALUE)); + aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HeaderLine")), 0, makeAny(m_bHeaderLine), PropertyState_DIRECT_VALUE)); + aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FieldDelimiter")), 0, makeAny(::rtl::OUString(&m_cFieldDelimiter,1)), PropertyState_DIRECT_VALUE)); + aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StringDelimiter")), 0, makeAny(::rtl::OUString(&m_cStringDelimiter,1)), PropertyState_DIRECT_VALUE)); + aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DecimalDelimiter")), 0, makeAny(::rtl::OUString(&m_cDecimalDelimiter,1)), PropertyState_DIRECT_VALUE)); + aParam.push_back(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ThousandDelimiter")), 0, makeAny(::rtl::OUString(&m_cThousandDelimiter,1)), PropertyState_DIRECT_VALUE)); // build a new parameter sequence from the original parameters, appended by the new parameters from above PropertyValue *pParams = aParam.empty() ? 0 : &aParam[0]; diff --git a/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx b/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx index d1a15429a5..0bcc612ad7 100644 --- a/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx @@ -96,7 +96,7 @@ Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( ) ODatabaseMetaDataResultSet::ORow aRow; aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii("CHAR"))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CHAR")))); aRow.push_back(new ORowSetValueDecorator(DataType::CHAR)); aRow.push_back(new ORowSetValueDecorator((sal_Int32)254)); aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue()); @@ -117,60 +117,60 @@ Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( ) aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("VARCHAR")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR"))); aRow[2] = new ORowSetValueDecorator(DataType::VARCHAR); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("LONGVARCHAR")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LONGVARCHAR"))); aRow[2] = new ORowSetValueDecorator(DataType::LONGVARCHAR); aRow[3] = new ORowSetValueDecorator((sal_Int32)65535); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DATE")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE"))); aRow[2] = new ORowSetValueDecorator(DataType::DATE); aRow[3] = new ORowSetValueDecorator((sal_Int32)10); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIME")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME"))); aRow[2] = new ORowSetValueDecorator(DataType::TIME); aRow[3] = new ORowSetValueDecorator((sal_Int32)8); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP); aRow[3] = new ORowSetValueDecorator((sal_Int32)19); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("BOOL")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BOOL"))); aRow[2] = new ORowSetValueDecorator(DataType::BIT); aRow[3] = ODatabaseMetaDataResultSet::get1Value(); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DECIMAL")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL"))); aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL); aRow[3] = new ORowSetValueDecorator((sal_Int32)20); aRow[15] = new ORowSetValueDecorator((sal_Int32)15); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DOUBLE")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOUBLE"))); aRow[2] = new ORowSetValueDecorator(DataType::DOUBLE); aRow[3] = new ORowSetValueDecorator((sal_Int32)20); aRow[15] = ODatabaseMetaDataResultSet::get0Value(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("NUMERIC")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMERIC"))); aRow[2] = new ORowSetValueDecorator(DataType::NUMERIC); aRow[3] = new ORowSetValueDecorator((sal_Int32)20); aRow[15] = new ORowSetValueDecorator((sal_Int32)20); @@ -254,10 +254,10 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getColumns( switch(sal_Int32(aRow[11]->getValue())) { case ColumnValue::NO_NULLS: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("NO")); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO"))); break; case ColumnValue::NULLABLE: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("YES")); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YES"))); break; default: aRow[18] = new ORowSetValueDecorator(::rtl::OUString()); @@ -294,7 +294,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( // check if any type is given // when no types are given then we have to return all tables e.g. TABLE - static const ::rtl::OUString aTable(::rtl::OUString::createFromAscii("TABLE")); + static const ::rtl::OUString aTable(RTL_CONSTASCII_USTRINGPARAM("TABLE")); sal_Bool bTableFound = sal_True; sal_Int32 nLength = types.getLength(); @@ -354,7 +354,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( ::rtl::OUString aArg2 = ::rtl::OUString::createFromAscii(pOEvoabConnection->getDriver()->getEVOAB_CLI_ARG_OUTPUT_FILE_PREFIX()); aArg2 += aWorkingDir; aArg2 += aName; - aArg2 += ::rtl::OUString::createFromAscii("."); + aArg2 += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")); aArg2 += ::rtl::OUString(pOEvoabConnection->getExtension()); ::rtl::OUString aArg3 = ::rtl::OUString::createFromAscii(pOEvoabConnection->getDriver()->getEVOAB_CLI_ARG_OUTPUT_FORMAT()); diff --git a/connectivity/source/drivers/evoab/LDriver.cxx b/connectivity/source/drivers/evoab/LDriver.cxx index 689ba848ed..0425060c30 100644 --- a/connectivity/source/drivers/evoab/LDriver.cxx +++ b/connectivity/source/drivers/evoab/LDriver.cxx @@ -66,8 +66,8 @@ OEvoabDriver::OEvoabDriver(const Reference< XMultiServiceFactory >& _rxFactory) if ( m_aEvoab_CLI_FullPathCommand.getLength() == 0 ) m_aEvoab_CLI_FullPathCommand = ::rtl::OUString::createFromAscii(getEVOAB_CLI_FULLPATHCOMMAND()); - if ( m_aEvoab_CLI_FullPathCommand.copy(0,7) != ::rtl::OUString::createFromAscii("file://") && m_aEvoab_CLI_FullPathCommand.copy(0,1) == ::rtl::OUString::createFromAscii("/")) - m_aEvoab_CLI_FullPathCommand = ::rtl::OUString::createFromAscii("file://") + m_aEvoab_CLI_FullPathCommand; + if ( m_aEvoab_CLI_FullPathCommand.copy(0,7) != ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file://")) && m_aEvoab_CLI_FullPathCommand.copy(0,1) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"))) + m_aEvoab_CLI_FullPathCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file://")) + m_aEvoab_CLI_FullPathCommand; m_aEvoab_CLI_EffectiveCommand = m_aEvoab_CLI_FullPathCommand; m_aTempDir.EnableKillingFile(); @@ -310,7 +310,7 @@ sal_Bool OEvoabDriver::acceptsURL_Stat( const ::rtl::OUString& url ) // There isn't any subschema: - but could be just subschema if ( aAddrbookURI.getLength() > 0 ) aAddrbookScheme= aAddrbookURI; - else if(url == ::rtl::OUString::createFromAscii("sdbc:address:") ) + else if(url == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:")) ) return sal_True; // special case here else return sal_False; diff --git a/connectivity/source/drivers/evoab/LFolderList.cxx b/connectivity/source/drivers/evoab/LFolderList.cxx index e7833f25ed..00174061f6 100644 --- a/connectivity/source/drivers/evoab/LFolderList.cxx +++ b/connectivity/source/drivers/evoab/LFolderList.cxx @@ -215,12 +215,12 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal if(nPrecision) { eType = DataType::DECIMAL; - aTypeName = ::rtl::OUString::createFromAscii("DECIMAL"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL")); } else { eType = DataType::DOUBLE; - aTypeName = ::rtl::OUString::createFromAscii("DOUBLE"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOUBLE")); } } else @@ -234,21 +234,21 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal { case NUMBERFORMAT_DATE: eType = DataType::DATE; - aTypeName = ::rtl::OUString::createFromAscii("DATE"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE")); break; case NUMBERFORMAT_DATETIME: eType = DataType::TIMESTAMP; - aTypeName = ::rtl::OUString::createFromAscii("TIMESTAMP"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP")); break; case NUMBERFORMAT_TIME: eType = DataType::TIME; - aTypeName = ::rtl::OUString::createFromAscii("TIME"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME")); break; default: eType = DataType::VARCHAR; nPrecision = 0; // nyi: Daten koennen aber laenger sein! nScale = 0; - aTypeName = ::rtl::OUString::createFromAscii("VARCHAR"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")); }; nFlags |= ColumnSearch::CHAR; } @@ -301,8 +301,8 @@ void OEvoabFolderList::construct() Sequence< ::com::sun::star::uno::Any > aArg(1); aArg[0] <<= aAppLocale; - Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(m_pConnection->getDriver()->getFactory()->createInstanceWithArguments(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatsSupplier"),aArg),UNO_QUERY); - m_xNumberFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(m_pConnection->getDriver()->getFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")),UNO_QUERY); + Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(m_pConnection->getDriver()->getFactory()->createInstanceWithArguments(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatsSupplier")),aArg),UNO_QUERY); + m_xNumberFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(m_pConnection->getDriver()->getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))),UNO_QUERY); m_xNumberFormatter->attachNumberFormatsSupplier(xSupplier); INetURLObject aURL; @@ -366,7 +366,7 @@ sal_Bool OEvoabFolderList::fetchRow(OValueRow _rRow,const OSQLColumns & _rCols) nRes = m_xNumberFormatter->convertStringToNumber(::com::sun::star::util::NumberFormat::ALL,aStr); Reference<XPropertySet> xProp(m_xNumberFormatter->getNumberFormatsSupplier()->getNumberFormatSettings(),UNO_QUERY); com::sun::star::util::Date aDate; - xProp->getPropertyValue(::rtl::OUString::createFromAscii("NullDate")) >>= aDate; + xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NullDate"))) >>= aDate; switch(nType) { diff --git a/connectivity/source/drivers/evoab/LResultSet.cxx b/connectivity/source/drivers/evoab/LResultSet.cxx index 7bcc71d407..a910132a13 100644 --- a/connectivity/source/drivers/evoab/LResultSet.cxx +++ b/connectivity/source/drivers/evoab/LResultSet.cxx @@ -57,14 +57,14 @@ OEvoabResultSet::OEvoabResultSet( OStatement_Base* pStmt,connectivity::OSQLParse // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OEvoabResultSet::getImplementationName( ) throw ( RuntimeException) { - return ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.evoab.ResultSet"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.evoab.ResultSet")); } // ------------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL OEvoabResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< ::rtl::OUString > aSupported(2); - aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.ResultSet"); - aSupported[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.ResultSet"); + aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet")); + aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.ResultSet")); return aSupported; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/evoab/LServices.cxx b/connectivity/source/drivers/evoab/LServices.cxx index 6619d90ebb..c8207d5863 100644 --- a/connectivity/source/drivers/evoab/LServices.cxx +++ b/connectivity/source/drivers/evoab/LServices.cxx @@ -62,9 +62,9 @@ void REGISTER_PROVIDER( const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) { OUString aMainKeyName; - aMainKeyName = OUString::createFromAscii("/"); + aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aMainKeyName += aServiceImplName; - aMainKeyName += OUString::createFromAscii("/UNO/SERVICES"); + aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); OSL_ENSURE(xNewKey.is(), "FILE::component_writeInfo : could not create a registry key !"); diff --git a/connectivity/source/drivers/evoab/LTable.cxx b/connectivity/source/drivers/evoab/LTable.cxx index 505337dacf..7110533ebc 100644 --- a/connectivity/source/drivers/evoab/LTable.cxx +++ b/connectivity/source/drivers/evoab/LTable.cxx @@ -236,12 +236,12 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) if(nPrecision) { eType = DataType::DECIMAL; - aTypeName = ::rtl::OUString::createFromAscii("DECIMAL"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL")); } else { eType = DataType::DOUBLE; - aTypeName = ::rtl::OUString::createFromAscii("DOUBLE"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOUBLE")); } } else @@ -255,21 +255,21 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) { case NUMBERFORMAT_DATE: eType = DataType::DATE; - aTypeName = ::rtl::OUString::createFromAscii("DATE"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE")); break; case NUMBERFORMAT_DATETIME: eType = DataType::TIMESTAMP; - aTypeName = ::rtl::OUString::createFromAscii("TIMESTAMP"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP")); break; case NUMBERFORMAT_TIME: eType = DataType::TIME; - aTypeName = ::rtl::OUString::createFromAscii("TIME"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME")); break; default: eType = DataType::VARCHAR; nPrecision = 0; // nyi: Daten koennen aber laenger sein! nScale = 0; - aTypeName = ::rtl::OUString::createFromAscii("VARCHAR"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")); }; nFlags |= ColumnSearch::CHAR; } @@ -338,8 +338,8 @@ void OEvoabTable::construct() Sequence< ::com::sun::star::uno::Any > aArg(1); aArg[0] <<= aAppLocale; - Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(m_pConnection->getDriver()->getFactory()->createInstanceWithArguments(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatsSupplier"),aArg),UNO_QUERY); - m_xNumberFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(m_pConnection->getDriver()->getFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")),UNO_QUERY); + Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(m_pConnection->getDriver()->getFactory()->createInstanceWithArguments(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatsSupplier")),aArg),UNO_QUERY); + m_xNumberFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(m_pConnection->getDriver()->getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))),UNO_QUERY); m_xNumberFormatter->attachNumberFormatsSupplier(xSupplier); INetURLObject aURL; @@ -552,7 +552,7 @@ sal_Bool OEvoabTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sa nRes = m_xNumberFormatter->convertStringToNumber(::com::sun::star::util::NumberFormat::ALL,aStr); Reference<XPropertySet> xProp(m_xNumberFormatter->getNumberFormatsSupplier()->getNumberFormatSettings(),UNO_QUERY); com::sun::star::util::Date aDate; - xProp->getPropertyValue(::rtl::OUString::createFromAscii("NullDate")) >>= aDate; + xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NullDate"))) >>= aDate; switch(nType) { @@ -672,7 +672,7 @@ sal_Bool OEvoabTable::setColumnAliases() sal_Bool bCase = getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers(); ::rtl::OUString aTypeName; - aTypeName = ::rtl::OUString::createFromAscii("VARCHAR"); + aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")); sdbcx::OColumn* pColumn = new sdbcx::OColumn(sColumnFinalName,aTypeName,::rtl::OUString(), ColumnValue::NULLABLE, m_aPrecisions[i], diff --git a/connectivity/source/drivers/evoab/LTables.cxx b/connectivity/source/drivers/evoab/LTables.cxx index c104f9c315..41fbf8f7a0 100644 --- a/connectivity/source/drivers/evoab/LTables.cxx +++ b/connectivity/source/drivers/evoab/LTables.cxx @@ -54,7 +54,7 @@ namespace starutil = ::com::sun::star::util; sdbcx::ObjectType OEvoabTables::createObject(const ::rtl::OUString& _rName) { OEvoabTable* pRet = new OEvoabTable(this,(OEvoabConnection*)static_cast<OFileCatalog&>(m_rParent).getConnection(), - _rName,::rtl::OUString::createFromAscii("TABLE")); + _rName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE"))); sdbcx::ObjectType xRet = pRet; pRet->construct(); return xRet; diff --git a/connectivity/source/drivers/evoab2/NCatalog.cxx b/connectivity/source/drivers/evoab2/NCatalog.cxx index 4698a6aab0..d1cc91b842 100644 --- a/connectivity/source/drivers/evoab2/NCatalog.cxx +++ b/connectivity/source/drivers/evoab2/NCatalog.cxx @@ -55,9 +55,9 @@ void OEvoabCatalog::refreshTables() { TStringVector aVector; Sequence< ::rtl::OUString > aTypes(1); - aTypes[0] = ::rtl::OUString::createFromAscii("TABLE"); + aTypes[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE")); Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - ::rtl::OUString::createFromAscii("%"),::rtl::OUString::createFromAscii("%"),aTypes); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx index caf6d11d36..df369d9c05 100644 --- a/connectivity/source/drivers/evoab2/NConnection.cxx +++ b/connectivity/source/drivers/evoab2/NConnection.cxx @@ -57,7 +57,7 @@ using namespace ::com::sun::star::lang; { ::rtl::OUString aExceptionType = aExceptionType_; if( aExceptionType.getLength() == 0 ) - aExceptionType = ::rtl::OUString::createFromAscii("Unknown" ) ; + aExceptionType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown")) ; ::rtl::OUString aTypeLine( RTL_CONSTASCII_USTRINGPARAM("\nType: " ) ); aTypeLine += aExceptionType; diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx index c6dc8bbf7a..944889617d 100644 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx @@ -213,9 +213,9 @@ namespace connectivity switch( getFieldType( nCol ) ) { case DataType::BIT: - return ::rtl::OUString::createFromAscii( "BIT" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BIT")); case DataType::VARCHAR: - return ::rtl::OUString::createFromAscii( "VARCHAR" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")); default: break; } @@ -283,9 +283,9 @@ ODatabaseMetaDataResultSet::ORows& OEvoabDatabaseMetaData::getColumnRows( const // **************************************************** // Catalog - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(""))); // Schema - aRow[2] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("")); + aRow[2] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(""))); // COLUMN_SIZE aRow[7] = new ORowSetValueDecorator(s_nCOLUMN_SIZE); // BUFFER_LENGTH, not used @@ -307,10 +307,10 @@ ODatabaseMetaDataResultSet::ORows& OEvoabDatabaseMetaData::getColumnRows( const // CHAR_OCTET_LENGTH, refer to [5] aRow[16] = new ORowSetValueDecorator(s_nCHAR_OCTET_LENGTH); // IS_NULLABLE - aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii( "YES" )); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YES"))); - aRow[3] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii( "TABLE" )); + aRow[3] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE"))); ::osl::MutexGuard aGuard( m_aMutex ); initFields(); @@ -1017,7 +1017,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTableTypes( ) throw // there exists no possibility to get table types so we have to check static ::rtl::OUString sTableTypes[] = { - ::rtl::OUString::createFromAscii("TABLE"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE")), // Currently we only support a 'TABLE' nothing more complex }; ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes); @@ -1056,7 +1056,7 @@ Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( ) ODatabaseMetaDataResultSet::ORow aRow; aRow.reserve(19); aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii("VARCHAR"))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")))); aRow.push_back(new ORowSetValueDecorator(DataType::VARCHAR)); aRow.push_back(new ORowSetValueDecorator((sal_Int32)s_nCHAR_OCTET_LENGTH)); aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue()); @@ -1078,7 +1078,7 @@ Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( ) aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("VARCHAR")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR"))); aRow[2] = new ORowSetValueDecorator(DataType::VARCHAR); aRow[3] = new ORowSetValueDecorator((sal_Int32)65535); aRows.push_back(aRow); @@ -1111,7 +1111,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( // check if any type is given // when no types are given then we have to return all tables e.g. TABLE - const ::rtl::OUString aTable(::rtl::OUString::createFromAscii("TABLE")); + const ::rtl::OUString aTable(RTL_CONSTASCII_USTRINGPARAM("TABLE")); sal_Bool bTableFound = sal_True; sal_Int32 nLength = types.getLength(); diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx index 4b5cd5550d..73a2bd3b2c 100644 --- a/connectivity/source/drivers/evoab2/NDriver.cxx +++ b/connectivity/source/drivers/evoab2/NDriver.cxx @@ -102,7 +102,7 @@ Sequence< ::rtl::OUString > OEvoabDriver::getSupportedServiceNames_Static( ) th // which service is supported // for more information @see com.sun.star.sdbc.Driver Sequence< ::rtl::OUString > aSNS( 1 ); - aSNS[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.Driver"); + aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); return aSNS; } //------------------------------------------------------------------ diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx index 4bea08aab6..38e97a0fa5 100644 --- a/connectivity/source/drivers/evoab2/NResultSet.cxx +++ b/connectivity/source/drivers/evoab2/NResultSet.cxx @@ -77,13 +77,13 @@ namespace ErrorCondition = ::com::sun::star::sdb::ErrorCondition; //------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL OEvoabResultSet::getImplementationName( ) throw ( RuntimeException) \ { - return ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.evoab.ResultSet"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.evoab.ResultSet")); } // ------------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL OEvoabResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.ResultSet"); + aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet")); return aSupported; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx index ed727feb07..335b44418c 100644 --- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx @@ -54,7 +54,7 @@ OEvoabResultSetMetaData::~OEvoabResultSetMetaData() void OEvoabResultSetMetaData::setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException) { OSQLColumns::Vector::const_iterator aIter; - static const ::rtl::OUString aName(::rtl::OUString::createFromAscii("Name")); + static const ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("Name")); for (aIter = xColumns->get().begin(); aIter != xColumns->get().end(); ++aIter) { @@ -134,7 +134,7 @@ sal_Bool SAL_CALL OEvoabResultSetMetaData::isCaseSensitive( sal_Int32 /*nColumnN // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OEvoabResultSetMetaData::getTableName( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { - return m_aTableName;//::rtl::OUString::createFromAscii("TABLE"); + return m_aTableName;//::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE")); } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OEvoabResultSetMetaData::getCatalogName( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/evoab2/NServices.cxx b/connectivity/source/drivers/evoab2/NServices.cxx index e01013fdde..4af1c03919 100644 --- a/connectivity/source/drivers/evoab2/NServices.cxx +++ b/connectivity/source/drivers/evoab2/NServices.cxx @@ -62,9 +62,9 @@ void REGISTER_PROVIDER( const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) { OUString aMainKeyName; - aMainKeyName = OUString::createFromAscii("/"); + aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aMainKeyName += aServiceImplName; - aMainKeyName += OUString::createFromAscii("/UNO/SERVICES"); + aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); OSL_ENSURE(xNewKey.is(), "EVOAB::component_writeInfo : could not create a registry key !"); diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx index 43bbaf2fcf..64b65a590d 100644 --- a/connectivity/source/drivers/evoab2/NStatement.cxx +++ b/connectivity/source/drivers/evoab2/NStatement.cxx @@ -413,7 +413,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree ) { // String containing only a '%' and nothing else matches everything pResult = createTest( aColumnName, E_BOOK_QUERY_CONTAINS, - rtl::OUString::createFromAscii( "" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) ); } else if( aMatchString.indexOf( WILDCARD ) == -1 ) { // Simple string , eg. "to match" "contains in evo" diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx index b5b6cefb72..a883d823a8 100644 --- a/connectivity/source/drivers/evoab2/NTables.cxx +++ b/connectivity/source/drivers/evoab2/NTables.cxx @@ -63,7 +63,7 @@ ObjectType OEvoabTables::createObject(const ::rtl::OUString& aName) ::rtl::OUString aSchema( RTL_CONSTASCII_USTRINGPARAM( "%" )); Sequence< ::rtl::OUString > aTypes(1); - aTypes[0] = ::rtl::OUString::createFromAscii("TABLE"); + aTypes[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE")); ::rtl::OUString sEmpty; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),aSchema,aName,aTypes); diff --git a/connectivity/source/drivers/file/FCatalog.cxx b/connectivity/source/drivers/file/FCatalog.cxx index 5144486ac5..ad4430cb88 100644 --- a/connectivity/source/drivers/file/FCatalog.cxx +++ b/connectivity/source/drivers/file/FCatalog.cxx @@ -72,7 +72,7 @@ void OFileCatalog::refreshTables() TStringVector aVector; Sequence< ::rtl::OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - ::rtl::OUString::createFromAscii("%"),::rtl::OUString::createFromAscii("%"),aTypes); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),aTypes); fillNames(xResult,aVector); if(m_pTables) diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index 4d2df42be6..6d7ee212fb 100644 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx @@ -178,7 +178,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV // set fields to fetch Sequence< OUString > aProps(1); OUString* pProps = aProps.getArray(); - pProps[ 0 ] = OUString::createFromAscii( "Title" ); + pProps[ 0 ] = OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); try { @@ -405,7 +405,7 @@ Reference< XDynamicResultSet > OConnection::getDir() const Reference<XDynamicResultSet> xContent; Sequence< ::rtl::OUString > aProps(1); ::rtl::OUString* pProps = aProps.getArray(); - pProps[ 0 ] = ::rtl::OUString::createFromAscii( "Title" ); + pProps[ 0 ] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); try { Reference<XContentIdentifier> xIdent = getContent()->getIdentifier(); diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index 21ab639030..84080f18e3 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -197,7 +197,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( // check if any type is given // when no types are given then we have to return all tables e.g. TABLE - static const ::rtl::OUString aTable(::rtl::OUString::createFromAscii("TABLE")); + static const ::rtl::OUString aTable(RTL_CONSTASCII_USTRINGPARAM("TABLE")); sal_Bool bTableFound = sal_True; sal_Int32 nLength = types.getLength(); @@ -221,7 +221,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( Reference<XDynamicResultSet> xContent = m_pConnection->getDir(); Reference < XSortedDynamicResultSetFactory > xSRSFac( - m_pConnection->getDriver()->getFactory()->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.ucb.SortedDynamicResultSetFactory") ), UNO_QUERY ); + m_pConnection->getDriver()->getFactory()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SortedDynamicResultSetFactory")) ), UNO_QUERY ); Sequence< NumberedSortingInfo > aSortInfo( 1 ); NumberedSortingInfo* pInfo = aSortInfo.getArray(); @@ -432,7 +432,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( aRow[2] = new ORowSetValueDecorator(*pBegin); aRow[6] = ODatabaseMetaDataResultSet::getSelectValue(); - aRow[7] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("NO")); + aRow[7] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO"))); aRows.push_back(aRow); Reference< XPropertySet> xTable; @@ -711,7 +711,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLE { ODatabaseMetaDataResultSet::ORow aRow; aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TABLE"))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE")))); aRows.push_back(aRow); } pResult->setRows(aRows); diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx index f04bd3f489..363c29cef5 100644 --- a/connectivity/source/drivers/file/FDriver.cxx +++ b/connectivity/source/drivers/file/FDriver.cxx @@ -75,14 +75,14 @@ void OFileDriver::disposing() //------------------------------------------------------------------------------ rtl::OUString OFileDriver::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString::createFromAscii("com.sun.star.sdbc.driver.file.Driver"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.driver.file.Driver")); } //------------------------------------------------------------------------------ Sequence< ::rtl::OUString > OFileDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< ::rtl::OUString > aSNS( 2 ); - aSNS[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.Driver"); - aSNS[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.Driver"); + aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); + aSNS[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.Driver")); return aSNS; } @@ -129,7 +129,7 @@ sal_Bool SAL_CALL OFileDriver::acceptsURL( const ::rtl::OUString& url ) throw(SQLException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileDriver::acceptsURL" ); - return (!url.compareTo(::rtl::OUString::createFromAscii("sdbc:file:"),10)); + return (!url.compareTo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:file:")),10)); } // -------------------------------------------------------------------------------- Sequence< DriverPropertyInfo > SAL_CALL OFileDriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index edcf565aa9..bf4bb889d8 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -103,7 +103,7 @@ void OFileTable::refreshColumns() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::refreshColumns" ); TStringVector aVector; Reference< XResultSet > xResult = m_pConnection->getMetaData()->getColumns(Any(), - m_SchemaName,m_Name,::rtl::OUString::createFromAscii("%")); + m_SchemaName,m_Name,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%"))); if(xResult.is()) { diff --git a/connectivity/source/drivers/flat/ECatalog.cxx b/connectivity/source/drivers/flat/ECatalog.cxx index f1327e152b..f82eb7de00 100644 --- a/connectivity/source/drivers/flat/ECatalog.cxx +++ b/connectivity/source/drivers/flat/ECatalog.cxx @@ -55,7 +55,7 @@ void OFlatCatalog::refreshTables() TStringVector aVector; Sequence< ::rtl::OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - ::rtl::OUString::createFromAscii("%"),::rtl::OUString::createFromAscii("%"),aTypes); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx index 62568e68ef..733d5049ed 100644 --- a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx +++ b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx @@ -82,7 +82,7 @@ Reference< XResultSet > OFlatDatabaseMetaData::impl_getTypeInfo_throw( ) ODatabaseMetaDataResultSet::ORow aRow; aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii("CHAR"))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CHAR")))); aRow.push_back(new ORowSetValueDecorator(DataType::CHAR)); aRow.push_back(new ORowSetValueDecorator((sal_Int32)254)); aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue()); @@ -103,60 +103,60 @@ Reference< XResultSet > OFlatDatabaseMetaData::impl_getTypeInfo_throw( ) aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("VARCHAR")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR"))); aRow[2] = new ORowSetValueDecorator(DataType::VARCHAR); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("LONGVARCHAR")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LONGVARCHAR"))); aRow[2] = new ORowSetValueDecorator(DataType::LONGVARCHAR); aRow[3] = new ORowSetValueDecorator((sal_Int32)65535); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DATE")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE"))); aRow[2] = new ORowSetValueDecorator(DataType::DATE); aRow[3] = new ORowSetValueDecorator((sal_Int32)10); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIME")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME"))); aRow[2] = new ORowSetValueDecorator(DataType::TIME); aRow[3] = new ORowSetValueDecorator((sal_Int32)8); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP); aRow[3] = new ORowSetValueDecorator((sal_Int32)19); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("BOOL")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BOOL"))); aRow[2] = new ORowSetValueDecorator(DataType::BIT); aRow[3] = ODatabaseMetaDataResultSet::get1Value(); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DECIMAL")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL"))); aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL); aRow[3] = new ORowSetValueDecorator((sal_Int32)20); aRow[15] = new ORowSetValueDecorator((sal_Int32)15); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DOUBLE")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOUBLE"))); aRow[2] = new ORowSetValueDecorator(DataType::DOUBLE); aRow[3] = new ORowSetValueDecorator((sal_Int32)20); aRow[15] = ODatabaseMetaDataResultSet::get0Value(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("NUMERIC")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMERIC"))); aRow[2] = new ORowSetValueDecorator(DataType::NUMERIC); aRow[3] = new ORowSetValueDecorator((sal_Int32)20); aRow[15] = new ORowSetValueDecorator((sal_Int32)20); @@ -236,10 +236,10 @@ Reference< XResultSet > SAL_CALL OFlatDatabaseMetaData::getColumns( switch(sal_Int32(aRow[11]->getValue())) { case ColumnValue::NO_NULLS: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("NO")); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO"))); break; case ColumnValue::NULLABLE: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("YES")); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YES"))); break; default: aRow[18] = new ORowSetValueDecorator(::rtl::OUString()); diff --git a/connectivity/source/drivers/flat/EDriver.cxx b/connectivity/source/drivers/flat/EDriver.cxx index 13d79d8756..48560bfb46 100644 --- a/connectivity/source/drivers/flat/EDriver.cxx +++ b/connectivity/source/drivers/flat/EDriver.cxx @@ -50,7 +50,7 @@ using namespace ::com::sun::star::lang; //------------------------------------------------------------------------------ rtl::OUString ODriver::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString::createFromAscii("com.sun.star.comp.sdbc.flat.ODriver"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.flat.ODriver")); } //------------------------------------------------------------------ @@ -85,7 +85,7 @@ Reference< XConnection > SAL_CALL ODriver::connect( const ::rtl::OUString& url, sal_Bool SAL_CALL ODriver::acceptsURL( const ::rtl::OUString& url ) throw(SQLException, RuntimeException) { - return url.compareTo(::rtl::OUString::createFromAscii("sdbc:flat:"),10) == 0; + return url.compareTo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:flat:")),10) == 0; } // ----------------------------------------------------------------------------- Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/flat/EResultSet.cxx b/connectivity/source/drivers/flat/EResultSet.cxx index 0d15b881db..7a273768ff 100644 --- a/connectivity/source/drivers/flat/EResultSet.cxx +++ b/connectivity/source/drivers/flat/EResultSet.cxx @@ -57,14 +57,14 @@ OFlatResultSet::OFlatResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTr // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OFlatResultSet::getImplementationName( ) throw ( RuntimeException) { - return ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.flat.ResultSet"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.flat.ResultSet")); } // ------------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL OFlatResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< ::rtl::OUString > aSupported(2); - aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.ResultSet"); - aSupported[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.ResultSet"); + aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet")); + aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.ResultSet")); return aSupported; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index a014123c80..20b81206d2 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -356,11 +356,11 @@ void OFlatTable::construct() Sequence< ::com::sun::star::uno::Any > aArg(1); aArg[0] <<= aAppLocale; - Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(m_pConnection->getDriver()->getFactory()->createInstanceWithArguments(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatsSupplier"),aArg),UNO_QUERY); - m_xNumberFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(m_pConnection->getDriver()->getFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")),UNO_QUERY); + Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(m_pConnection->getDriver()->getFactory()->createInstanceWithArguments(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatsSupplier")),aArg),UNO_QUERY); + m_xNumberFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(m_pConnection->getDriver()->getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))),UNO_QUERY); m_xNumberFormatter->attachNumberFormatsSupplier(xSupplier); Reference<XPropertySet> xProp(xSupplier->getNumberFormatSettings(),UNO_QUERY); - xProp->getPropertyValue(::rtl::OUString::createFromAscii("NullDate")) >>= m_aNullDate; + xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NullDate"))) >>= m_aNullDate; INetURLObject aURL; aURL.SetURL(getEntry()); diff --git a/connectivity/source/drivers/flat/ETables.cxx b/connectivity/source/drivers/flat/ETables.cxx index e3b1be37cf..e709141b52 100644 --- a/connectivity/source/drivers/flat/ETables.cxx +++ b/connectivity/source/drivers/flat/ETables.cxx @@ -54,7 +54,7 @@ namespace starutil = ::com::sun::star::util; sdbcx::ObjectType OFlatTables::createObject(const ::rtl::OUString& _rName) { OFlatTable* pRet = new OFlatTable(this,(OFlatConnection*)static_cast<OFileCatalog&>(m_rParent).getConnection(), - _rName,::rtl::OUString::createFromAscii("TABLE")); + _rName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE"))); sdbcx::ObjectType xRet = pRet; pRet->construct(); return xRet; diff --git a/connectivity/source/drivers/flat/Eservices.cxx b/connectivity/source/drivers/flat/Eservices.cxx index bb142b83fe..ab34c9d76b 100644 --- a/connectivity/source/drivers/flat/Eservices.cxx +++ b/connectivity/source/drivers/flat/Eservices.cxx @@ -62,9 +62,9 @@ void REGISTER_PROVIDER( const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) { OUString aMainKeyName; - aMainKeyName = OUString::createFromAscii("/"); + aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aMainKeyName += aServiceImplName; - aMainKeyName += OUString::createFromAscii("/UNO/SERVICES"); + aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); OSL_ENSURE(xNewKey.is(), "FILE::component_writeInfo : could not create a registry key !"); diff --git a/connectivity/source/drivers/hsqldb/HColumns.cxx b/connectivity/source/drivers/hsqldb/HColumns.cxx index c8d83e0d2b..8c7b58c33d 100644 --- a/connectivity/source/drivers/hsqldb/HColumns.cxx +++ b/connectivity/source/drivers/hsqldb/HColumns.cxx @@ -83,7 +83,7 @@ void OHSQLColumn::construct() Sequence< ::rtl::OUString > SAL_CALL OHSQLColumn::getSupportedServiceNames( ) throw(RuntimeException) { Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.Column"); + aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.Column")); return aSupported; } diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index c551312d0c..ce4aae6fe2 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -478,14 +478,14 @@ namespace connectivity //------------------------------------------------------------------------------ rtl::OUString ODriverDelegator::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString::createFromAscii("com.sun.star.sdbcx.comp.hsqldb.Driver"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.comp.hsqldb.Driver")); } //------------------------------------------------------------------------------ Sequence< ::rtl::OUString > ODriverDelegator::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< ::rtl::OUString > aSNS( 2 ); aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); - aSNS[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.Driver"); + aSNS[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.Driver")); return aSNS; } //------------------------------------------------------------------ @@ -799,7 +799,7 @@ namespace connectivity { //......................................................... Reference< XMultiServiceFactory > xConfigProvider( - _rxORB->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationProvider" ) ), + _rxORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider")) ), UNO_QUERY ); OSL_ENSURE( xConfigProvider.is(), "lcl_getSystemLocale: could not create the config provider!" ); @@ -812,12 +812,12 @@ namespace connectivity Sequence< Any > aArguments(2); // the path to the node to open ::rtl::OUString sNodePath = ::rtl::OUString::createFromAscii ("/org.openoffice.Setup/L10N" ); - aArguments[0] <<= PropertyValue( ::rtl::OUString::createFromAscii( "nodepath"), 0, + aArguments[0] <<= PropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")), 0, makeAny( sNodePath ), PropertyState_DIRECT_VALUE ); // the depth: -1 means unlimited aArguments[1] <<= PropertyValue( - ::rtl::OUString::createFromAscii( "depth"), 0, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("depth")), 0, makeAny( (sal_Int32)-1 ), PropertyState_DIRECT_VALUE ); @@ -825,7 +825,7 @@ namespace connectivity // create the access Reference< XPropertySet > xNode( xConfigProvider->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationAccess" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), aArguments ), UNO_QUERY ); OSL_ENSURE( xNode.is(), "lcl_getSystemLocale: invalid access returned (should throw an exception instead)!" ); diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index a8f2745ddb..732737eaf8 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -340,7 +340,7 @@ void OHSQLTable::executeStatement(const ::rtl::OUString& _rStatement ) { ::rtl::OUString sSQL = _rStatement; if(sSQL.lastIndexOf(',') == (sSQL.getLength()-1)) - sSQL = sSQL.replaceAt(sSQL.getLength()-1,1,::rtl::OUString::createFromAscii(")")); + sSQL = sSQL.replaceAt(sSQL.getLength()-1,1,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")"))); Reference< XStatement > xStmt = getConnection()->createStatement( ); if ( xStmt.is() ) diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index f1339751be..0e0725af27 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -144,10 +144,10 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::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))) == ::rtl::OUString::createFromAscii("VIEW")))) // here we have a view - aSql += ::rtl::OUString::createFromAscii("VIEW "); + if((bIsView = (xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW"))))) // here we have a view + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW ")); else - aSql += ::rtl::OUString::createFromAscii("TABLE "); + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE ")); ::rtl::OUString sComposedName( ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInDataManipulation ) ); diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx index 449782d8f3..c689b6f03b 100644 --- a/connectivity/source/drivers/hsqldb/HUser.cxx +++ b/connectivity/source/drivers/hsqldb/HUser.cxx @@ -239,12 +239,12 @@ void SAL_CALL OHSQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_In if(sPrivs.getLength()) { ::rtl::OUString sGrant; - sGrant += ::rtl::OUString::createFromAscii("GRANT "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GRANT ")); sGrant += sPrivs; - sGrant += ::rtl::OUString::createFromAscii(" ON "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON ")); Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); - sGrant += ::rtl::OUString::createFromAscii(" TO "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" TO ")); sGrant += m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -269,12 +269,12 @@ void SAL_CALL OHSQLUser::revokePrivileges( const ::rtl::OUString& objName, sal_I if(sPrivs.getLength()) { ::rtl::OUString sGrant; - sGrant += ::rtl::OUString::createFromAscii("REVOKE "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVOKE ")); sGrant += sPrivs; - sGrant += ::rtl::OUString::createFromAscii(" ON "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON ")); Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); - sGrant += ::rtl::OUString::createFromAscii(" FROM "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FROM ")); sGrant += m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -290,11 +290,11 @@ void SAL_CALL OHSQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/, ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed); ::rtl::OUString sAlterPwd; - sAlterPwd = ::rtl::OUString::createFromAscii("SET PASSWORD FOR "); + sAlterPwd = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SET PASSWORD FOR ")); sAlterPwd += m_Name; sAlterPwd += ::rtl::OUString::createFromAscii("@\"%\" = PASSWORD('") ; sAlterPwd += newPassword; - sAlterPwd += ::rtl::OUString::createFromAscii("')") ; + sAlterPwd += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("')")) ; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -309,41 +309,41 @@ void SAL_CALL OHSQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/, { ::rtl::OUString sPrivs; if((nRights & Privilege::INSERT) == Privilege::INSERT) - sPrivs += ::rtl::OUString::createFromAscii("INSERT"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INSERT")); if((nRights & Privilege::DELETE) == Privilege::DELETE) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("DELETE"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DELETE")); } if((nRights & Privilege::UPDATE) == Privilege::UPDATE) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("UPDATE"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UPDATE")); } if((nRights & Privilege::ALTER) == Privilege::ALTER) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("ALTER"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ALTER")); } if((nRights & Privilege::SELECT) == Privilege::SELECT) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("SELECT"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT")); } if((nRights & Privilege::REFERENCE) == Privilege::REFERENCE) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("REFERENCES"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REFERENCES")); } return sPrivs; diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx b/connectivity/source/drivers/hsqldb/HUsers.cxx index 66a4379c81..6a88fc02d4 100644 --- a/connectivity/source/drivers/hsqldb/HUsers.cxx +++ b/connectivity/source/drivers/hsqldb/HUsers.cxx @@ -90,9 +90,9 @@ sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPassword; if ( sPassword.getLength() ) { - aSql += ::rtl::OUString::createFromAscii(" IDENTIFIED BY '"); + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" IDENTIFIED BY '")); aSql += sPassword; - aSql += ::rtl::OUString::createFromAscii("'"); + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("'")); } Reference< XStatement > xStmt = m_xConnection->createStatement( ); diff --git a/connectivity/source/drivers/hsqldb/HViews.cxx b/connectivity/source/drivers/hsqldb/HViews.cxx index 0532304eaa..55b51f66fc 100644 --- a/connectivity/source/drivers/hsqldb/HViews.cxx +++ b/connectivity/source/drivers/hsqldb/HViews.cxx @@ -148,7 +148,7 @@ void HViews::createView( const Reference< XPropertySet >& descriptor ) aSql += ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true ); - aSql += ::rtl::OUString::createFromAscii(" AS "); + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" AS ")); descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_COMMAND)) >>= sCommand; aSql += sCommand; diff --git a/connectivity/source/drivers/hsqldb/Hservices.cxx b/connectivity/source/drivers/hsqldb/Hservices.cxx index 12fd647576..70017ebfb2 100644 --- a/connectivity/source/drivers/hsqldb/Hservices.cxx +++ b/connectivity/source/drivers/hsqldb/Hservices.cxx @@ -63,9 +63,9 @@ void REGISTER_PROVIDER( const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) { OUString aMainKeyName; - aMainKeyName = OUString::createFromAscii("/"); + aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aMainKeyName += aServiceImplName; - aMainKeyName += OUString::createFromAscii("/UNO/SERVICES"); + aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); OSL_ENSURE(xNewKey.is(), "ADABAS::component_writeInfo : could not create a registry key !"); diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx index e9d81cae84..ad9f8d947f 100644 --- a/connectivity/source/drivers/jdbc/JDriver.cxx +++ b/connectivity/source/drivers/jdbc/JDriver.cxx @@ -65,7 +65,7 @@ java_sql_Driver::~java_sql_Driver() //------------------------------------------------------------------------------ rtl::OUString java_sql_Driver::getImplementationName_Static( ) throw(RuntimeException) { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.sdbc.JDBCDriver"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.JDBCDriver")); // this name is referenced in the configuration and in the jdbc.xml // Please take care when changing it. } @@ -73,7 +73,7 @@ rtl::OUString java_sql_Driver::getImplementationName_Static( ) throw(RuntimeExc Sequence< ::rtl::OUString > java_sql_Driver::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< ::rtl::OUString > aSNS( 1 ); - aSNS[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.Driver"); + aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); return aSNS; } //------------------------------------------------------------------ diff --git a/connectivity/source/drivers/jdbc/jservices.cxx b/connectivity/source/drivers/jdbc/jservices.cxx index 5d0dc8e2ae..817c5d7e3b 100644 --- a/connectivity/source/drivers/jdbc/jservices.cxx +++ b/connectivity/source/drivers/jdbc/jservices.cxx @@ -61,9 +61,9 @@ void REGISTER_PROVIDER( const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) { OUString aMainKeyName; - aMainKeyName = OUString::createFromAscii("/"); + aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aMainKeyName += aServiceImplName; - aMainKeyName += OUString::createFromAscii("/UNO/SERVICES"); + aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); OSL_ENSURE(xNewKey.is(), "SBA::component_writeInfo : could not create a registry key !"); diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx index f4162c4090..25e96910ed 100644 --- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx +++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx @@ -792,7 +792,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTableTypes( ) throw(SQ Reference< XResultSet > xRef = pResult; static ODatabaseMetaDataResultSet::ORows aRows; - static const ::rtl::OUString aTable(::rtl::OUString::createFromAscii("TABLE")); + static const ::rtl::OUString aTable(RTL_CONSTASCII_USTRINGPARAM("TABLE")); if (aRows.empty()) { @@ -816,7 +816,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTypeInfo( ) throw(SQLE ODatabaseMetaDataResultSet::ORow aRow(19); aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue(); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("CHAR")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CHAR"))); aRow[2] = new ORowSetValueDecorator(DataType::CHAR); aRow[3] = new ORowSetValueDecorator((sal_Int32) 254); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); @@ -887,7 +887,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumns( aRow[14] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[15] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[16] = new ORowSetValueDecorator((sal_Int32) 254); - aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("YES")); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YES"))); sal_Int32 nPosition = 1; QString aQtName; @@ -899,7 +899,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumns( { aRow[4] = new ORowSetValueDecorator(sName); aRow[5] = new ORowSetValueDecorator(DataType::TIMESTAMP); - aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP")); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); aRow[17] = new ORowSetValueDecorator(nPosition++); aRows.push_back(aRow); } @@ -917,7 +917,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumns( { aRow[4] = new ORowSetValueDecorator(sName); aRow[5] = new ORowSetValueDecorator(DataType::CHAR); - aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("CHAR")); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CHAR"))); aRow[7] = new ORowSetValueDecorator((sal_Int32) 256); // Might be VARCHAR and not CHAR[256]... aRow[17] = new ORowSetValueDecorator(nPosition); @@ -941,7 +941,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTables( // check whether we have tables in the requested types // for the moment, we answer only the "TABLE" table type // when no types are given at all, we return all the tables - static const ::rtl::OUString aTable(::rtl::OUString::createFromAscii("TABLE")); + static const ::rtl::OUString aTable(RTL_CONSTASCII_USTRINGPARAM("TABLE")); sal_Bool bTableFound = sal_False; const ::rtl::OUString* p = types.getConstArray(), * pEnd = p + types.getLength(); @@ -1014,7 +1014,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getVersionColumns( aRow[2] = new ORowSetValueDecorator(sName); aRow[3] = new ORowSetValueDecorator(DataType::TIMESTAMP); - aRow[4] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP")); + aRow[4] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); aRow[5] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[6] = ODatabaseMetaDataResultSet::getEmptyValue(); diff --git a/connectivity/source/drivers/kab/KDriver.cxx b/connectivity/source/drivers/kab/KDriver.cxx index 22368d60fc..f51b5269c0 100644 --- a/connectivity/source/drivers/kab/KDriver.cxx +++ b/connectivity/source/drivers/kab/KDriver.cxx @@ -360,7 +360,7 @@ Sequence< ::rtl::OUString > KabDriver::getSupportedServiceNames_Static( ) throw // which service is supported // for more information @see com.sun.star.sdbc.Driver Sequence< ::rtl::OUString > aSNS( 1 ); - aSNS[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.Driver"); + aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); return aSNS; } @@ -418,7 +418,7 @@ sal_Bool SAL_CALL KabDriver::acceptsURL( const ::rtl::OUString& url ) return sal_False; // here we have to look whether we support this URL format - return (!url.compareTo(::rtl::OUString::createFromAscii("sdbc:address:kab:"), 16)); + return (!url.compareTo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:kab:")), 16)); } // -------------------------------------------------------------------------------- Sequence< DriverPropertyInfo > SAL_CALL KabDriver::getPropertyInfo( const ::rtl::OUString&, const Sequence< PropertyValue >& ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/kab/KResultSetMetaData.cxx b/connectivity/source/drivers/kab/KResultSetMetaData.cxx index c9bc2853f1..567f3fbaf5 100644 --- a/connectivity/source/drivers/kab/KResultSetMetaData.cxx +++ b/connectivity/source/drivers/kab/KResultSetMetaData.cxx @@ -52,7 +52,7 @@ KabResultSetMetaData::~KabResultSetMetaData() void KabResultSetMetaData::setKabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException) { OSQLColumns::Vector::const_iterator aIter; - static const ::rtl::OUString aName(::rtl::OUString::createFromAscii("Name")); + static const ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("Name")); for (aIter = xColumns->get().begin(); aIter != xColumns->get().end(); ++aIter) { diff --git a/connectivity/source/drivers/kab/KServices.cxx b/connectivity/source/drivers/kab/KServices.cxx index 640f84d96d..1819f49785 100644 --- a/connectivity/source/drivers/kab/KServices.cxx +++ b/connectivity/source/drivers/kab/KServices.cxx @@ -63,9 +63,9 @@ void REGISTER_PROVIDER( const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) { OUString aMainKeyName; - aMainKeyName = OUString::createFromAscii("/"); + aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aMainKeyName += aServiceImplName; - aMainKeyName += OUString::createFromAscii("/UNO/SERVICES"); + aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); OSL_ENSURE(xNewKey.is(), "KAB::component_writeInfo : could not create a registry key !"); diff --git a/connectivity/source/drivers/macab/MacabAddressBook.cxx b/connectivity/source/drivers/macab/MacabAddressBook.cxx index 97469643cf..1f7d0a6b18 100644 --- a/connectivity/source/drivers/macab/MacabAddressBook.cxx +++ b/connectivity/source/drivers/macab/MacabAddressBook.cxx @@ -81,7 +81,7 @@ const ::rtl::OUString & MacabAddressBook::getDefaultTableName() { /* This string probably needs to be localized. */ static const ::rtl::OUString aDefaultTableName - (::rtl::OUString::createFromAscii("Address Book")); + (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Address Book"))); return aDefaultTableName; } @@ -247,9 +247,9 @@ void MacabAddressBook::manageDuplicateGroups(::std::vector<MacabGroup *> _xGroup if(count != 1) { ::rtl::OUString sName = (*iter1)->getName(); - sName += ::rtl::OUString::createFromAscii(" (") + + sName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" (")) + ::rtl::OUString::valueOf(count) + - ::rtl::OUString::createFromAscii(")"); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")")); (*iter1)->setName(sName); } } diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx index f016c9ce9c..5eb0490e5e 100644 --- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx @@ -789,7 +789,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTableTypes( ) throw( Reference< XResultSet > xRef = pResult; static ODatabaseMetaDataResultSet::ORows aRows; - static const ::rtl::OUString aTable(::rtl::OUString::createFromAscii("TABLE")); + static const ::rtl::OUString aTable(RTL_CONSTASCII_USTRINGPARAM("TABLE")); if (aRows.empty()) { @@ -814,7 +814,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTypeInfo( ) throw(SQ // We support four types: char, timestamp, integer, float aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue(); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("CHAR")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CHAR"))); aRow[2] = new ORowSetValueDecorator(DataType::CHAR); aRow[3] = new ORowSetValueDecorator((sal_Int32) 254); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); @@ -835,20 +835,20 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTypeInfo( ) throw(SQ aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP); aRow[3] = new ORowSetValueDecorator((sal_Int32)19); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("INTEGER")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INTEGER"))); aRow[2] = new ORowSetValueDecorator(DataType::INTEGER); aRow[3] = new ORowSetValueDecorator((sal_Int32)20); aRow[15] = new ORowSetValueDecorator((sal_Int32)20); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("FLOAT")); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FLOAT"))); aRow[2] = new ORowSetValueDecorator(DataType::FLOAT); aRow[3] = new ORowSetValueDecorator((sal_Int32)20); aRow[15] = new ORowSetValueDecorator((sal_Int32)15); @@ -909,7 +909,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumns( aRow[14] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[15] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[16] = new ORowSetValueDecorator((sal_Int32) 254); - aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("YES")); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YES"))); sal_Int32 nPosition = 1; ::rtl::OUString sName; @@ -930,24 +930,24 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumns( { case kABStringProperty: aRow[5] = new ORowSetValueDecorator(DataType::CHAR); - aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("CHAR")); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CHAR"))); aRow[7] = new ORowSetValueDecorator((sal_Int32) 256); aRows.push_back(aRow); break; case kABDateProperty: aRow[5] = new ORowSetValueDecorator(DataType::TIMESTAMP); - aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP")); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); aRows.push_back(aRow); break; case kABIntegerProperty: aRow[5] = new ORowSetValueDecorator(DataType::INTEGER); - aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("INTEGER")); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INTEGER"))); aRow[7] = new ORowSetValueDecorator((sal_Int32) 20); aRows.push_back(aRow); break; case kABRealProperty: aRow[5] = new ORowSetValueDecorator(DataType::FLOAT); - aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("FLOAT")); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FLOAT"))); aRow[7] = new ORowSetValueDecorator((sal_Int32) 15); aRows.push_back(aRow); break; @@ -974,7 +974,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables( // check whether we have tables in the requested types // for the moment, we answer only the "TABLE" table type // when no types are given at all, we return all the tables - static const ::rtl::OUString aTable(::rtl::OUString::createFromAscii("TABLE")); + static const ::rtl::OUString aTable(RTL_CONSTASCII_USTRINGPARAM("TABLE")); sal_Bool bTableFound = sal_False; const ::rtl::OUString* p = types.getConstArray(), * pEnd = p + types.getLength(); @@ -1058,7 +1058,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getVersionColumns( aRow[1] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[2] = new ORowSetValueDecorator(sName); aRow[3] = new ORowSetValueDecorator(DataType::TIMESTAMP); - aRow[4] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP")); + aRow[4] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); aRow[5] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[6] = ODatabaseMetaDataResultSet::getEmptyValue(); diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx b/connectivity/source/drivers/macab/MacabDriver.cxx index abcfe98bd0..e409e24f59 100644 --- a/connectivity/source/drivers/macab/MacabDriver.cxx +++ b/connectivity/source/drivers/macab/MacabDriver.cxx @@ -235,7 +235,7 @@ Sequence< ::rtl::OUString > MacabDriver::getSupportedServiceNames_Static( ) thr // which service is supported // for more information @see com.sun.star.sdbc.Driver Sequence< ::rtl::OUString > aSNS( 1 ); - aSNS[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.Driver"); + aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); return aSNS; } @@ -293,7 +293,7 @@ sal_Bool SAL_CALL MacabDriver::acceptsURL( const ::rtl::OUString& url ) return sal_False; // here we have to look whether we support this URL format - return (!url.compareTo(::rtl::OUString::createFromAscii("sdbc:address:macab:"), 18)); + return (!url.compareTo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:macab:")), 18)); } // -------------------------------------------------------------------------------- Sequence< DriverPropertyInfo > SAL_CALL MacabDriver::getPropertyInfo( const ::rtl::OUString&, const Sequence< PropertyValue >& ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/macab/MacabRecords.cxx b/connectivity/source/drivers/macab/MacabRecords.cxx index 601808e9a7..3b38bc8929 100644 --- a/connectivity/source/drivers/macab/MacabRecords.cxx +++ b/connectivity/source/drivers/macab/MacabRecords.cxx @@ -568,7 +568,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert multiLabelString = CFStringToOUString(localizedMultiLabel); CFRelease(multiLabel); CFRelease(localizedMultiLabel); - headerNameString = multiPropertyString + ::rtl::OUString::createFromAscii(": ") + fixLabel(multiLabelString); + headerNameString = multiPropertyString + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) + fixLabel(multiLabelString); headerNames[i] = new macabfield; headerNames[i]->value = OUStringToCFString(headerNameString); headerNames[i]->type = multiType; @@ -619,7 +619,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert if(multiValue && multiLabel) { localizedMultiLabel = ABCopyLocalizedPropertyOrLabel(multiLabel); - multiLabelString = multiPropertyString + ::rtl::OUString::createFromAscii(": ") + fixLabel(CFStringToOUString(localizedMultiLabel)); + multiLabelString = multiPropertyString + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) + fixLabel(CFStringToOUString(localizedMultiLabel)); CFRelease(multiLabel); CFRelease(localizedMultiLabel); multiLabel = OUStringToCFString(multiLabelString); @@ -707,7 +707,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert dictType = (ABPropertyType) getABTypeFromCFType( CFGetTypeID(dictValues[i]) ); localizedDictKey = ABCopyLocalizedPropertyOrLabel(dictKeys[i]); dictKeyString = CFStringToOUString(localizedDictKey); - dictLabelString = propertyNameString + ::rtl::OUString::createFromAscii(": ") + fixLabel(dictKeyString); + dictLabelString = propertyNameString + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) + fixLabel(dictKeyString); dictLabel = OUStringToCFString(dictLabelString); dictHeaders[i] = createHeaderForProperty(dictType, dictValues[i], dictLabel); if (!dictHeaders[i]) @@ -847,7 +847,7 @@ void MacabRecords::manageDuplicateHeaders(macabfield **_headerNames, const sal_I // There is probably a better way to do this... ::rtl::OUString newName = CFStringToOUString((CFStringRef) _headerNames[i]->value); CFRelease(_headerNames[i]->value); - newName += ::rtl::OUString::createFromAscii(" (") + ::rtl::OUString::valueOf(count) + ::rtl::OUString::createFromAscii(")"); + newName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" (")) + ::rtl::OUString::valueOf(count) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")")); _headerNames[i]->value = OUStringToCFString(newName); } } @@ -968,7 +968,7 @@ void MacabRecords::insertPropertyIntoMacabRecord(const ABPropertyType _propertyT { bPlaced = sal_False; i++; - columnName = ::rtl::OUString(_propertyName) + ::rtl::OUString::createFromAscii(" (") + ::rtl::OUString::valueOf(i) + ::rtl::OUString::createFromAscii(")"); + columnName = ::rtl::OUString(_propertyName) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" (")) + ::rtl::OUString::valueOf(i) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")")); } // success! @@ -1040,7 +1040,7 @@ void MacabRecords::insertPropertyIntoMacabRecord(const ABPropertyType _propertyT localizedDictKey = ABCopyLocalizedPropertyOrLabel(dictKeys[i]); dictKeyString = CFStringToOUString(localizedDictKey); CFRelease(localizedDictKey); - newPropertyName = _propertyName + ::rtl::OUString::createFromAscii(": ") + fixLabel(dictKeyString); + newPropertyName = _propertyName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) + fixLabel(dictKeyString); insertPropertyIntoMacabRecord(_abrecord, _header, newPropertyName, dictValues[i]); } @@ -1083,7 +1083,7 @@ void MacabRecords::insertPropertyIntoMacabRecord(const ABPropertyType _propertyT localizedMultiLabel = ABCopyLocalizedPropertyOrLabel(multiLabel); multiLabelString = CFStringToOUString(localizedMultiLabel); - newPropertyName = _propertyName + ::rtl::OUString::createFromAscii(": ") + fixLabel(multiLabelString); + newPropertyName = _propertyName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) + fixLabel(multiLabelString); insertPropertyIntoMacabRecord(multiType, _abrecord, _header, newPropertyName, multiValue); /* free our variables */ diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx index 314337fbe7..851052aa59 100644 --- a/connectivity/source/drivers/macab/MacabResultSet.cxx +++ b/connectivity/source/drivers/macab/MacabResultSet.cxx @@ -890,7 +890,7 @@ Any SAL_CALL MacabResultSet::getBookmark() throw( SQLException, RuntimeExceptio if (m_nRowPos != -1 && m_nRowPos != nRecords) { - macabfield *uidField = m_aMacabRecords->getField(m_nRowPos,::rtl::OUString::createFromAscii("UID")); + macabfield *uidField = m_aMacabRecords->getField(m_nRowPos,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UID"))); if(uidField != NULL) { if(uidField->type == kABStringProperty) @@ -912,7 +912,7 @@ sal_Bool SAL_CALL MacabResultSet::moveToBookmark(const Any& bookmark) throw( SQ for (sal_Int32 nRow = 0; nRow < nRecords; nRow++) { - macabfield *uidField = m_aMacabRecords->getField(m_nRowPos,::rtl::OUString::createFromAscii("UID")); + macabfield *uidField = m_aMacabRecords->getField(m_nRowPos,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UID"))); if(uidField != NULL) { if(uidField->type == kABStringProperty) diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx index 27ff55dced..064065213c 100644 --- a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx @@ -55,7 +55,7 @@ MacabResultSetMetaData::~MacabResultSetMetaData() void MacabResultSetMetaData::setMacabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException) { OSQLColumns::Vector::const_iterator aIter; - static const ::rtl::OUString aName(::rtl::OUString::createFromAscii("Name")); + static const ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("Name")); MacabRecords *aRecords; MacabHeader *aHeader; diff --git a/connectivity/source/drivers/macab/MacabServices.cxx b/connectivity/source/drivers/macab/MacabServices.cxx index d6e9e7b385..3b4c93a9bd 100644 --- a/connectivity/source/drivers/macab/MacabServices.cxx +++ b/connectivity/source/drivers/macab/MacabServices.cxx @@ -63,9 +63,9 @@ void REGISTER_PROVIDER( const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) { OUString aMainKeyName; - aMainKeyName = OUString::createFromAscii("/"); + aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aMainKeyName += aServiceImplName; - aMainKeyName += OUString::createFromAscii("/UNO/SERVICES"); + aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); OSL_ENSURE(xNewKey.is(), "MACAB::component_writeInfo : could not create a registry key !"); diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx index 0b2950b3dd..b95be24cba 100644 --- a/connectivity/source/drivers/mozab/MDriver.cxx +++ b/connectivity/source/drivers/mozab/MDriver.cxx @@ -237,7 +237,7 @@ EDriverType MozabDriver::impl_classifyURL( const ::rtl::OUString& url ) // There isn't any subschema: - but could be just subschema if ( aAddrbookURI.getLength() > 0 ) aAddrbookScheme= aAddrbookURI; - else if(url == ::rtl::OUString::createFromAscii("sdbc:address:") ) + else if(url == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:")) ) return Unknown; // TODO check else return Unknown; diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx index 240d8a8a59..c1ce305583 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx @@ -67,7 +67,7 @@ namespace ::rtl::OUString aConfigPath; aSecurity.getConfigDir( aConfigPath ); - return aConfigPath + ::rtl::OUString::createFromAscii( "/" ); + return aConfigPath + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } // ------------------------------------------------------------------- diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx index 497b212c47..754345c6f1 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx @@ -93,7 +93,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.getLength()) - sectionName = OUString::createFromAscii("no name section"); + sectionName = OUString(RTL_CONSTASCII_USTRINGPARAM("no name section")); ini_Section *aSection = &mAllSection[sectionName]; aSection->sName = sectionName; diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx index e7a6461904..c84841f917 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx @@ -280,7 +280,7 @@ namespace connectivity #endif ::rtl::OUString regDir = getRegistryDir(product); ::rtl::OUString profilesIni( regDir ); - profilesIni += ::rtl::OUString::createFromAscii( "profiles.ini" ); + profilesIni += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("profiles.ini")); IniParser parser( profilesIni ); IniSectionMap &mAllSection = *(parser.getAllSection()); @@ -299,19 +299,19 @@ namespace connectivity itor++) { struct ini_NameValue * aValue = &(*itor); - if (aValue->sName.equals(::rtl::OUString::createFromAscii("Name"))) + if (aValue->sName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")))) { profileName = aValue->sValue; } - else if (aValue->sName.equals(::rtl::OUString::createFromAscii("IsRelative"))) + else if (aValue->sName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRelative")))) { sIsRelative = aValue->sValue; } - else if (aValue->sName.equals(::rtl::OUString::createFromAscii("Path"))) + else if (aValue->sName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Path")))) { profilePath = aValue->sValue; } - else if (aValue->sName.equals(::rtl::OUString::createFromAscii("Default"))) + else if (aValue->sName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Default")))) { sIsDefault = aValue->sValue; } diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx index 92967f77e8..6c2a2f5bc2 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx @@ -78,7 +78,7 @@ void MNSTerminateListener::addTerminateListener() if( xFact.is() ) { - Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY ); + Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ), UNO_QUERY ); if( xDesktop.is() ) xDesktop->addTerminateListener(mxTerminateListener); diff --git a/connectivity/source/drivers/mysql/YColumns.cxx b/connectivity/source/drivers/mysql/YColumns.cxx index 28c9861f61..effe4d3653 100644 --- a/connectivity/source/drivers/mysql/YColumns.cxx +++ b/connectivity/source/drivers/mysql/YColumns.cxx @@ -83,7 +83,7 @@ void OMySQLColumn::construct() Sequence< ::rtl::OUString > SAL_CALL OMySQLColumn::getSupportedServiceNames( ) throw(RuntimeException) { Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.Column"); + aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.Column")); return aSupported; } diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx index 4e60c0f015..d702012e1a 100644 --- a/connectivity/source/drivers/mysql/YDriver.cxx +++ b/connectivity/source/drivers/mysql/YDriver.cxx @@ -444,14 +444,14 @@ namespace connectivity //------------------------------------------------------------------------------ rtl::OUString ODriverDelegator::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString::createFromAscii("org.openoffice.comp.drivers.MySQL.Driver"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.drivers.MySQL.Driver")); } //------------------------------------------------------------------------------ Sequence< ::rtl::OUString > ODriverDelegator::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< ::rtl::OUString > aSNS( 2 ); - aSNS[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.Driver"); - aSNS[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.Driver"); + aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); + aSNS[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.Driver")); return aSNS; } //------------------------------------------------------------------ diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx index 381869964a..a9c97aaeea 100644 --- a/connectivity/source/drivers/mysql/YTable.cxx +++ b/connectivity/source/drivers/mysql/YTable.cxx @@ -366,7 +366,7 @@ void OMySQLTable::executeStatement(const ::rtl::OUString& _rStatement ) { ::rtl::OUString sSQL = _rStatement; if(sSQL.lastIndexOf(',') == (sSQL.getLength()-1)) - sSQL = sSQL.replaceAt(sSQL.getLength()-1,1,::rtl::OUString::createFromAscii(")")); + sSQL = sSQL.replaceAt(sSQL.getLength()-1,1,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")"))); Reference< XStatement > xStmt = getConnection()->createStatement( ); if ( xStmt.is() ) diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx index c5ee8fbd63..aac4f5c3f3 100644 --- a/connectivity/source/drivers/mysql/YTables.cxx +++ b/connectivity/source/drivers/mysql/YTables.cxx @@ -160,11 +160,11 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP " )); Reference<XPropertySet> xProp(xObject,UNO_QUERY); - sal_Bool bIsView = xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == ::rtl::OUString::createFromAscii("VIEW"); + sal_Bool bIsView = xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")); if(bIsView) // here we have a view - aSql += ::rtl::OUString::createFromAscii("VIEW "); + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW ")); else - aSql += ::rtl::OUString::createFromAscii("TABLE "); + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE ")); ::rtl::OUString sComposedName( ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInDataManipulation ) ); diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx index 424f1448cd..cca001eeeb 100644 --- a/connectivity/source/drivers/mysql/YUser.cxx +++ b/connectivity/source/drivers/mysql/YUser.cxx @@ -238,12 +238,12 @@ void SAL_CALL OMySQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_I if(sPrivs.getLength()) { ::rtl::OUString sGrant; - sGrant += ::rtl::OUString::createFromAscii("GRANT "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GRANT ")); sGrant += sPrivs; - sGrant += ::rtl::OUString::createFromAscii(" ON "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON ")); Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); - sGrant += ::rtl::OUString::createFromAscii(" TO "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" TO ")); sGrant += m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -268,12 +268,12 @@ void SAL_CALL OMySQLUser::revokePrivileges( const ::rtl::OUString& objName, sal_ if(sPrivs.getLength()) { ::rtl::OUString sGrant; - sGrant += ::rtl::OUString::createFromAscii("REVOKE "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVOKE ")); sGrant += sPrivs; - sGrant += ::rtl::OUString::createFromAscii(" ON "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON ")); Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); - sGrant += ::rtl::OUString::createFromAscii(" FROM "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FROM ")); sGrant += m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -289,11 +289,11 @@ void SAL_CALL OMySQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/ ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed); ::rtl::OUString sAlterPwd; - sAlterPwd = ::rtl::OUString::createFromAscii("SET PASSWORD FOR "); + sAlterPwd = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SET PASSWORD FOR ")); sAlterPwd += m_Name; sAlterPwd += ::rtl::OUString::createFromAscii("@\"%\" = PASSWORD('") ; sAlterPwd += newPassword; - sAlterPwd += ::rtl::OUString::createFromAscii("')") ; + sAlterPwd += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("')")) ; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -308,41 +308,41 @@ void SAL_CALL OMySQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/ { ::rtl::OUString sPrivs; if((nRights & Privilege::INSERT) == Privilege::INSERT) - sPrivs += ::rtl::OUString::createFromAscii("INSERT"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INSERT")); if((nRights & Privilege::DELETE) == Privilege::DELETE) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("DELETE"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DELETE")); } if((nRights & Privilege::UPDATE) == Privilege::UPDATE) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("UPDATE"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UPDATE")); } if((nRights & Privilege::ALTER) == Privilege::ALTER) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("ALTER"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ALTER")); } if((nRights & Privilege::SELECT) == Privilege::SELECT) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("SELECT"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT")); } if((nRights & Privilege::REFERENCE) == Privilege::REFERENCE) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("REFERENCES"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REFERENCES")); } return sPrivs; diff --git a/connectivity/source/drivers/mysql/YUsers.cxx b/connectivity/source/drivers/mysql/YUsers.cxx index 7598a762cf..853bd51364 100644 --- a/connectivity/source/drivers/mysql/YUsers.cxx +++ b/connectivity/source/drivers/mysql/YUsers.cxx @@ -90,9 +90,9 @@ sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPassword; if ( sPassword.getLength() ) { - aSql += ::rtl::OUString::createFromAscii(" IDENTIFIED BY '"); + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" IDENTIFIED BY '")); aSql += sPassword; - aSql += ::rtl::OUString::createFromAscii("'"); + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("'")); } Reference< XStatement > xStmt = m_xConnection->createStatement( ); diff --git a/connectivity/source/drivers/mysql/YViews.cxx b/connectivity/source/drivers/mysql/YViews.cxx index a9126f6196..8184a7af1d 100644 --- a/connectivity/source/drivers/mysql/YViews.cxx +++ b/connectivity/source/drivers/mysql/YViews.cxx @@ -142,7 +142,7 @@ void OViews::createView( const Reference< XPropertySet >& descriptor ) aSql += ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true ); - aSql += ::rtl::OUString::createFromAscii(" AS "); + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" AS ")); descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_COMMAND)) >>= sCommand; aSql += sCommand; diff --git a/connectivity/source/drivers/mysql/Yservices.cxx b/connectivity/source/drivers/mysql/Yservices.cxx index e3987d90c5..508c4ed377 100644 --- a/connectivity/source/drivers/mysql/Yservices.cxx +++ b/connectivity/source/drivers/mysql/Yservices.cxx @@ -62,9 +62,9 @@ void REGISTER_PROVIDER( const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) { OUString aMainKeyName; - aMainKeyName = OUString::createFromAscii("/"); + aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aMainKeyName += aServiceImplName; - aMainKeyName += OUString::createFromAscii("/UNO/SERVICES"); + aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); OSL_ENSURE(xNewKey.is(), "ADABAS::component_writeInfo : could not create a registry key !"); diff --git a/connectivity/source/drivers/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx index 66e10db75d..86f173a395 100644 --- a/connectivity/source/drivers/odbc/OFunctions.cxx +++ b/connectivity/source/drivers/odbc/OFunctions.cxx @@ -111,24 +111,24 @@ sal_Bool LoadLibrary_ODBC3(::rtl::OUString &_rPath) if (bLoaded) return sal_True; #ifdef WIN - _rPath = ::rtl::OUString::createFromAscii("ODBC.DLL"); + _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODBC.DLL")); #endif #ifdef WNT - _rPath = ::rtl::OUString::createFromAscii("ODBC32.DLL"); + _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODBC32.DLL")); #endif #ifdef UNX #ifdef MACOSX - _rPath = ::rtl::OUString::createFromAscii("libiodbc.dylib"); + _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("libiodbc.dylib")); #else - _rPath = ::rtl::OUString::createFromAscii("libodbc.so.1"); + _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("libodbc.so.1")); pODBCso = osl_loadModule( _rPath.pData,SAL_LOADMODULE_NOW ); if ( !pODBCso ) - _rPath = ::rtl::OUString::createFromAscii("libodbc.so"); + _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("libodbc.so")); #endif /* MACOSX */ #endif #ifdef OS2 - _rPath = ::rtl::OUString::createFromAscii("ODBC"); + _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODBC")); #endif if ( !pODBCso ) @@ -137,7 +137,7 @@ sal_Bool LoadLibrary_ODBC3(::rtl::OUString &_rPath) #ifdef OS2 { delete pODBCso; - _rPath = ::rtl::OUString::createFromAscii("WOD402"); + _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WOD402")); pODBCso = osl_loadModule( _rPath.pData,SAL_LOADMODULE_NOW ); if( !pODBCso) return sal_False; @@ -153,127 +153,127 @@ sal_Bool LoadLibrary_ODBC3(::rtl::OUString &_rPath) sal_Bool LoadFunctions(oslModule pODBCso) { - if( ( pODBC3SQLAllocHandle = (T3SQLAllocHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLAllocHandle").pData )) == NULL ) + if( ( pODBC3SQLAllocHandle = (T3SQLAllocHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLAllocHandle")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLConnect = (T3SQLConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLConnect").pData )) == NULL ) + if( ( pODBC3SQLConnect = (T3SQLConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLConnect")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLDriverConnect = (T3SQLDriverConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDriverConnect").pData )) == NULL ) + if( ( pODBC3SQLDriverConnect = (T3SQLDriverConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLDriverConnect")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLBrowseConnect = (T3SQLBrowseConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBrowseConnect").pData )) == NULL ) + if( ( pODBC3SQLBrowseConnect = (T3SQLBrowseConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLBrowseConnect")).pData )) == NULL ) return sal_False; - if(( pODBC3SQLDataSources = (T3SQLDataSources)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDataSources").pData )) == NULL ) + if(( pODBC3SQLDataSources = (T3SQLDataSources)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLDataSources")).pData )) == NULL ) return sal_False; - if(( pODBC3SQLDrivers = (T3SQLDrivers)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDrivers").pData )) == NULL ) + if(( pODBC3SQLDrivers = (T3SQLDrivers)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLDrivers")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetInfo = (T3SQLGetInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetInfo").pData )) == NULL ) + if( ( pODBC3SQLGetInfo = (T3SQLGetInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetInfo")).pData )) == NULL ) return sal_False; - if(( pODBC3SQLGetFunctions = (T3SQLGetFunctions)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetFunctions").pData )) == NULL ) + if(( pODBC3SQLGetFunctions = (T3SQLGetFunctions)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetFunctions")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetTypeInfo = (T3SQLGetTypeInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetTypeInfo").pData )) == NULL ) + if( ( pODBC3SQLGetTypeInfo = (T3SQLGetTypeInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetTypeInfo")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetConnectAttr = (T3SQLSetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetConnectAttr").pData )) == NULL ) + if( ( pODBC3SQLSetConnectAttr = (T3SQLSetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSetConnectAttr")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetConnectAttr = (T3SQLGetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetConnectAttr").pData )) == NULL ) + if( ( pODBC3SQLGetConnectAttr = (T3SQLGetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetConnectAttr")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetEnvAttr = (T3SQLSetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetEnvAttr").pData )) == NULL ) + if( ( pODBC3SQLSetEnvAttr = (T3SQLSetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSetEnvAttr")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetEnvAttr = (T3SQLGetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetEnvAttr").pData )) == NULL ) + if( ( pODBC3SQLGetEnvAttr = (T3SQLGetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetEnvAttr")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetStmtAttr = (T3SQLSetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetStmtAttr").pData )) == NULL ) + if( ( pODBC3SQLSetStmtAttr = (T3SQLSetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSetStmtAttr")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetStmtAttr = (T3SQLGetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetStmtAttr").pData )) == NULL ) + if( ( pODBC3SQLGetStmtAttr = (T3SQLGetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetStmtAttr")).pData )) == NULL ) return sal_False; - /*if( ( pODBC3SQLSetDescField = (T3SQLSetDescField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetDescField").pData )) == NULL ) + /*if( ( pODBC3SQLSetDescField = (T3SQLSetDescField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSetDescField")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetDescField = (T3SQLGetDescField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDescField").pData )) == NULL ) + if( ( pODBC3SQLGetDescField = (T3SQLGetDescField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetDescField")).pData )) == NULL ) return sal_False;*/ - /*if( ( pODBC3SQLGetDescRec = (T3SQLGetDescRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDescRec").pData )) == NULL ) + /*if( ( pODBC3SQLGetDescRec = (T3SQLGetDescRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetDescRec")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetDescRec = (T3SQLSetDescRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetDescRec").pData )) == NULL ) + if( ( pODBC3SQLSetDescRec = (T3SQLSetDescRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSetDescRec")).pData )) == NULL ) return sal_False;*/ - if( ( pODBC3SQLPrepare = (T3SQLPrepare)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPrepare").pData )) == NULL ) + if( ( pODBC3SQLPrepare = (T3SQLPrepare)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLPrepare")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLBindParameter = (T3SQLBindParameter)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBindParameter").pData )) == NULL ) + if( ( pODBC3SQLBindParameter = (T3SQLBindParameter)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLBindParameter")).pData )) == NULL ) return sal_False; -// if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetCursorName").pData )) == NULL ) +// if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetCursorName")).pData )) == NULL ) // return sal_False; - if( ( pODBC3SQLSetCursorName = (T3SQLSetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetCursorName").pData )) == NULL ) + if( ( pODBC3SQLSetCursorName = (T3SQLSetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSetCursorName")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLExecute = (T3SQLExecute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLExecute").pData )) == NULL ) + if( ( pODBC3SQLExecute = (T3SQLExecute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLExecute")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLExecDirect = (T3SQLExecDirect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLExecDirect").pData )) == NULL ) + if( ( pODBC3SQLExecDirect = (T3SQLExecDirect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLExecDirect")).pData )) == NULL ) return sal_False; - /*if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNativeSql").pData )) == NULL ) + /*if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLNativeSql")).pData )) == NULL ) return sal_False;*/ - if( ( pODBC3SQLDescribeParam = (T3SQLDescribeParam)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDescribeParam").pData )) == NULL ) + if( ( pODBC3SQLDescribeParam = (T3SQLDescribeParam)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLDescribeParam")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLNumParams = (T3SQLNumParams)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNumParams").pData )) == NULL ) + if( ( pODBC3SQLNumParams = (T3SQLNumParams)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLNumParams")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLParamData = (T3SQLParamData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLParamData").pData )) == NULL ) + if( ( pODBC3SQLParamData = (T3SQLParamData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLParamData")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLPutData = (T3SQLPutData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPutData").pData )) == NULL ) + if( ( pODBC3SQLPutData = (T3SQLPutData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLPutData")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLRowCount = (T3SQLRowCount)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLRowCount").pData )) == NULL ) + if( ( pODBC3SQLRowCount = (T3SQLRowCount)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLRowCount")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLNumResultCols = (T3SQLNumResultCols)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNumResultCols").pData )) == NULL ) + if( ( pODBC3SQLNumResultCols = (T3SQLNumResultCols)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLNumResultCols")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLDescribeCol = (T3SQLDescribeCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDescribeCol").pData )) == NULL ) + if( ( pODBC3SQLDescribeCol = (T3SQLDescribeCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLDescribeCol")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLColAttribute = (T3SQLColAttribute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLColAttribute").pData )) == NULL ) + if( ( pODBC3SQLColAttribute = (T3SQLColAttribute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLColAttribute")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLBindCol = (T3SQLBindCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBindCol").pData )) == NULL ) + if( ( pODBC3SQLBindCol = (T3SQLBindCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLBindCol")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFetch = (T3SQLFetch)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFetch").pData )) == NULL ) + if( ( pODBC3SQLFetch = (T3SQLFetch)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLFetch")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFetchScroll = (T3SQLFetchScroll)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFetchScroll").pData )) == NULL ) + if( ( pODBC3SQLFetchScroll = (T3SQLFetchScroll)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLFetchScroll")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetData = (T3SQLGetData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetData").pData )) == NULL ) + if( ( pODBC3SQLGetData = (T3SQLGetData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetData")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetPos = (T3SQLSetPos)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetPos").pData )) == NULL ) + if( ( pODBC3SQLSetPos = (T3SQLSetPos)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSetPos")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLBulkOperations = (T3SQLBulkOperations)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBulkOperations").pData )) == NULL ) + if( ( pODBC3SQLBulkOperations = (T3SQLBulkOperations)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLBulkOperations")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLMoreResults = (T3SQLMoreResults)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLMoreResults").pData )) == NULL ) + if( ( pODBC3SQLMoreResults = (T3SQLMoreResults)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLMoreResults")).pData )) == NULL ) return sal_False; - /*if( ( pODBC3SQLGetDiagField = (T3SQLGetDiagField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDiagField").pData )) == NULL ) + /*if( ( pODBC3SQLGetDiagField = (T3SQLGetDiagField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetDiagField")).pData )) == NULL ) return sal_False;*/ - if( ( pODBC3SQLGetDiagRec = (T3SQLGetDiagRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDiagRec").pData )) == NULL ) + if( ( pODBC3SQLGetDiagRec = (T3SQLGetDiagRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetDiagRec")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLColumnPrivileges = (T3SQLColumnPrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLColumnPrivileges").pData )) == NULL ) + if( ( pODBC3SQLColumnPrivileges = (T3SQLColumnPrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLColumnPrivileges")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLColumns = (T3SQLColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLColumns").pData )) == NULL ) + if( ( pODBC3SQLColumns = (T3SQLColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLColumns")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLForeignKeys = (T3SQLForeignKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLForeignKeys").pData )) == NULL ) + if( ( pODBC3SQLForeignKeys = (T3SQLForeignKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLForeignKeys")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLPrimaryKeys = (T3SQLPrimaryKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPrimaryKeys").pData )) == NULL ) + if( ( pODBC3SQLPrimaryKeys = (T3SQLPrimaryKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLPrimaryKeys")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLProcedureColumns = (T3SQLProcedureColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLProcedureColumns").pData )) == NULL ) + if( ( pODBC3SQLProcedureColumns = (T3SQLProcedureColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLProcedureColumns")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLProcedures = (T3SQLProcedures)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLProcedures").pData )) == NULL ) + if( ( pODBC3SQLProcedures = (T3SQLProcedures)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLProcedures")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSpecialColumns = (T3SQLSpecialColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSpecialColumns").pData )) == NULL ) + if( ( pODBC3SQLSpecialColumns = (T3SQLSpecialColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSpecialColumns")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLStatistics = (T3SQLStatistics)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLStatistics").pData )) == NULL ) + if( ( pODBC3SQLStatistics = (T3SQLStatistics)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLStatistics")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLTablePrivileges = (T3SQLTablePrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLTablePrivileges").pData )) == NULL ) + if( ( pODBC3SQLTablePrivileges = (T3SQLTablePrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLTablePrivileges")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLTables = (T3SQLTables)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLTables").pData )) == NULL ) + if( ( pODBC3SQLTables = (T3SQLTables)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLTables")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFreeStmt = (T3SQLFreeStmt)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFreeStmt").pData )) == NULL ) + if( ( pODBC3SQLFreeStmt = (T3SQLFreeStmt)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLFreeStmt")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLCloseCursor = (T3SQLCloseCursor)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLCloseCursor").pData )) == NULL ) + if( ( pODBC3SQLCloseCursor = (T3SQLCloseCursor)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLCloseCursor")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLCancel = (T3SQLCancel)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLCancel").pData )) == NULL ) + if( ( pODBC3SQLCancel = (T3SQLCancel)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLCancel")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLEndTran = (T3SQLEndTran)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLEndTran").pData )) == NULL ) + if( ( pODBC3SQLEndTran = (T3SQLEndTran)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLEndTran")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLDisconnect = (T3SQLDisconnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDisconnect").pData )) == NULL ) + if( ( pODBC3SQLDisconnect = (T3SQLDisconnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLDisconnect")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFreeHandle = (T3SQLFreeHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFreeHandle").pData )) == NULL ) + if( ( pODBC3SQLFreeHandle = (T3SQLFreeHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLFreeHandle")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetCursorName").pData )) == NULL ) + if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetCursorName")).pData )) == NULL ) return sal_False; - if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNativeSql").pData )) == NULL ) + if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLNativeSql")).pData )) == NULL ) return sal_False; return sal_True; diff --git a/connectivity/source/drivers/odbc/oservices.cxx b/connectivity/source/drivers/odbc/oservices.cxx index eab3c07f30..15d39337b3 100644 --- a/connectivity/source/drivers/odbc/oservices.cxx +++ b/connectivity/source/drivers/odbc/oservices.cxx @@ -63,9 +63,9 @@ void REGISTER_PROVIDER( const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) { OUString aMainKeyName; - aMainKeyName = OUString::createFromAscii("/"); + aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aMainKeyName += aServiceImplName; - aMainKeyName += OUString::createFromAscii("/UNO/SERVICES"); + aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); OSL_ENSURE(xNewKey.is(), "ODBC::component_writeInfo : could not create a registry key !"); diff --git a/connectivity/source/drivers/odbcbase/OConnection.cxx b/connectivity/source/drivers/odbcbase/OConnection.cxx index 1fec1f89ec..36ab8c9e05 100644 --- a/connectivity/source/drivers/odbcbase/OConnection.cxx +++ b/connectivity/source/drivers/odbcbase/OConnection.cxx @@ -161,7 +161,7 @@ SQLRETURN OConnection::OpenConnection(const ::rtl::OUString& aConnectStr,sal_Int { ::rtl::OUString sVersion; OTools::GetInfo(this,m_aConnectionHandle,SQL_DRIVER_ODBC_VER,sVersion,*this,getTextEncoding()); - m_bUseOldDateFormat = sVersion == ::rtl::OUString::createFromAscii("02.50") || sVersion == ::rtl::OUString::createFromAscii("02.00"); + m_bUseOldDateFormat = sVersion == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("02.50")) || sVersion == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("02.00")); } catch(Exception&) { @@ -236,12 +236,12 @@ SQLRETURN OConnection::Construct(const ::rtl::OUString& url,const Sequence< Prop else if(!pBegin->Name.compareToAscii(pUser)) { OSL_VERIFY( pBegin->Value >>= aUID ); - aDSN = aDSN + ::rtl::OUString::createFromAscii(";UID=") + aUID; + aDSN = aDSN + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";UID=")) + aUID; } else if(!pBegin->Name.compareToAscii(pPwd)) { OSL_VERIFY( pBegin->Value >>= aPWD ); - aDSN = aDSN + ::rtl::OUString::createFromAscii(";PWD=") + aPWD; + aDSN = aDSN + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";PWD=")) + aPWD; } else if(!pBegin->Name.compareToAscii(pUseCatalog)) { @@ -250,7 +250,7 @@ SQLRETURN OConnection::Construct(const ::rtl::OUString& url,const Sequence< Prop else if(!pBegin->Name.compareToAscii(pSysDrv)) { OSL_VERIFY( pBegin->Value >>= aSysDrvSettings ); - aDSN += ::rtl::OUString::createFromAscii(";"); + aDSN += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";")); aDSN += aSysDrvSettings; } else if(0 == pBegin->Name.compareToAscii(pCharSet)) diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx index ce2b36d9fe..c374447c6f 100644 --- a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx +++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx @@ -62,7 +62,7 @@ ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon { m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); ::rtl::OUString sVersion = getDriverVersion(); - m_bOdbc3 = sVersion != ::rtl::OUString::createFromAscii("02.50") && sVersion != ::rtl::OUString::createFromAscii("02.00"); + m_bOdbc3 = sVersion != ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("02.50")) && sVersion != ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("02.00")); } catch(SQLException& ) { // doesn't matter here @@ -734,13 +734,13 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLE // there exists no possibility to get table types so we have to check static ::rtl::OUString sTableTypes[] = { - ::rtl::OUString::createFromAscii("TABLE"), - ::rtl::OUString::createFromAscii("VIEW"), - ::rtl::OUString::createFromAscii("SYSTEM TABLE"), - ::rtl::OUString::createFromAscii("GLOBAL TEMPORARY"), - ::rtl::OUString::createFromAscii("LOCAL TEMPORARY"), - ::rtl::OUString::createFromAscii("ALIAS"), - ::rtl::OUString::createFromAscii("SYNONYM") + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYSTEM TABLE")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GLOBAL TEMPORARY")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LOCAL TEMPORARY")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ALIAS")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYNONYM")) }; sal_Int32 nSize = sizeof(sTableTypes) / sizeof(::rtl::OUString); ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes); @@ -1224,7 +1224,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQL ::rtl::OUString aValue = m_pConnection->getURL(); if ( !aValue.getLength() ) { - aValue = ::rtl::OUString::createFromAscii("sdbc:odbc:"); + aValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:odbc:")); aValue += getURLImpl(); } return aValue; diff --git a/connectivity/source/drivers/odbcbase/ODriver.cxx b/connectivity/source/drivers/odbcbase/ODriver.cxx index c81198ebd6..7be1cf3bba 100644 --- a/connectivity/source/drivers/odbcbase/ODriver.cxx +++ b/connectivity/source/drivers/odbcbase/ODriver.cxx @@ -69,7 +69,7 @@ void ODBCDriver::disposing() //------------------------------------------------------------------------------ rtl::OUString ODBCDriver::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString::createFromAscii("com.sun.star.comp.sdbc.ODBCDriver"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.ODBCDriver")); // this name is referenced in the configuration and in the odbc.xml // Please take care when changing it. } @@ -79,7 +79,7 @@ typedef Sequence< ::rtl::OUString > SS; SS ODBCDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { SS aSNS( 1 ); - aSNS[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.Driver"); + aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); return aSNS; } @@ -130,7 +130,7 @@ Reference< XConnection > SAL_CALL ODBCDriver::connect( const ::rtl::OUString& ur sal_Bool SAL_CALL ODBCDriver::acceptsURL( const ::rtl::OUString& url ) throw(SQLException, RuntimeException) { - return (!url.compareTo(::rtl::OUString::createFromAscii("sdbc:odbc:"),10)); + return (!url.compareTo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:odbc:")),10)); } // -------------------------------------------------------------------------------- Sequence< DriverPropertyInfo > SAL_CALL ODBCDriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx index f33d2ec489..050bac32df 100644 --- a/connectivity/source/drivers/odbcbase/OResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx @@ -67,14 +67,14 @@ using namespace com::sun::star::util; // IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet"); ::rtl::OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException) { - return ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.odbc.ResultSet"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.odbc.ResultSet")); } // ------------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL OResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< ::rtl::OUString > aSupported(2); - aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.ResultSet"); - aSupported[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.ResultSet"); + aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet")); + aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.ResultSet")); return aSupported; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx index dcf62bf3c6..fe51637d6c 100644 --- a/connectivity/source/drivers/odbcbase/OStatement.cxx +++ b/connectivity/source/drivers/odbcbase/OStatement.cxx @@ -292,7 +292,7 @@ sal_Bool OStatement_Base::lockIfNecessary (const ::rtl::OUString& sql) throw( SQ // Now, look for the FOR UPDATE keywords. If there is any extra white // space between the FOR and UPDATE, this will fail. - sal_Int32 index = sqlStatement.indexOf(::rtl::OUString::createFromAscii(" FOR UPDATE")); + sal_Int32 index = sqlStatement.indexOf(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FOR UPDATE"))); // We found it. Change our concurrency level to ensure that the // row can be updated. |