diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-06-02 09:42:35 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-06-02 09:42:47 -0500 |
commit | d6fef33ef731e96ab55979fa6451f1c1d773103d (patch) | |
tree | 3834209533249a173e7446e4c9b7d5c297ccb598 /connectivity/source | |
parent | targeted string re-work (diff) | |
download | core-d6fef33ef731e96ab55979fa6451f1c1d773103d.tar.gz core-d6fef33ef731e96ab55979fa6451f1c1d773103d.zip |
targeted string re-work
Change-Id: Iac38f0f2622b1f7ddcc6f91b022c949e7a733c41
Diffstat (limited to 'connectivity/source')
67 files changed, 604 insertions, 604 deletions
diff --git a/connectivity/source/drivers/calc/CCatalog.cxx b/connectivity/source/drivers/calc/CCatalog.cxx index 65c4977ff005..591b309b8833 100644 --- a/connectivity/source/drivers/calc/CCatalog.cxx +++ b/connectivity/source/drivers/calc/CCatalog.cxx @@ -56,7 +56,7 @@ void OCalcCatalog::refreshTables() Sequence< ::rtl::OUString > aTypes; OCalcConnection::ODocHolder aDocHodler(((OCalcConnection*)m_pConnection)); Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),aTypes); + ::rtl::OUString("%"),::rtl::OUString("%"),aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx index e7ac50dc4211..6bf3c62c7828 100644 --- a/connectivity/source/drivers/calc/CConnection.cxx +++ b/connectivity/source/drivers/calc/CConnection.cxx @@ -122,21 +122,21 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc() } // open read-only as long as updating isn't implemented Sequence<PropertyValue> aArgs(2); - aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Hidden")); + aArgs[0].Name = ::rtl::OUString("Hidden"); aArgs[0].Value <<= (sal_Bool) sal_True; - aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")); + aArgs[1].Name = ::rtl::OUString("ReadOnly"); aArgs[1].Value <<= (sal_Bool) sal_True; if ( !m_sPassword.isEmpty() ) { const sal_Int32 nPos = aArgs.getLength(); aArgs.realloc(nPos+1); - aArgs[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Password")); + aArgs[nPos].Name = ::rtl::OUString("Password"); aArgs[nPos].Value <<= m_sPassword; } Reference< XComponentLoader > xDesktop( getDriver()->getFactory()->createInstance( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))), UNO_QUERY ); + ::rtl::OUString("com.sun.star.frame.Desktop")), UNO_QUERY ); if (!xDesktop.is()) { OSL_FAIL("no desktop"); @@ -147,7 +147,7 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc() try { xComponent = xDesktop->loadComponentFromURL( - m_aFileName, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_blank")), 0, aArgs ); + m_aFileName, ::rtl::OUString("_blank"), 0, aArgs ); } catch( const Exception& ) { diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx index a8077f7555d9..43c1fc1eae96 100644 --- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx @@ -89,7 +89,7 @@ Reference< XResultSet > OCalcDatabaseMetaData::impl_getTypeInfo_throw( ) aRow.reserve(18); aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString("VARCHAR"))); aRow.push_back(new ORowSetValueDecorator(DataType::VARCHAR)); aRow.push_back(new ORowSetValueDecorator((sal_Int32)65535)); aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue()); @@ -111,35 +111,35 @@ Reference< XResultSet > OCalcDatabaseMetaData::impl_getTypeInfo_throw( ) aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("BOOL"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("DATE"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("TIME"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("TIMESTAMP")); aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP); aRow[3] = ODatabaseMetaDataResultSet::get0Value(); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); @@ -228,10 +228,10 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getColumns( switch(sal_Int32(aRow[11]->getValue())) { case ColumnValue::NO_NULLS: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO"))); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString("NO")); break; case ColumnValue::NULLABLE: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YES"))); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString("YES")); break; default: aRow[18] = new ORowSetValueDecorator(::rtl::OUString()); @@ -256,7 +256,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getColumns( RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcDatabaseMetaData::getURL" ); ::osl::MutexGuard aGuard( m_aMutex ); - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:calc:")) + m_pConnection->getURL(); + return ::rtl::OUString("sdbc:calc:") + m_pConnection->getURL(); } // ------------------------------------------------------------------------- @@ -307,7 +307,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(RTL_CONSTASCII_USTRINGPARAM("IsVisible")) ); + Any aVisAny = xProp->getPropertyValue( ::rtl::OUString("IsVisible") ); if ( aVisAny >>= bVisible ) if (!bVisible) return sal_True; // hidden @@ -350,7 +350,7 @@ sal_Bool lcl_IsUnnamed( const Reference<XDatabaseRanges>& xRanges, const ::rtl:: { try { - Any aUserAny = xRangeProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsUserDefined")) ); + Any aUserAny = xRangeProp->getPropertyValue( ::rtl::OUString("IsUserDefined") ); sal_Bool bUserDefined = sal_Bool(); if ( aUserAny >>= bUserDefined ) bUnnamed = !bUserDefined; @@ -381,7 +381,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_CONSTASCII_USTRINGPARAM("TABLE")); + ::rtl::OUString aTable("TABLE"); sal_Bool bTableFound = sal_True; sal_Int32 nLength = types.getLength(); @@ -435,7 +435,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( Reference<XPropertySet> xDocProp( xDoc, UNO_QUERY ); if ( xDocProp.is() ) { - Any aRangesAny = xDocProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DatabaseRanges")) ); + Any aRangesAny = xDocProp->getPropertyValue( ::rtl::OUString("DatabaseRanges") ); Reference<XDatabaseRanges> xRanges; if ( aRangesAny >>= xRanges ) { diff --git a/connectivity/source/drivers/calc/CDriver.cxx b/connectivity/source/drivers/calc/CDriver.cxx index db04060bec24..61d57b5c33c6 100644 --- a/connectivity/source/drivers/calc/CDriver.cxx +++ b/connectivity/source/drivers/calc/CDriver.cxx @@ -47,7 +47,7 @@ using namespace ::com::sun::star::lang; rtl::OUString ODriver::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.calc.ODriver")); + return rtl::OUString("com.sun.star.comp.sdbc.calc.ODriver"); } ::rtl::OUString SAL_CALL ODriver::getImplementationName( ) throw(RuntimeException) @@ -87,7 +87,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(RTL_CONSTASCII_USTRINGPARAM("sdbc:calc:")),10) == 0; + return url.compareTo(::rtl::OUString("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 ebce3e76e914..0a17f8d2d78e 100644 --- a/connectivity/source/drivers/calc/CResultSet.cxx +++ b/connectivity/source/drivers/calc/CResultSet.cxx @@ -53,14 +53,14 @@ OCalcResultSet::OCalcResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTr // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OCalcResultSet::getImplementationName( ) throw ( RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.calc.ResultSet")); + return ::rtl::OUString("com.sun.star.sdbcx.calc.ResultSet"); } // ------------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL OCalcResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< ::rtl::OUString > aSupported(2); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet")); - aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.ResultSet")); + aSupported[0] = ::rtl::OUString("com.sun.star.sdbc.ResultSet"); + aSupported[1] = ::rtl::OUString("com.sun.star.sdbcx.ResultSet"); return aSupported; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index c1bfc587ccb0..1334046ee422 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -155,7 +155,7 @@ CellContentType lcl_GetContentOrResultType( const Reference<XCell>& xCell ) CellContentType eCellType = xCell->getType(); if ( eCellType == CellContentType_FORMULA ) { - static const ::rtl::OUString s_sFormulaResultType(RTL_CONSTASCII_USTRINGPARAM("FormulaResultType")); + static const ::rtl::OUString s_sFormulaResultType("FormulaResultType"); Reference<XPropertySet> xProp( xCell, UNO_QUERY ); try { @@ -274,7 +274,7 @@ void lcl_GetColumnInfo( const Reference<XSpreadsheet>& xSheet, const Reference<X sal_Int16 nNumType = NumberFormat::NUMBER; try { - static ::rtl::OUString s_NumberFormat(RTL_CONSTASCII_USTRINGPARAM("NumberFormat")); + static ::rtl::OUString s_NumberFormat("NumberFormat"); sal_Int32 nKey = 0; if ( xProp->getPropertyValue( s_NumberFormat ) >>= nKey ) @@ -486,24 +486,24 @@ void OCalcTable::fillColumns() { case DataType::VARCHAR: { - static const ::rtl::OUString s_sType(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")); + static const ::rtl::OUString s_sType("VARCHAR"); aTypeName = s_sType; } break; case DataType::DECIMAL: - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL")); + aTypeName = ::rtl::OUString("DECIMAL"); break; case DataType::BIT: - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BOOL")); + aTypeName = ::rtl::OUString("BOOL"); break; case DataType::DATE: - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE")); + aTypeName = ::rtl::OUString("DATE"); break; case DataType::TIME: - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME")); + aTypeName = ::rtl::OUString("TIME"); break; case DataType::TIMESTAMP: - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP")); + aTypeName = ::rtl::OUString("TIMESTAMP"); break; default: OSL_FAIL("missing type name"); @@ -578,7 +578,7 @@ void OCalcTable::construct() Reference<XPropertySet> xDocProp( xDoc, UNO_QUERY ); if ( xDocProp.is() ) { - Reference<XDatabaseRanges> xRanges(xDocProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DatabaseRanges")) ),UNO_QUERY); + Reference<XDatabaseRanges> xRanges(xDocProp->getPropertyValue( ::rtl::OUString("DatabaseRanges") ),UNO_QUERY); if ( xRanges.is() && xRanges->hasByName( m_Name ) ) { @@ -592,7 +592,7 @@ void OCalcTable::construct() sal_Bool bRangeHeader = sal_True; Reference<XPropertySet> xFiltProp( xDBRange->getFilterDescriptor(), UNO_QUERY ); if ( xFiltProp.is() ) - xFiltProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContainsHeader"))) >>= bRangeHeader; + xFiltProp->getPropertyValue(::rtl::OUString("ContainsHeader")) >>= bRangeHeader; Reference<XSheetCellRange> xSheetRange( xRefer->getReferredCells(), UNO_QUERY ); Reference<XCellRangeAddressable> xAddr( xSheetRange, UNO_QUERY ); @@ -626,7 +626,7 @@ void OCalcTable::construct() if (xProp.is()) { ::com::sun::star::util::Date aDateStruct; - if ( xProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NullDate")) ) >>= aDateStruct ) + if ( xProp->getPropertyValue( ::rtl::OUString("NullDate") ) >>= aDateStruct ) m_aNullDate = ::Date( aDateStruct.Day, aDateStruct.Month, aDateStruct.Year ); } } diff --git a/connectivity/source/drivers/calc/CTables.cxx b/connectivity/source/drivers/calc/CTables.cxx index d1052f042a57..833f3a8a1884 100644 --- a/connectivity/source/drivers/calc/CTables.cxx +++ b/connectivity/source/drivers/calc/CTables.cxx @@ -49,7 +49,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(RTL_CONSTASCII_USTRINGPARAM("TABLE"))); + _rName,::rtl::OUString("TABLE")); sdbcx::ObjectType xRet = pTable; pTable->construct(); return xRet; diff --git a/connectivity/source/drivers/dbase/DCatalog.cxx b/connectivity/source/drivers/dbase/DCatalog.cxx index 8c9bd5598120..62c47664fdc8 100644 --- a/connectivity/source/drivers/dbase/DCatalog.cxx +++ b/connectivity/source/drivers/dbase/DCatalog.cxx @@ -52,7 +52,7 @@ void ODbaseCatalog::refreshTables() TStringVector aVector; Sequence< ::rtl::OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),aTypes); + ::rtl::OUString("%"),::rtl::OUString("%"),aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index aad436e80941..2a2b8d8749d6 100644 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx @@ -80,19 +80,19 @@ Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw( ) aRow.reserve(18); aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("length")))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString("length"))); aRow.push_back(new ORowSetValueDecorator((sal_Int32)ColumnValue::NULLABLE)); aRow.push_back(ODatabaseMetaDataResultSet::get1Value()); aRow.push_back(new ORowSetValueDecorator((sal_Int32)ColumnSearch::FULL)); aRow.push_back(ODatabaseMetaDataResultSet::get1Value()); aRow.push_back(ODatabaseMetaDataResultSet::get0Value()); aRow.push_back(ODatabaseMetaDataResultSet::get0Value()); - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("C")))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString("C"))); aRow.push_back(ODatabaseMetaDataResultSet::get0Value()); aRow.push_back(ODatabaseMetaDataResultSet::get0Value()); aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); @@ -101,62 +101,62 @@ Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw( ) aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LONGVARCHAR"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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"))); + aRow[13] = new ORowSetValueDecorator(::rtl::OUString("M")); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("DATE")); aRow[2] = new ORowSetValueDecorator(DataType::DATE); aRow[3] = new ORowSetValueDecorator((sal_Int32)10); - aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("D"))); + aRow[13] = new ORowSetValueDecorator(::rtl::OUString("D")); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BOOLEAN"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("BOOLEAN")); aRow[2] = new ORowSetValueDecorator(DataType::BIT); aRow[3] = ODatabaseMetaDataResultSet::get1Value(); aRow[4] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[5] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[6] = new ORowSetValueDecorator(::rtl::OUString()); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); - aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("L"))); + aRow[13] = new ORowSetValueDecorator(::rtl::OUString("L")); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOUBLE"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("DOUBLE")); aRow[2] = new ORowSetValueDecorator(DataType::DOUBLE); aRow[3] = new ORowSetValueDecorator((sal_Int32)8); - aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("B"))); + aRow[13] = new ORowSetValueDecorator(::rtl::OUString("B")); aRows.push_back(aRow); aRow[11] = new ORowSetValueDecorator(sal_True); - aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Y"))); + aRow[13] = new ORowSetValueDecorator(::rtl::OUString("Y")); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("TIMESTAMP")); aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP); aRow[11] = new ORowSetValueDecorator(sal_False); - aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("T"))); + aRow[13] = new ORowSetValueDecorator(::rtl::OUString("T")); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INTEGER"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("INTEGER")); aRow[2] = new ORowSetValueDecorator(DataType::INTEGER); aRow[3] = new ORowSetValueDecorator((sal_Int32)10); - aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("I"))); + aRow[13] = new ORowSetValueDecorator(::rtl::OUString("I")); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("DECIMAL")); aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL); aRow[3] = new ORowSetValueDecorator((sal_Int32)20); - aRow[6] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("length,scale"))); - aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("F"))); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString("length,scale")); + aRow[13] = new ORowSetValueDecorator(::rtl::OUString("F")); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMERIC"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("NUMERIC")); aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL); aRow[3] = new ORowSetValueDecorator((sal_Int32)16); - aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("N"))); + aRow[13] = new ORowSetValueDecorator(::rtl::OUString("N")); aRow[15] = new ORowSetValueDecorator((sal_Int32)16); aRows.push_back(aRow); } @@ -236,10 +236,10 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getColumns( switch(sal_Int32(aRow[11]->getValue())) { case ColumnValue::NO_NULLS: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO"))); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString("NO")); break; case ColumnValue::NULLABLE: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YES"))); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString("YES")); break; default: aRow[18] = new ORowSetValueDecorator(::rtl::OUString()); @@ -275,7 +275,7 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo( ODatabaseMetaDataResultSet::ORow aRow(14); aRow[5] = new ORowSetValueDecorator(::rtl::OUString()); - aRow[10] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("A"))); + aRow[10] = new ORowSetValueDecorator(::rtl::OUString("A")); Reference< XIndexesSupplier> xTable; ::cppu::extractInterface(xTable,xNames->getByName(table)); @@ -337,7 +337,7 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo( { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getURL" ); ::osl::MutexGuard aGuard( m_aMutex ); - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:")) + m_pConnection->getURL(); + return ::rtl::OUString("sdbc:dbase:") + m_pConnection->getURL(); } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) @@ -388,7 +388,7 @@ sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly( ) throw(SQLException, Run ::osl::MutexGuard aGuard( m_aMutex ); sal_Bool bReadOnly = sal_False; - static ::rtl::OUString sReadOnly( RTL_CONSTASCII_USTRINGPARAM( "IsReadOnly" )); + static ::rtl::OUString sReadOnly( "IsReadOnly" ); ::ucbhelper::Content aFile(m_pConnection->getContent(),Reference< XCommandEnvironment >()); aFile.getPropertyValue(sReadOnly) >>= bReadOnly; diff --git a/connectivity/source/drivers/dbase/DDriver.cxx b/connectivity/source/drivers/dbase/DDriver.cxx index 1c49ef06e4bc..86d622ae39b4 100644 --- a/connectivity/source/drivers/dbase/DDriver.cxx +++ b/connectivity/source/drivers/dbase/DDriver.cxx @@ -45,7 +45,7 @@ using namespace ::com::sun::star::lang; //------------------------------------------------------------------------------ rtl::OUString ODriver::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.dbase.ODriver")); + return rtl::OUString("com.sun.star.comp.sdbc.dbase.ODriver"); } //------------------------------------------------------------------ @@ -79,7 +79,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(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:")),11); + return !url.compareTo(::rtl::OUString("sdbc:dbase:"),11); } // ----------------------------------------------------------------------------- Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) @@ -89,28 +89,28 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const ::rtl::O ::std::vector< DriverPropertyInfo > aDriverInfo; Sequence< ::rtl::OUString > aBoolean(2); - aBoolean[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")); - aBoolean[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("1")); + aBoolean[0] = ::rtl::OUString("0"); + aBoolean[1] = ::rtl::OUString("1"); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet of the database.")) + ::rtl::OUString("CharSet") + ,::rtl::OUString("CharSet of the database.") ,sal_False ,::rtl::OUString() ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowDeleted")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Display inactive records.")) + ::rtl::OUString("ShowDeleted") + ,::rtl::OUString("Display inactive records.") ,sal_False - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")) + ,::rtl::OUString("0") ,aBoolean) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EnableSQL92Check")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Use SQL92 naming constraints.")) + ::rtl::OUString("EnableSQL92Check") + ,::rtl::OUString("Use SQL92 naming constraints.") ,sal_False - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")) + ,::rtl::OUString("0") ,aBoolean) ); return Sequence< DriverPropertyInfo >(&(aDriverInfo[0]),aDriverInfo.size()); diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index 458afcc9a0f6..0d2c84634a3d 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -377,7 +377,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(RTL_CONSTASCII_USTRINGPARAM(".ndx")); + sDir += ::rtl::OUString(".ndx"); return sDir; } //------------------------------------------------------------------ @@ -390,7 +390,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(RTL_CONSTASCII_USTRINGPARAM(".inf")); + sCfgFile += ::rtl::OUString(".inf"); rtl::OUString sPhysicalPath; LocalFileHelper::ConvertURLToPhysicalName(sCfgFile,sPhysicalPath); @@ -433,7 +433,7 @@ sal_Bool ODbaseIndex::DropImpl() ::rtl::OUString sCfgFile(m_pTable->getConnection()->getURL()); sCfgFile += OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELIMITER); sCfgFile += m_pTable->getName(); - sCfgFile += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".inf")); + sCfgFile += ::rtl::OUString(".inf"); rtl::OUString sPhysicalPath; OSL_VERIFY_RES( LocalFileHelper::ConvertURLToPhysicalName(sCfgFile, sPhysicalPath), diff --git a/connectivity/source/drivers/dbase/DIndexes.cxx b/connectivity/source/drivers/dbase/DIndexes.cxx index cc721dec65bd..9ba9b5c25f0e 100644 --- a/connectivity/source/drivers/dbase/DIndexes.cxx +++ b/connectivity/source/drivers/dbase/DIndexes.cxx @@ -51,7 +51,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(RTL_CONSTASCII_USTRINGPARAM(".ndx")); + sFile += ::rtl::OUString(".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 4e473a0bb936..7207a3a796db 100644 --- a/connectivity/source/drivers/dbase/DResultSet.cxx +++ b/connectivity/source/drivers/dbase/DResultSet.cxx @@ -57,14 +57,14 @@ ODbaseResultSet::ODbaseResultSet( OStatement_Base* pStmt,connectivity::OSQLParse // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL ODbaseResultSet::getImplementationName( ) throw ( RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.dbase.ResultSet")); + return ::rtl::OUString("com.sun.star.sdbcx.dbase.ResultSet"); } // ------------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL ODbaseResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< ::rtl::OUString > aSupported(2); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet")); - aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.ResultSet")); + aSupported[0] = ::rtl::OUString("com.sun.star.sdbc.ResultSet"); + aSupported[1] = ::rtl::OUString("com.sun.star.sdbcx.ResultSet"); return aSupported; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 3213aee9b004..18d531e168f5 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -358,13 +358,13 @@ OSL_TRACE("column type: %c",aDBFColumn.db_typ); { case 'C': eType = DataType::VARCHAR; - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")); + aTypeName = ::rtl::OUString("VARCHAR"); break; case 'F': - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DECIMAL")); + aTypeName = ::rtl::OUString("DECIMAL"); case 'N': if ( aDBFColumn.db_typ == 'N' ) - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMERIC")); + aTypeName = ::rtl::OUString("NUMERIC"); eType = DataType::DECIMAL; // for numeric fields two characters more are written, than the precision of the column description predescribes, @@ -374,40 +374,40 @@ OSL_TRACE("column type: %c",aDBFColumn.db_typ); break; case 'L': eType = DataType::BIT; - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BOOLEAN")); + aTypeName = ::rtl::OUString("BOOLEAN"); break; case 'Y': bIsCurrency = sal_True; eType = DataType::DOUBLE; - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOUBLE")); + aTypeName = ::rtl::OUString("DOUBLE"); break; case 'D': eType = DataType::DATE; - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE")); + aTypeName = ::rtl::OUString("DATE"); break; case 'T': eType = DataType::TIMESTAMP; - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP")); + aTypeName = ::rtl::OUString("TIMESTAMP"); break; case 'I': eType = DataType::INTEGER; - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INTEGER")); + aTypeName = ::rtl::OUString("INTEGER"); break; case 'M': if ( bFoxPro && ( aDBFColumn.db_frei2[0] & 0x04 ) == 0x04 ) { eType = DataType::LONGVARBINARY; - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LONGVARBINARY")); + aTypeName = ::rtl::OUString("LONGVARBINARY"); } else { - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LONGVARCHAR")); + aTypeName = ::rtl::OUString("LONGVARCHAR"); eType = DataType::LONGVARCHAR; } nPrecision = 2147483647; break; case 'P': - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LONGVARBINARY")); + aTypeName = ::rtl::OUString("LONGVARBINARY"); eType = DataType::LONGVARBINARY; nPrecision = 2147483647; break; @@ -415,12 +415,12 @@ OSL_TRACE("column type: %c",aDBFColumn.db_typ); case 'B': if ( m_aHeader.db_typ == VisualFoxPro || m_aHeader.db_typ == VisualFoxProAuto ) { - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOUBLE")); + aTypeName = ::rtl::OUString("DOUBLE"); eType = DataType::DOUBLE; } else { - aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LONGVARBINARY")); + aTypeName = ::rtl::OUString("LONGVARBINARY"); eType = DataType::LONGVARBINARY; nPrecision = 2147483647; } @@ -627,7 +627,7 @@ String ODbaseTable::getEntry(OConnection* _pConnection,const ::rtl::OUString& _s ::rtl::OUString sName; ::rtl::OUString sExt; INetURLObject aURL; - static const ::rtl::OUString s_sSeparator(RTL_CONSTASCII_USTRINGPARAM("/")); + static const ::rtl::OUString s_sSeparator("/"); xDir->beforeFirst(); while(xDir->next()) { @@ -1049,7 +1049,7 @@ sal_Bool ODbaseTable::CreateImpl() { ::rtl::OUString aIdent = m_pConnection->getContent()->getIdentifier()->getContentIdentifier(); if ( aIdent.lastIndexOf('/') != (aIdent.getLength()-1) ) - aIdent += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aIdent += ::rtl::OUString("/"); aIdent += m_Name; aName = aIdent.getStr(); } @@ -1088,7 +1088,7 @@ sal_Bool ODbaseTable::CreateImpl() try { Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>()); - aContent.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")),bool2any( sal_True ) ); + aContent.executeCommand( rtl::OUString("delete"),bool2any( sal_True ) ); } catch(const Exception&) // an exception is thrown when no file exists { @@ -1116,7 +1116,7 @@ sal_Bool ODbaseTable::CreateImpl() try { Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>()); - aMemoContent.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")),bool2any( sal_True ) ); + aMemoContent.executeCommand( rtl::OUString("delete"),bool2any( sal_True ) ); } catch(const Exception&) { @@ -1132,7 +1132,7 @@ sal_Bool ODbaseTable::CreateImpl() { aURL.setExtension(aExt); // kill dbf file Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>()); - aMemoContent.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")),bool2any( sal_True ) ); + aMemoContent.executeCommand( rtl::OUString("delete"),bool2any( sal_True ) ); return sal_False; } m_aHeader.db_typ = dBaseIIIMemo; @@ -1470,7 +1470,7 @@ sal_Bool ODbaseTable::Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMem try { ::ucbhelper::Content aDeleteContent( aURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment > () ); - aDeleteContent.executeCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), makeAny( sal_Bool( sal_True ) ) ); + aDeleteContent.executeCommand( ::rtl::OUString("delete"), makeAny( sal_Bool( sal_True ) ) ); } catch(const Exception&) { @@ -2314,7 +2314,7 @@ namespace { ::rtl::OUString aIdent = _pConenction->getContent()->getIdentifier()->getContentIdentifier(); if ( aIdent.lastIndexOf('/') != (aIdent.getLength()-1) ) - aIdent += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aIdent += ::rtl::OUString("/"); aIdent += oldName; aName = aIdent; } @@ -2331,11 +2331,11 @@ namespace Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>()); Sequence< PropertyValue > aProps( 1 ); - aProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + aProps[0].Name = ::rtl::OUString("Title"); aProps[0].Handle = -1; // n/a aProps[0].Value = makeAny( ::rtl::OUString(sNewName) ); Sequence< Any > aValues; - aContent.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setPropertyValues")),makeAny(aProps) ) >>= aValues; + aContent.executeCommand( rtl::OUString("setPropertyValues"),makeAny(aProps) ) >>= aValues; if(aValues.getLength() && aValues[0].hasValue()) throw Exception(); } @@ -2496,7 +2496,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(RTL_CONSTASCII_USTRINGPARAM("/")); + aIdent += ::rtl::OUString("/"); String sTempName(aIdent); String sExt; sExt.AssignAscii("."); diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx index 73ba90731561..9505569b5aab 100644 --- a/connectivity/source/drivers/dbase/DTables.cxx +++ b/connectivity/source/drivers/dbase/DTables.cxx @@ -55,7 +55,7 @@ using namespace ::com::sun::star::container; sdbcx::ObjectType ODbaseTables::createObject(const ::rtl::OUString& _rName) { ODbaseTable* pRet = new ODbaseTable(this,(ODbaseConnection*)static_cast<OFileCatalog&>(m_rParent).getConnection(), - _rName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE"))); + _rName,::rtl::OUString("TABLE")); sdbcx::ObjectType xRet = pRet; pRet->construct(); diff --git a/connectivity/source/drivers/evoab2/NCatalog.cxx b/connectivity/source/drivers/evoab2/NCatalog.cxx index f505dc67970a..c8ccbc9076a0 100644 --- a/connectivity/source/drivers/evoab2/NCatalog.cxx +++ b/connectivity/source/drivers/evoab2/NCatalog.cxx @@ -52,9 +52,9 @@ void OEvoabCatalog::refreshTables() { TStringVector aVector; Sequence< ::rtl::OUString > aTypes(1); - aTypes[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE")); + aTypes[0] = ::rtl::OUString("TABLE"); Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),aTypes); + ::rtl::OUString("%"),::rtl::OUString("%"),aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx index 815e752c4f7e..13976328b28d 100644 --- a/connectivity/source/drivers/evoab2/NConnection.cxx +++ b/connectivity/source/drivers/evoab2/NConnection.cxx @@ -53,12 +53,12 @@ using namespace ::com::sun::star::lang; { ::rtl::OUString aExceptionType = aExceptionType_; if( aExceptionType.getLength() == 0 ) - aExceptionType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown")) ; + aExceptionType = ::rtl::OUString("Unknown") ; - ::rtl::OUString aTypeLine( RTL_CONSTASCII_USTRINGPARAM("\nType: " ) ); + ::rtl::OUString aTypeLine( "\nType: " ); aTypeLine += aExceptionType; - ::rtl::OUString aMessageLine( RTL_CONSTASCII_USTRINGPARAM("\nMessage: " ) ); + ::rtl::OUString aMessageLine( "\nMessage: " ); aMessageLine += ::rtl::OUString( e.Message ); ::rtl::OUString aMsg(aTypeLine); diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx index 0a89e589f909..d8322b0ee31b 100644 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx @@ -198,9 +198,9 @@ namespace connectivity switch( getFieldType( nCol ) ) { case DataType::BIT: - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BIT")); + return ::rtl::OUString("BIT"); case DataType::VARCHAR: - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")); + return ::rtl::OUString("VARCHAR"); default: break; } @@ -268,9 +268,9 @@ ODatabaseMetaDataResultSet::ORows& OEvoabDatabaseMetaData::getColumnRows( const // **************************************************** // Catalog - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(""))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("")); // Schema - aRow[2] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(""))); + aRow[2] = new ORowSetValueDecorator(::rtl::OUString("")); // COLUMN_SIZE aRow[7] = new ORowSetValueDecorator(s_nCOLUMN_SIZE); // BUFFER_LENGTH, not used @@ -292,10 +292,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(RTL_CONSTASCII_USTRINGPARAM("YES"))); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString("YES")); - aRow[3] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE"))); + aRow[3] = new ORowSetValueDecorator(::rtl::OUString("TABLE")); ::osl::MutexGuard aGuard( m_aMutex ); initFields(); @@ -449,7 +449,7 @@ sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsNonNullableColumns( ) throw(S ::rtl::OUString OEvoabDatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { // normally this is " - ::rtl::OUString aVal(RTL_CONSTASCII_USTRINGPARAM("\"")); + ::rtl::OUString aVal("\""); return aVal; } // ------------------------------------------------------------------------- @@ -1002,7 +1002,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(RTL_CONSTASCII_USTRINGPARAM("TABLE")), + ::rtl::OUString("TABLE"), // Currently we only support a 'TABLE' nothing more complex }; ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes); @@ -1041,7 +1041,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(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString("VARCHAR"))); aRow.push_back(new ORowSetValueDecorator(DataType::VARCHAR)); aRow.push_back(new ORowSetValueDecorator((sal_Int32)s_nCHAR_OCTET_LENGTH)); aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue()); @@ -1063,7 +1063,7 @@ Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( ) aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("VARCHAR")); aRow[2] = new ORowSetValueDecorator(DataType::VARCHAR); aRow[3] = new ORowSetValueDecorator((sal_Int32)65535); aRows.push_back(aRow); @@ -1096,7 +1096,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_CONSTASCII_USTRINGPARAM("TABLE")); + const ::rtl::OUString aTable("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 70c39f80dbe9..a0af2aa78676 100644 --- a/connectivity/source/drivers/evoab2/NDriver.cxx +++ b/connectivity/source/drivers/evoab2/NDriver.cxx @@ -89,7 +89,7 @@ void OEvoabDriver::disposing() //------------------------------------------------------------------------------ rtl::OUString OEvoabDriver::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(EVOAB_DRIVER_IMPL_NAME)); + return rtl::OUString(EVOAB_DRIVER_IMPL_NAME); // this name is referenced in the configuration and in the evoab.xml // Please take care when changing it. } @@ -100,7 +100,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(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); + aSNS[0] = ::rtl::OUString("com.sun.star.sdbc.Driver"); return aSNS; } //------------------------------------------------------------------ diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx index c6d4ca9dd80d..bd09987ef08b 100644 --- a/connectivity/source/drivers/evoab2/NResultSet.cxx +++ b/connectivity/source/drivers/evoab2/NResultSet.cxx @@ -75,13 +75,13 @@ namespace ErrorCondition = ::com::sun::star::sdb::ErrorCondition; //------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL OEvoabResultSet::getImplementationName( ) throw ( RuntimeException) \ { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.evoab.ResultSet")); + return ::rtl::OUString("com.sun.star.sdbcx.evoab.ResultSet"); } // ------------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL OEvoabResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet")); + aSupported[0] = ::rtl::OUString("com.sun.star.sdbc.ResultSet"); return aSupported; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx index 88996b1ad0e8..47552d1ecd42 100644 --- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx @@ -51,7 +51,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_CONSTASCII_USTRINGPARAM("Name")); + static const ::rtl::OUString aName("Name"); for (aIter = xColumns->get().begin(); aIter != xColumns->get().end(); ++aIter) { @@ -131,7 +131,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(RTL_CONSTASCII_USTRINGPARAM("TABLE")); + return m_aTableName;//::rtl::OUString("TABLE"); } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OEvoabResultSetMetaData::getCatalogName( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx index 7ed97080370d..bff971b26f44 100644 --- a/connectivity/source/drivers/evoab2/NStatement.cxx +++ b/connectivity/source/drivers/evoab2/NStatement.cxx @@ -382,7 +382,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(RTL_CONSTASCII_USTRINGPARAM("")) ); + rtl::OUString("") ); } 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 8f7416ac349f..c28e8c199b8a 100644 --- a/connectivity/source/drivers/evoab2/NTables.cxx +++ b/connectivity/source/drivers/evoab2/NTables.cxx @@ -56,10 +56,10 @@ using namespace dbtools; ObjectType OEvoabTables::createObject(const ::rtl::OUString& aName) { - ::rtl::OUString aSchema( RTL_CONSTASCII_USTRINGPARAM( "%" )); + ::rtl::OUString aSchema( "%" ); Sequence< ::rtl::OUString > aTypes(1); - aTypes[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE")); + aTypes[0] = ::rtl::OUString("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 52daf9468076..fd7ff2f335b3 100644 --- a/connectivity/source/drivers/file/FCatalog.cxx +++ b/connectivity/source/drivers/file/FCatalog.cxx @@ -70,7 +70,7 @@ void OFileCatalog::refreshTables() TStringVector aVector; Sequence< ::rtl::OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),aTypes); + ::rtl::OUString("%"),::rtl::OUString("%"),aTypes); fillNames(xResult,aVector); if(m_pTables) diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index 3ba887ad9b09..527b50e88f06 100644 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx @@ -176,7 +176,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(RTL_CONSTASCII_USTRINGPARAM("Title")); + pProps[ 0 ] = OUString("Title"); try { @@ -403,7 +403,7 @@ Reference< XDynamicResultSet > OConnection::getDir() const Reference<XDynamicResultSet> xContent; Sequence< ::rtl::OUString > aProps(1); ::rtl::OUString* pProps = aProps.getArray(); - pProps[ 0 ] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + pProps[ 0 ] = ::rtl::OUString("Title"); try { Reference<XContentIdentifier> xIdent = getContent()->getIdentifier(); @@ -446,7 +446,7 @@ void OConnection::throwUrlNotValid(const ::rtl::OUString & _rsUrl,const ::rtl::O "$URL$", _rsUrl ); - aError.SQLState = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")); + aError.SQLState = ::rtl::OUString("S1000"); aError.ErrorCode = 0; aError.Context = static_cast< XConnection* >(this); if (!_rsMessage.isEmpty()) diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index 5ab1320b16cd..6ae185edb68e 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -195,7 +195,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_CONSTASCII_USTRINGPARAM("TABLE")); + static const ::rtl::OUString aTable("TABLE"); sal_Bool bTableFound = sal_True; sal_Int32 nLength = types.getLength(); @@ -219,7 +219,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( Reference<XDynamicResultSet> xContent = m_pConnection->getDir(); Reference < XSortedDynamicResultSetFactory > xSRSFac( - m_pConnection->getDriver()->getFactory()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SortedDynamicResultSetFactory")) ), UNO_QUERY ); + m_pConnection->getDriver()->getFactory()->createInstance( ::rtl::OUString("com.sun.star.ucb.SortedDynamicResultSetFactory") ), UNO_QUERY ); Sequence< NumberedSortingInfo > aSortInfo( 1 ); NumberedSortingInfo* pInfo = aSortInfo.getArray(); @@ -249,7 +249,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( { aName = xRow->getString(1); aURL.SetSmartProtocol(INET_PROT_FILE); - String sUrl = m_pConnection->getURL() + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + aName; + String sUrl = m_pConnection->getURL() + ::rtl::OUString("/") + aName; aURL.SetSmartURL( sUrl ); sThisContentExtension = aURL.getExtension(); @@ -430,7 +430,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( aRow[2] = new ORowSetValueDecorator(*pBegin); aRow[6] = ODatabaseMetaDataResultSet::getSelectValue(); - aRow[7] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO"))); + aRow[7] = new ORowSetValueDecorator(::rtl::OUString("NO")); aRows.push_back(aRow); Reference< XPropertySet> xTable; @@ -549,7 +549,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLExc ::rtl::OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "ODatabaseMetaData::impl_getIdentifierQuoteString_throw" ); - static const ::rtl::OUString sQuote(RTL_CONSTASCII_USTRINGPARAM("\"")); + static const ::rtl::OUString sQuote("\""); return sQuote; } // ------------------------------------------------------------------------- @@ -709,7 +709,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLE { ODatabaseMetaDataResultSet::ORow aRow; aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE")))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString("TABLE"))); aRows.push_back(aRow); } pResult->setRows(aRows); @@ -971,7 +971,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQL ::rtl::OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "ODatabaseMetaData::getURL" ); - static const ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "sdbc:file:" )); + static const ::rtl::OUString aValue( "sdbc:file:" ); return aValue; } // ------------------------------------------------------------------------- @@ -1050,13 +1050,13 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeExc ::rtl::OUString SAL_CALL ODatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "ODatabaseMetaData::getStringFunctions" ); - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UCASE,LCASE,ASCII,LENGTH,OCTET_LENGTH,CHAR_LENGTH,CHARACTER_LENGTH,CHAR,CONCAT,LOCATE,SUBSTRING,LTRIM,RTRIM,SPACE,REPLACE,REPEAT,INSERT,LEFT,RIGHT")); + return ::rtl::OUString("UCASE,LCASE,ASCII,LENGTH,OCTET_LENGTH,CHAR_LENGTH,CHARACTER_LENGTH,CHAR,CONCAT,LOCATE,SUBSTRING,LTRIM,RTRIM,SPACE,REPLACE,REPEAT,INSERT,LEFT,RIGHT"); } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "ODatabaseMetaData::getTimeDateFunctions" ); - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DAYOFWEEK,DAYOFMONTH,DAYOFYEAR,MONTH,DAYNAME,MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,SECOND,CURDATE,CURTIME,NOW")); + return ::rtl::OUString("DAYOFWEEK,DAYOFMONTH,DAYOFYEAR,MONTH,DAYNAME,MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,SECOND,CURDATE,CURTIME,NOW"); } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException) @@ -1068,7 +1068,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeExc ::rtl::OUString SAL_CALL ODatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "ODatabaseMetaData::getNumericFunctions" ); - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ABS,SIGN,MOD,FLOOR,CEILING,ROUND,EXP,LN,LOG,LOG10,POWER,SQRT,PI,COS,SIN,TAN,ACOS,ASIN,ATAN,ATAN2,DEGREES,RADIANS")); + return ::rtl::OUString("ABS,SIGN,MOD,FLOOR,CEILING,ROUND,EXP,LN,LOG,LOG10,POWER,SQRT,PI,COS,SIN,TAN,ACOS,ASIN,ATAN,ATAN2,DEGREES,RADIANS"); } // ------------------------------------------------------------------------- sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx index 6f481ec0e7c0..153288ece6c2 100644 --- a/connectivity/source/drivers/file/FDriver.cxx +++ b/connectivity/source/drivers/file/FDriver.cxx @@ -73,14 +73,14 @@ void OFileDriver::disposing() //------------------------------------------------------------------------------ rtl::OUString OFileDriver::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.driver.file.Driver")); + return rtl::OUString("com.sun.star.sdbc.driver.file.Driver"); } //------------------------------------------------------------------------------ Sequence< ::rtl::OUString > OFileDriver::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(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.Driver")); + aSNS[0] = ::rtl::OUString("com.sun.star.sdbc.Driver"); + aSNS[1] = ::rtl::OUString("com.sun.star.sdbcx.Driver"); return aSNS; } @@ -127,7 +127,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(RTL_CONSTASCII_USTRINGPARAM("sdbc:file:")),10)); + return (!url.compareTo(::rtl::OUString("sdbc:file:"),10)); } // -------------------------------------------------------------------------------- Sequence< DriverPropertyInfo > SAL_CALL OFileDriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) @@ -138,47 +138,47 @@ Sequence< DriverPropertyInfo > SAL_CALL OFileDriver::getPropertyInfo( const ::rt ::std::vector< DriverPropertyInfo > aDriverInfo; Sequence< ::rtl::OUString > aBoolean(2); - aBoolean[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")); - aBoolean[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("1")); + aBoolean[0] = ::rtl::OUString("0"); + aBoolean[1] = ::rtl::OUString("1"); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet of the database.")) + ::rtl::OUString("CharSet") + ,::rtl::OUString("CharSet of the database.") ,sal_False ,::rtl::OUString() ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Extension")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Extension of the file format.")) + ::rtl::OUString("Extension") + ,::rtl::OUString("Extension of the file format.") ,sal_False - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".*")) + ,::rtl::OUString(".*") ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowDeleted")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Display inactive records.")) + ::rtl::OUString("ShowDeleted") + ,::rtl::OUString("Display inactive records.") ,sal_False - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")) + ,::rtl::OUString("0") ,aBoolean) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EnableSQL92Check")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Use SQL92 naming constraints.")) + ::rtl::OUString("EnableSQL92Check") + ,::rtl::OUString("Use SQL92 naming constraints.") ,sal_False - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")) + ,::rtl::OUString("0") ,aBoolean) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseRelativePath")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Handle the connection url as relative path.")) + ::rtl::OUString("UseRelativePath") + ,::rtl::OUString("Handle the connection url as relative path.") ,sal_False - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")) + ,::rtl::OUString("0") ,aBoolean) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The URL of the database document which is used to create an absolute path.")) + ::rtl::OUString("URL") + ,::rtl::OUString("The URL of the database document which is used to create an absolute path.") ,sal_False ,::rtl::OUString() ,Sequence< ::rtl::OUString >()) diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index 62bce35848e7..f01cc558a8f0 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -101,7 +101,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(RTL_CONSTASCII_USTRINGPARAM("%"))); + m_SchemaName,m_Name,::rtl::OUString("%")); if(xResult.is()) { diff --git a/connectivity/source/drivers/flat/ECatalog.cxx b/connectivity/source/drivers/flat/ECatalog.cxx index 80c63203cb10..508916a24b59 100644 --- a/connectivity/source/drivers/flat/ECatalog.cxx +++ b/connectivity/source/drivers/flat/ECatalog.cxx @@ -53,7 +53,7 @@ void OFlatCatalog::refreshTables() TStringVector aVector; Sequence< ::rtl::OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),aTypes); + ::rtl::OUString("%"),::rtl::OUString("%"),aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx index f9f24111e8e2..cd45585491a6 100644 --- a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx +++ b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx @@ -78,7 +78,7 @@ Reference< XResultSet > OFlatDatabaseMetaData::impl_getTypeInfo_throw( ) ODatabaseMetaDataResultSet::ORow aRow; aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CHAR")))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString("CHAR"))); aRow.push_back(new ORowSetValueDecorator(DataType::CHAR)); aRow.push_back(new ORowSetValueDecorator((sal_Int32)254)); aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue()); @@ -99,60 +99,60 @@ Reference< XResultSet > OFlatDatabaseMetaData::impl_getTypeInfo_throw( ) aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("LONGVARCHAR"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("DATE"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("TIME"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("BOOL"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("DECIMAL"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("DOUBLE"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("NUMERIC"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("NUMERIC")); aRow[2] = new ORowSetValueDecorator(DataType::NUMERIC); aRow[3] = new ORowSetValueDecorator((sal_Int32)20); aRow[15] = new ORowSetValueDecorator((sal_Int32)20); @@ -232,10 +232,10 @@ Reference< XResultSet > SAL_CALL OFlatDatabaseMetaData::getColumns( switch(sal_Int32(aRow[11]->getValue())) { case ColumnValue::NO_NULLS: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO"))); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString("NO")); break; case ColumnValue::NULLABLE: - aRow[18] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YES"))); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString("YES")); break; default: aRow[18] = new ORowSetValueDecorator(::rtl::OUString()); @@ -257,7 +257,7 @@ Reference< XResultSet > SAL_CALL OFlatDatabaseMetaData::getColumns( { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "flat", "Ocke.Janssen@sun.com", "OFlatDatabaseMetaData::getURL" ); ::osl::MutexGuard aGuard( m_aMutex ); - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:flat:")) + m_pConnection->getURL(); + return ::rtl::OUString("sdbc:flat:") + m_pConnection->getURL(); } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/flat/EDriver.cxx b/connectivity/source/drivers/flat/EDriver.cxx index 29252ce50ff0..e61463f56e7e 100644 --- a/connectivity/source/drivers/flat/EDriver.cxx +++ b/connectivity/source/drivers/flat/EDriver.cxx @@ -48,7 +48,7 @@ using namespace ::com::sun::star::lang; //------------------------------------------------------------------------------ rtl::OUString ODriver::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.flat.ODriver")); + return rtl::OUString("com.sun.star.comp.sdbc.flat.ODriver"); } //------------------------------------------------------------------ @@ -83,7 +83,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(RTL_CONSTASCII_USTRINGPARAM("sdbc:flat:")),10) == 0; + return url.compareTo(::rtl::OUString("sdbc:flat:"),10) == 0; } // ----------------------------------------------------------------------------- Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) @@ -93,42 +93,42 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const ::rtl::O ::std::vector< DriverPropertyInfo > aDriverInfo; Sequence< ::rtl::OUString > aBoolean(2); - aBoolean[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")); - aBoolean[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("1")); + aBoolean[0] = ::rtl::OUString("0"); + aBoolean[1] = ::rtl::OUString("1"); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FieldDelimiter")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Field separator.")) + ::rtl::OUString("FieldDelimiter") + ,::rtl::OUString("Field separator.") ,sal_False ,::rtl::OUString() ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HeaderLine")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Text contains headers.")) + ::rtl::OUString("HeaderLine") + ,::rtl::OUString("Text contains headers.") ,sal_False - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")) + ,::rtl::OUString("0") ,aBoolean) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StringDelimiter")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Text separator.")) + ::rtl::OUString("StringDelimiter") + ,::rtl::OUString("Text separator.") ,sal_False - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")) + ,::rtl::OUString("0") ,aBoolean) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DecimalDelimiter")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Decimal separator.")) + ::rtl::OUString("DecimalDelimiter") + ,::rtl::OUString("Decimal separator.") ,sal_False - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")) + ,::rtl::OUString("0") ,aBoolean) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ThousandDelimiter")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Thousands separator.")) + ::rtl::OUString("ThousandDelimiter") + ,::rtl::OUString("Thousands separator.") ,sal_False - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")) + ,::rtl::OUString("0") ,aBoolean) ); return ::comphelper::concatSequences(OFileDriver::getPropertyInfo(url,info ), diff --git a/connectivity/source/drivers/flat/EResultSet.cxx b/connectivity/source/drivers/flat/EResultSet.cxx index 3303bb57c02c..72754595ad98 100644 --- a/connectivity/source/drivers/flat/EResultSet.cxx +++ b/connectivity/source/drivers/flat/EResultSet.cxx @@ -54,14 +54,14 @@ OFlatResultSet::OFlatResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTr // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OFlatResultSet::getImplementationName( ) throw ( RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.flat.ResultSet")); + return ::rtl::OUString("com.sun.star.sdbcx.flat.ResultSet"); } // ------------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL OFlatResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< ::rtl::OUString > aSupported(2); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet")); - aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.ResultSet")); + aSupported[0] = ::rtl::OUString("com.sun.star.sdbc.ResultSet"); + aSupported[1] = ::rtl::OUString("com.sun.star.sdbcx.ResultSet"); return aSupported; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index e70e4dabe03b..b7f61ed89ba5 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -323,13 +323,13 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x if(io_nPrecisions) { io_nType = DataType::DECIMAL; - static const ::rtl::OUString s_sDECIMAL(RTL_CONSTASCII_USTRINGPARAM("DECIMAL")); + static const ::rtl::OUString s_sDECIMAL("DECIMAL"); o_sTypeName = s_sDECIMAL; } else { io_nType = DataType::DOUBLE; - static const ::rtl::OUString s_sDOUBLE(RTL_CONSTASCII_USTRINGPARAM("DOUBLE")); + static const ::rtl::OUString s_sDOUBLE("DOUBLE"); o_sTypeName = s_sDOUBLE; } } @@ -348,21 +348,21 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x case NUMBERFORMAT_DATE: io_nType = DataType::DATE; { - static const ::rtl::OUString s_sDATE(RTL_CONSTASCII_USTRINGPARAM("DATE")); + static const ::rtl::OUString s_sDATE("DATE"); o_sTypeName = s_sDATE; } break; case NUMBERFORMAT_DATETIME: io_nType = DataType::TIMESTAMP; { - static const ::rtl::OUString s_sTIMESTAMP(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP")); + static const ::rtl::OUString s_sTIMESTAMP("TIMESTAMP"); o_sTypeName = s_sTIMESTAMP; } break; case NUMBERFORMAT_TIME: io_nType = DataType::TIME; { - static const ::rtl::OUString s_sTIME(RTL_CONSTASCII_USTRINGPARAM("TIME")); + static const ::rtl::OUString s_sTIME("TIME"); o_sTypeName = s_sTIME; } break; @@ -371,7 +371,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x io_nPrecisions = 0; // nyi: Data can be longer! io_nScales = 0; { - static const ::rtl::OUString s_sVARCHAR(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")); + static const ::rtl::OUString s_sVARCHAR("VARCHAR"); o_sTypeName = s_sVARCHAR; } }; @@ -429,11 +429,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(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); + Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(m_pConnection->getDriver()->getFactory()->createInstanceWithArguments(::rtl::OUString("com.sun.star.util.NumberFormatsSupplier"),aArg),UNO_QUERY); + m_xNumberFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(m_pConnection->getDriver()->getFactory()->createInstance(::rtl::OUString("com.sun.star.util.NumberFormatter")),UNO_QUERY); m_xNumberFormatter->attachNumberFormatsSupplier(xSupplier); Reference<XPropertySet> xProp(xSupplier->getNumberFormatSettings(),UNO_QUERY); - xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NullDate"))) >>= m_aNullDate; + xProp->getPropertyValue(::rtl::OUString("NullDate")) >>= m_aNullDate; INetURLObject aURL; aURL.SetURL(getEntry()); @@ -478,7 +478,7 @@ String OFlatTable::getEntry() INetURLObject aURL; xDir->beforeFirst(); - static const ::rtl::OUString s_sSeparator(RTL_CONSTASCII_USTRINGPARAM("/")); + static const ::rtl::OUString s_sSeparator("/"); while(xDir->next()) { sName = xRow->getString(1); diff --git a/connectivity/source/drivers/flat/ETables.cxx b/connectivity/source/drivers/flat/ETables.cxx index 1a07d1f8e283..e5ce151c5ae7 100644 --- a/connectivity/source/drivers/flat/ETables.cxx +++ b/connectivity/source/drivers/flat/ETables.cxx @@ -51,7 +51,7 @@ using namespace ::com::sun::star::container; sdbcx::ObjectType OFlatTables::createObject(const ::rtl::OUString& _rName) { OFlatTable* pRet = new OFlatTable(this,(OFlatConnection*)static_cast<OFileCatalog&>(m_rParent).getConnection(), - _rName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE"))); + _rName,::rtl::OUString("TABLE")); sdbcx::ObjectType xRet = pRet; pRet->construct(); return xRet; diff --git a/connectivity/source/drivers/hsqldb/HColumns.cxx b/connectivity/source/drivers/hsqldb/HColumns.cxx index 42e1c851e0c6..cffa73069cf4 100644 --- a/connectivity/source/drivers/hsqldb/HColumns.cxx +++ b/connectivity/source/drivers/hsqldb/HColumns.cxx @@ -64,7 +64,7 @@ OHSQLColumn::OHSQLColumn( sal_Bool _bCase) // ------------------------------------------------------------------------- void OHSQLColumn::construct() { - m_sAutoIncrement = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IDENTITY")); + m_sAutoIncrement = ::rtl::OUString("IDENTITY"); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, ::getCppuType(&m_sAutoIncrement)); } // ----------------------------------------------------------------------------- @@ -81,7 +81,7 @@ void OHSQLColumn::construct() Sequence< ::rtl::OUString > SAL_CALL OHSQLColumn::getSupportedServiceNames( ) throw(RuntimeException) { Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.Column")); + aSupported[0] = ::rtl::OUString("com.sun.star.sdbcx.Column"); return aSupported; } diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 8aebe8e09b7e..cd3c8db59999 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -138,8 +138,8 @@ namespace connectivity { if ( !m_xDriver.is() ) { - ::rtl::OUString sURL(RTL_CONSTASCII_USTRINGPARAM("jdbc:hsqldb:db")); - Reference<XDriverAccess> xDriverAccess(m_xFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.DriverManager")) ),UNO_QUERY); + ::rtl::OUString sURL("jdbc:hsqldb:db"); + Reference<XDriverAccess> xDriverAccess(m_xFactory->createInstance(::rtl::OUString("com.sun.star.sdbc.DriverManager") ),UNO_QUERY); OSL_ENSURE(xDriverAccess.is(),"Could not load driver manager!"); if ( xDriverAccess.is() ) m_xDriver = xDriverAccess->getDriverByURL(sURL); @@ -231,42 +231,42 @@ namespace connectivity ::rtl::OUString sKey = StorageContainer::registerStorage( xStorage, sConnPartURL ); aProperties.put( "storage_key", sKey ); aProperties.put( "storage_class_name", - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdbcx.comp.hsqldb.StorageAccess" ) ) ); + ::rtl::OUString( "com.sun.star.sdbcx.comp.hsqldb.StorageAccess" ) ); aProperties.put( "fileaccess_class_name", - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdbcx.comp.hsqldb.StorageFileAccess" ) ) ); + ::rtl::OUString( "com.sun.star.sdbcx.comp.hsqldb.StorageFileAccess" ) ); // JDBC driver and driver's classpath aProperties.put( "JavaDriverClass", - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.hsqldb.jdbcDriver" ) ) ); + ::rtl::OUString( "org.hsqldb.jdbcDriver" ) ); aProperties.put( "JavaDriverClassPath", ::rtl::OUString( #ifdef SYSTEM_HSQLDB - RTL_CONSTASCII_USTRINGPARAM(HSQLDB_JAR - " vnd.sun.star.expand:$BRAND_BASE_DIR/program/classes/sdbc_hsqldb.jar" ) + HSQLDB_JAR + " vnd.sun.star.expand:$BRAND_BASE_DIR/program/classes/sdbc_hsqldb.jar" #else - RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.expand:$BRAND_BASE_DIR/program/classes/hsqldb.jar" - " vnd.sun.star.expand:$BRAND_BASE_DIR/program/classes/sdbc_hsqldb.jar" ) + "vnd.sun.star.expand:$BRAND_BASE_DIR/program/classes/hsqldb.jar" + " vnd.sun.star.expand:$BRAND_BASE_DIR/program/classes/sdbc_hsqldb.jar" #endif ) ); // auto increment handling aProperties.put( "IsAutoRetrievingEnabled", true ); aProperties.put( "AutoRetrievingStatement", - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CALL IDENTITY()" ) ) ); + ::rtl::OUString( "CALL IDENTITY()" ) ); aProperties.put( "IgnoreDriverPrivileges", true ); // don't want to expose HSQLDB's schema capabilities which exist since 1.8.0RC10 aProperties.put( "default_schema", - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) ); + ::rtl::OUString( "true" ) ); // security: permitted Java classes NamedValue aPermittedClasses( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "hsqldb.method_class_names" ) ), + ::rtl::OUString( "hsqldb.method_class_names" ), makeAny( lcl_getPermittedJavaMethods_nothrow( m_xFactory ) ) ); aProperties.put( "SystemProperties", Sequence< NamedValue >( &aPermittedClasses, 1 ) ); - const ::rtl::OUString sProperties( RTL_CONSTASCII_USTRINGPARAM( "properties" ) ); + const ::rtl::OUString sProperties( "properties" ); ::rtl::OUString sMessage; try { @@ -332,17 +332,17 @@ namespace connectivity if ( xProp.is() ) { sal_Int32 nMode = 0; - xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OpenMode"))) >>= nMode; + xProp->getPropertyValue(::rtl::OUString("OpenMode")) >>= nMode; if ( (nMode & ElementModes::WRITE) != ElementModes::WRITE ) { - aProperties.put( "readonly", ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) ); + aProperties.put( "readonly", ::rtl::OUString( "true" ) ); } } Sequence< PropertyValue > aConnectionArgs; aProperties >>= aConnectionArgs; - ::rtl::OUString sConnectURL(RTL_CONSTASCII_USTRINGPARAM("jdbc:hsqldb:")); + ::rtl::OUString sConnectURL("jdbc:hsqldb:"); sConnectURL += sConnPartURL; Reference<XConnection> xOrig; @@ -382,7 +382,7 @@ namespace connectivity static Reference< XTerminateListener> s_xTerminateListener; if( !s_xTerminateListener.is() ) { - Reference< XDesktop > xDesktop( m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ), UNO_QUERY ); + Reference< XDesktop > xDesktop( m_xFactory->createInstance( ::rtl::OUString("com.sun.star.frame.Desktop") ), UNO_QUERY ); if( xDesktop.is() ) { @@ -421,24 +421,24 @@ namespace connectivity return Sequence< DriverPropertyInfo >(); ::std::vector< DriverPropertyInfo > aDriverInfo; aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Storage")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Defines the storage where the database will be stored.")) + ::rtl::OUString("Storage") + ,::rtl::OUString("Defines the storage where the database will be stored.") ,sal_True ,::rtl::OUString() ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Defines the url of the data source.")) + ::rtl::OUString("URL") + ,::rtl::OUString("Defines the url of the data source.") ,sal_True ,::rtl::OUString() ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoRetrievingStatement")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Defines the statement which will be executed to retrieve auto increment values.")) + ::rtl::OUString("AutoRetrievingStatement") + ,::rtl::OUString("Defines the statement which will be executed to retrieve auto increment values.") ,sal_False - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CALL IDENTITY()")) + ,::rtl::OUString("CALL IDENTITY()") ,Sequence< ::rtl::OUString >()) ); return Sequence< DriverPropertyInfo >(&aDriverInfo[0],aDriverInfo.size()); @@ -500,14 +500,14 @@ namespace connectivity //------------------------------------------------------------------------------ rtl::OUString ODriverDelegator::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.comp.hsqldb.Driver")); + return rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.Driver")); + aSNS[0] = ::rtl::OUString("com.sun.star.sdbc.Driver"); + aSNS[1] = ::rtl::OUString("com.sun.star.sdbcx.Driver"); return aSNS; } //------------------------------------------------------------------ @@ -551,12 +551,12 @@ namespace connectivity Reference<XStatement> xStmt = _xConnection->createStatement(); if ( xStmt.is() ) { - Reference<XResultSet> xRes(xStmt->executeQuery(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT COUNT(*) FROM INFORMATION_SCHEMA.SYSTEM_SESSIONS WHERE USER_NAME ='SA'"))),UNO_QUERY); + Reference<XResultSet> xRes(xStmt->executeQuery(::rtl::OUString("SELECT COUNT(*) FROM INFORMATION_SCHEMA.SYSTEM_SESSIONS WHERE USER_NAME ='SA'")),UNO_QUERY); Reference<XRow> xRow(xRes,UNO_QUERY); if ( xRow.is() && xRes->next() ) bLastOne = xRow->getInt(1) == 1; if ( bLastOne ) - xStmt->execute(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SHUTDOWN"))); + xStmt->execute(::rtl::OUString("SHUTDOWN")); } } } @@ -661,7 +661,7 @@ namespace connectivity Reference< XStatement> xStmt = xConnection->createStatement(); OSL_ENSURE( xStmt.is(), "ODriverDelegator::preCommit: no statement!" ); if ( xStmt.is() ) - xStmt->execute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SET WRITE_DELAY 0" ) ) ); + xStmt->execute( ::rtl::OUString( "SET WRITE_DELAY 0" ) ); sal_Bool bPreviousAutoCommit = xConnection->getAutoCommit(); xConnection->setAutoCommit( sal_False ); @@ -669,7 +669,7 @@ namespace connectivity xConnection->setAutoCommit( bPreviousAutoCommit ); if ( xStmt.is() ) - xStmt->execute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SET WRITE_DELAY 60" ) ) ); + xStmt->execute( ::rtl::OUString( "SET WRITE_DELAY 60" ) ); } } catch(Exception&) @@ -832,7 +832,7 @@ namespace connectivity //.............................................................. ::rtl::OUString lcl_getSystemLocale( const Reference< XMultiServiceFactory >& _rxORB ) { - ::rtl::OUString sLocaleString = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "en-US" ) ); + ::rtl::OUString sLocaleString = ::rtl::OUString( "en-US" ); try { //......................................................... @@ -844,13 +844,13 @@ namespace connectivity // arguments for creating the config access Sequence< Any > aArguments(2); // the path to the node to open - ::rtl::OUString sNodePath(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup/L10N" )); - aArguments[0] <<= PropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")), 0, + ::rtl::OUString sNodePath("/org.openoffice.Setup/L10N" ); + aArguments[0] <<= PropertyValue( ::rtl::OUString("nodepath"), 0, makeAny( sNodePath ), PropertyState_DIRECT_VALUE ); // the depth: -1 means unlimited aArguments[1] <<= PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("depth")), 0, + ::rtl::OUString("depth"), 0, makeAny( (sal_Int32)-1 ), PropertyState_DIRECT_VALUE ); @@ -858,7 +858,7 @@ namespace connectivity // create the access Reference< XPropertySet > xNode( xConfigProvider->createInstanceWithArguments( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), + ::rtl::OUString("com.sun.star.configuration.ConfigurationAccess"), aArguments ), UNO_QUERY ); OSL_ENSURE( xNode.is(), "lcl_getSystemLocale: invalid access returned (should throw an exception instead)!" ); @@ -866,7 +866,7 @@ namespace connectivity //......................................................... // ask for the system locale setting if ( xNode.is() ) - xNode->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooSetupSystemLocale" ) ) ) >>= sLocaleString; + xNode->getPropertyValue( ::rtl::OUString( "ooSetupSystemLocale" ) ) >>= sLocaleString; } catch( const Exception& ) { diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 54fac5505cf1..df9446bd9e1e 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -215,10 +215,10 @@ void SAL_CALL OHSQLTable::alterColumnByName( const ::rtl::OUString& colName, con const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sSql = getAlterTableColumnPart(); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ALTER COLUMN ")); + sSql += ::rtl::OUString(" ALTER COLUMN "); sSql += ::dbtools::quoteName(sQuote,colName); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" RENAME TO ")); + sSql += ::rtl::OUString(" RENAME TO "); sSql += ::dbtools::quoteName(sQuote,sNewColumnName); executeStatement(sSql); @@ -271,7 +271,7 @@ void OHSQLTable::alterColumnType(sal_Int32 nNewType,const ::rtl::OUString& _rCol { ::rtl::OUString sSql = getAlterTableColumnPart(); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ALTER COLUMN ")); + sSql += ::rtl::OUString(" ALTER COLUMN "); #if OSL_DEBUG_LEVEL > 0 try { @@ -301,12 +301,12 @@ void OHSQLTable::alterColumnType(sal_Int32 nNewType,const ::rtl::OUString& _rCol void OHSQLTable::alterDefaultValue(const ::rtl::OUString& _sNewDefault,const ::rtl::OUString& _rColName) { ::rtl::OUString sSql = getAlterTableColumnPart(); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ALTER COLUMN ")); + sSql += ::rtl::OUString(" ALTER COLUMN "); const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); sSql += ::dbtools::quoteName(sQuote,_rColName); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" SET DEFAULT '")) + _sNewDefault; - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("'")); + sSql += ::rtl::OUString(" SET DEFAULT '") + _sNewDefault; + sSql += ::rtl::OUString("'"); executeStatement(sSql); } @@ -314,18 +314,18 @@ void OHSQLTable::alterDefaultValue(const ::rtl::OUString& _sNewDefault,const ::r void OHSQLTable::dropDefaultValue(const ::rtl::OUString& _rColName) { ::rtl::OUString sSql = getAlterTableColumnPart(); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ALTER COLUMN ")); + sSql += ::rtl::OUString(" ALTER COLUMN "); const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); sSql += ::dbtools::quoteName(sQuote,_rColName); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" DROP DEFAULT")); + sSql += ::rtl::OUString(" DROP DEFAULT"); executeStatement(sSql); } // ----------------------------------------------------------------------------- ::rtl::OUString OHSQLTable::getAlterTableColumnPart() { - ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " )); + ::rtl::OUString sSql( "ALTER TABLE " ); const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sComposedName( ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, sal_True, ::dbtools::eInTableDefinitions ) ); @@ -338,7 +338,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(RTL_CONSTASCII_USTRINGPARAM(")"))); + sSQL = sSQL.replaceAt(sSQL.getLength()-1,1,::rtl::OUString(")")); Reference< XStatement > xStmt = getConnection()->createStatement( ); if ( xStmt.is() ) @@ -389,11 +389,11 @@ void SAL_CALL OHSQLTable::rename( const ::rtl::OUString& newName ) throw(SQLExce if(!isNew()) { - ::rtl::OUString sSql = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ALTER ")); - if ( m_Type == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")) ) - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" VIEW ")); + ::rtl::OUString sSql = ::rtl::OUString("ALTER "); + if ( m_Type == ::rtl::OUString("VIEW") ) + sSql += ::rtl::OUString(" VIEW "); else - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" TABLE ")); + sSql += ::rtl::OUString(" TABLE "); ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); @@ -403,7 +403,7 @@ void SAL_CALL OHSQLTable::rename( const ::rtl::OUString& newName ) throw(SQLExce ::rtl::OUString sComposedName( ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, sal_True, ::dbtools::eInDataManipulation ) ); sSql += sComposedName - + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" RENAME TO ")); + + ::rtl::OUString(" RENAME TO "); sSql += ::dbtools::composeTableName( getMetaData(), sCatalog, sSchema, sTable, sal_True, ::dbtools::eInDataManipulation ); executeStatement(sSql); diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index 3b07ca284082..ecfe94ec6a29 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -60,9 +60,9 @@ sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName) ::rtl::OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); - static const ::rtl::OUString s_sTableTypeView(RTL_CONSTASCII_USTRINGPARAM("VIEW")); - static const ::rtl::OUString s_sTableTypeTable(RTL_CONSTASCII_USTRINGPARAM("TABLE")); - static const ::rtl::OUString s_sAll(RTL_CONSTASCII_USTRINGPARAM("%")); + static const ::rtl::OUString s_sTableTypeView("VIEW"); + static const ::rtl::OUString s_sTableTypeTable("TABLE"); + static const ::rtl::OUString s_sAll("%"); Sequence< ::rtl::OUString > sTableTypes(3); sTableTypes[0] = s_sTableTypeView; @@ -137,14 +137,14 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) ::rtl::OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData,_sElementName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); - ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP " )); + ::rtl::OUString aSql( "DROP " ); 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(RTL_CONSTASCII_USTRINGPARAM("VIEW"))))) // here we have a view - aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW ")); + if((bIsView = (xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == ::rtl::OUString("VIEW")))) // here we have a view + aSql += ::rtl::OUString("VIEW "); else - aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE ")); + aSql += ::rtl::OUString("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 7cc7ae68d368..7e18d179ec15 100644 --- a/connectivity/source/drivers/hsqldb/HUser.cxx +++ b/connectivity/source/drivers/hsqldb/HUser.cxx @@ -121,23 +121,23 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName, Any aCatalog; if ( !sCatalog.isEmpty() ) aCatalog <<= sCatalog; - xRes = xMeta->getColumnPrivileges(aCatalog,sSchema,sTable,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%"))); + xRes = xMeta->getColumnPrivileges(aCatalog,sSchema,sTable,::rtl::OUString("%")); } break; } if ( xRes.is() ) { - static const ::rtl::OUString sSELECT( RTL_CONSTASCII_USTRINGPARAM( "SELECT" )); - static const ::rtl::OUString sINSERT( RTL_CONSTASCII_USTRINGPARAM( "INSERT" )); - static const ::rtl::OUString sUPDATE( RTL_CONSTASCII_USTRINGPARAM( "UPDATE" )); - static const ::rtl::OUString sDELETE( RTL_CONSTASCII_USTRINGPARAM( "DELETE" )); - static const ::rtl::OUString sREAD( RTL_CONSTASCII_USTRINGPARAM( "READ" )); - static const ::rtl::OUString sCREATE( RTL_CONSTASCII_USTRINGPARAM( "CREATE" )); - static const ::rtl::OUString sALTER( RTL_CONSTASCII_USTRINGPARAM( "ALTER" )); - static const ::rtl::OUString sREFERENCE( RTL_CONSTASCII_USTRINGPARAM( "REFERENCE" )); - static const ::rtl::OUString sDROP( RTL_CONSTASCII_USTRINGPARAM( "DROP" )); - static const ::rtl::OUString sYes( RTL_CONSTASCII_USTRINGPARAM( "YES" )); + static const ::rtl::OUString sSELECT( "SELECT" ); + static const ::rtl::OUString sINSERT( "INSERT" ); + static const ::rtl::OUString sUPDATE( "UPDATE" ); + static const ::rtl::OUString sDELETE( "DELETE" ); + static const ::rtl::OUString sREAD( "READ" ); + static const ::rtl::OUString sCREATE( "CREATE" ); + static const ::rtl::OUString sALTER( "ALTER" ); + static const ::rtl::OUString sREFERENCE( "REFERENCE" ); + static const ::rtl::OUString sDROP( "DROP" ); + static const ::rtl::OUString sYes( "YES" ); nRightsWithGrant = nRights = 0; @@ -236,12 +236,12 @@ void SAL_CALL OHSQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_In if(!sPrivs.isEmpty()) { ::rtl::OUString sGrant; - sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GRANT ")); + sGrant += ::rtl::OUString("GRANT "); sGrant += sPrivs; - sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON ")); + sGrant += ::rtl::OUString(" ON "); Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); - sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" TO ")); + sGrant += ::rtl::OUString(" TO "); sGrant += m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -266,12 +266,12 @@ void SAL_CALL OHSQLUser::revokePrivileges( const ::rtl::OUString& objName, sal_I if(!sPrivs.isEmpty()) { ::rtl::OUString sGrant; - sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVOKE ")); + sGrant += ::rtl::OUString("REVOKE "); sGrant += sPrivs; - sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON ")); + sGrant += ::rtl::OUString(" ON "); Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); - sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FROM ")); + sGrant += ::rtl::OUString(" FROM "); sGrant += m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -287,11 +287,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(RTL_CONSTASCII_USTRINGPARAM("SET PASSWORD FOR ")); + sAlterPwd = ::rtl::OUString("SET PASSWORD FOR "); sAlterPwd += m_Name; - sAlterPwd += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("@\"%\" = PASSWORD('")) ; + sAlterPwd += ::rtl::OUString("@\"%\" = PASSWORD('") ; sAlterPwd += newPassword; - sAlterPwd += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("')")) ; + sAlterPwd += ::rtl::OUString("')") ; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -306,41 +306,41 @@ void SAL_CALL OHSQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/, { ::rtl::OUString sPrivs; if((nRights & Privilege::INSERT) == Privilege::INSERT) - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INSERT")); + sPrivs += ::rtl::OUString("INSERT"); if((nRights & Privilege::DELETE) == Privilege::DELETE) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DELETE")); + sPrivs += ::rtl::OUString(","); + sPrivs += ::rtl::OUString("DELETE"); } if((nRights & Privilege::UPDATE) == Privilege::UPDATE) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UPDATE")); + sPrivs += ::rtl::OUString(","); + sPrivs += ::rtl::OUString("UPDATE"); } if((nRights & Privilege::ALTER) == Privilege::ALTER) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ALTER")); + sPrivs += ::rtl::OUString(","); + sPrivs += ::rtl::OUString("ALTER"); } if((nRights & Privilege::SELECT) == Privilege::SELECT) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT")); + sPrivs += ::rtl::OUString(","); + sPrivs += ::rtl::OUString("SELECT"); } if((nRights & Privilege::REFERENCE) == Privilege::REFERENCE) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REFERENCES")); + sPrivs += ::rtl::OUString(","); + sPrivs += ::rtl::OUString("REFERENCES"); } return sPrivs; diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx b/connectivity/source/drivers/hsqldb/HUsers.cxx index 5252022b7575..3879e1d33778 100644 --- a/connectivity/source/drivers/hsqldb/HUsers.cxx +++ b/connectivity/source/drivers/hsqldb/HUsers.cxx @@ -77,18 +77,18 @@ Reference< XPropertySet > OUsers::createDescriptor() // XAppend sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "GRANT USAGE ON * TO " )); + ::rtl::OUString aSql( "GRANT USAGE ON * TO " ); ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sUserName( _rForName ); aSql += ::dbtools::quoteName(aQuote,sUserName) - + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" @\"%\" ")); + + ::rtl::OUString(" @\"%\" "); ::rtl::OUString sPassword; descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPassword; if ( !sPassword.isEmpty() ) { - aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" IDENTIFIED BY '")); + aSql += ::rtl::OUString(" IDENTIFIED BY '"); aSql += sPassword; - aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("'")); + aSql += ::rtl::OUString("'"); } Reference< XStatement > xStmt = m_xConnection->createStatement( ); @@ -103,7 +103,7 @@ sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const void OUsers::dropObject(sal_Int32 /*nPos*/,const ::rtl::OUString _sElementName) { { - ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "REVOKE ALL ON * FROM " )); + ::rtl::OUString aSql( "REVOKE ALL ON * FROM " ); ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); aSql += ::dbtools::quoteName(aQuote,_sElementName); diff --git a/connectivity/source/drivers/hsqldb/HViews.cxx b/connectivity/source/drivers/hsqldb/HViews.cxx index 5cf9b2090bdd..57b3fb0bd693 100644 --- a/connectivity/source/drivers/hsqldb/HViews.cxx +++ b/connectivity/source/drivers/hsqldb/HViews.cxx @@ -117,7 +117,7 @@ void HViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString /*_sElementName*/) sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); if (!bIsNew) { - ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP VIEW" )); + ::rtl::OUString aSql( "DROP VIEW" ); Reference<XPropertySet> xProp(xObject,UNO_QUERY); aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::eInTableDefinitions, false, false, true ); @@ -140,13 +140,13 @@ void HViews::createView( const Reference< XPropertySet >& descriptor ) { Reference<XConnection> xConnection = static_cast<OHCatalog&>(m_rParent).getConnection(); - ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE VIEW " )); + ::rtl::OUString aSql( "CREATE VIEW " ); ::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sCommand; aSql += ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true ); - aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" AS ")); + aSql += ::rtl::OUString(" AS "); descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_COMMAND)) >>= sCommand; aSql += sCommand; diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx index f10269fff2f6..cd24db2fbf82 100644 --- a/connectivity/source/drivers/jdbc/JDriver.cxx +++ b/connectivity/source/drivers/jdbc/JDriver.cxx @@ -63,7 +63,7 @@ java_sql_Driver::~java_sql_Driver() //------------------------------------------------------------------------------ rtl::OUString java_sql_Driver::getImplementationName_Static( ) throw(RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.JDBCDriver")); + return ::rtl::OUString("com.sun.star.comp.sdbc.JDBCDriver"); // this name is referenced in the configuration and in the jdbc.xml // Please take care when changing it. } @@ -71,7 +71,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(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); + aSNS[0] = ::rtl::OUString("com.sun.star.sdbc.Driver"); return aSNS; } //------------------------------------------------------------------ @@ -127,7 +127,7 @@ sal_Bool SAL_CALL java_sql_Driver::acceptsURL( const ::rtl::OUString& url ) thro // I feel responsible for all jdbc url's sal_Bool bEnabled = sal_False; OSL_VERIFY_EQUALS( jfw_getEnabled( &bEnabled ), JFW_E_NONE, "error in jfw_getEnabled" ); - static const ::rtl::OUString s_sJdbcPrefix( RTL_CONSTASCII_USTRINGPARAM( "jdbc:" )); + static const ::rtl::OUString s_sJdbcPrefix( "jdbc:" ); return bEnabled && 0 == url.compareTo(s_sJdbcPrefix, 5); } // ------------------------------------------------------------------------- @@ -139,96 +139,96 @@ Sequence< DriverPropertyInfo > SAL_CALL java_sql_Driver::getPropertyInfo( const ::std::vector< DriverPropertyInfo > aDriverInfo; Sequence< ::rtl::OUString > aBooleanValues(2); - aBooleanValues[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) ); - aBooleanValues[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ); + aBooleanValues[0] = ::rtl::OUString( "false" ); + aBooleanValues[1] = ::rtl::OUString( "true" ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JavaDriverClass")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The JDBC driver class name.")) + ::rtl::OUString("JavaDriverClass") + ,::rtl::OUString("The JDBC driver class name.") ,sal_True ,::rtl::OUString() ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JavaDriverClassPath")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The class path where to look for the JDBC driver.")) + ::rtl::OUString("JavaDriverClassPath") + ,::rtl::OUString("The class path where to look for the JDBC driver.") ,sal_True - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "" ) ) + ,::rtl::OUString( "" ) ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SystemProperties")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Additional properties to set at java.lang.System before loading the driver.")) + ::rtl::OUString("SystemProperties") + ,::rtl::OUString("Additional properties to set at java.lang.System before loading the driver.") ,sal_True - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "" ) ) + ,::rtl::OUString( "" ) ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParameterNameSubstitution")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Change named parameters with '?'.")) + ::rtl::OUString("ParameterNameSubstitution") + ,::rtl::OUString("Change named parameters with '?'.") ,sal_False - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) ) + ,::rtl::OUString( "false" ) ,aBooleanValues) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IgnoreDriverPrivileges")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ignore the privileges from the database driver.")) + ::rtl::OUString("IgnoreDriverPrivileges") + ,::rtl::OUString("Ignore the privileges from the database driver.") ,sal_False - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) ) + ,::rtl::OUString( "false" ) ,aBooleanValues) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsAutoRetrievingEnabled")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Retrieve generated values.")) + ::rtl::OUString("IsAutoRetrievingEnabled") + ,::rtl::OUString("Retrieve generated values.") ,sal_False - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) ) + ,::rtl::OUString( "false" ) ,aBooleanValues) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoRetrievingStatement")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Auto-increment statement.")) + ::rtl::OUString("AutoRetrievingStatement") + ,::rtl::OUString("Auto-increment statement.") ,sal_False ,::rtl::OUString() ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GenerateASBeforeCorrelationName")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Generate AS before table correlation names.")) + ::rtl::OUString("GenerateASBeforeCorrelationName") + ,::rtl::OUString("Generate AS before table correlation names.") ,sal_False - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) + ,::rtl::OUString( "true" ) ,aBooleanValues) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IgnoreCurrency")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ignore the currency field from the ResultsetMetaData.")) + ::rtl::OUString("IgnoreCurrency") + ,::rtl::OUString("Ignore the currency field from the ResultsetMetaData.") ,sal_False - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) ) + ,::rtl::OUString( "false" ) ,aBooleanValues) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EscapeDateTime")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Escape date time format.")) + ::rtl::OUString("EscapeDateTime") + ,::rtl::OUString("Escape date time format.") ,sal_False - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) + ,::rtl::OUString( "true" ) ,aBooleanValues) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TypeInfoSettings")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Defines how the type info of the database metadata should be manipulated.")) + ::rtl::OUString("TypeInfoSettings") + ,::rtl::OUString("Defines how the type info of the database metadata should be manipulated.") ,sal_False ,::rtl::OUString( ) ,Sequence< ::rtl::OUString > ()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImplicitCatalogRestriction")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The catalog which should be used in getTables calls, when the caller passed NULL.")) + ::rtl::OUString("ImplicitCatalogRestriction") + ,::rtl::OUString("The catalog which should be used in getTables calls, when the caller passed NULL.") ,sal_False ,::rtl::OUString( ) ,Sequence< ::rtl::OUString > ()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImplicitSchemaRestriction")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The schema which should be used in getTables calls, when the caller passed NULL.")) + ::rtl::OUString("ImplicitSchemaRestriction") + ,::rtl::OUString("The schema which should be used in getTables calls, when the caller passed NULL.") ,sal_False ,::rtl::OUString( ) ,Sequence< ::rtl::OUString > ()) diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx index 8077ce6c747d..c7cc73492761 100644 --- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx +++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx @@ -218,7 +218,7 @@ sal_Bool SAL_CALL KabDatabaseMetaData::supportsNonNullableColumns( ) throw(SQLE ::rtl::OUString SAL_CALL KabDatabaseMetaData::getIdentifierQuoteString( ) throw(SQLException, RuntimeException) { // normally this is " - ::rtl::OUString aVal(RTL_CONSTASCII_USTRINGPARAM("\"")); + ::rtl::OUString aVal("\""); return aVal; } // ------------------------------------------------------------------------- @@ -565,7 +565,7 @@ sal_Bool SAL_CALL KabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(S { // if someday we support more than the default address book, // this method should return the URL which was used to create it - ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "sdbc:address:kab:" )); + ::rtl::OUString aValue( "sdbc:address:kab:" ); return aValue; } // ------------------------------------------------------------------------- @@ -577,13 +577,13 @@ sal_Bool SAL_CALL KabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(S // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL KabDatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { - ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "kab" )); + ::rtl::OUString aValue( "kab" ); return aValue; } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL KabDatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException) { - ::rtl::OUString aValue(RTL_CONSTASCII_USTRINGPARAM(KAB_DRIVER_VERSION)); + ::rtl::OUString aValue(KAB_DRIVER_VERSION); return aValue; } // ------------------------------------------------------------------------- @@ -790,7 +790,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTableTypes( ) throw(SQ Reference< XResultSet > xRef = pResult; static ODatabaseMetaDataResultSet::ORows aRows; - static const ::rtl::OUString aTable(RTL_CONSTASCII_USTRINGPARAM("TABLE")); + static const ::rtl::OUString aTable("TABLE"); if (aRows.empty()) { @@ -814,7 +814,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTypeInfo( ) throw(SQLE ODatabaseMetaDataResultSet::ORow aRow(19); aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue(); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CHAR"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("CHAR")); aRow[2] = new ORowSetValueDecorator(DataType::CHAR); aRow[3] = new ORowSetValueDecorator((sal_Int32) 254); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); @@ -885,7 +885,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(RTL_CONSTASCII_USTRINGPARAM("YES"))); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString("YES")); sal_Int32 nPosition = 1; QString aQtName; @@ -897,7 +897,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumns( { aRow[4] = new ORowSetValueDecorator(sName); aRow[5] = new ORowSetValueDecorator(DataType::TIMESTAMP); - aRow[6] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString("TIMESTAMP")); aRow[17] = new ORowSetValueDecorator(nPosition++); aRows.push_back(aRow); } @@ -915,7 +915,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumns( { aRow[4] = new ORowSetValueDecorator(sName); aRow[5] = new ORowSetValueDecorator(DataType::CHAR); - aRow[6] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CHAR"))); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString("CHAR")); aRow[7] = new ORowSetValueDecorator((sal_Int32) 256); // Might be VARCHAR and not CHAR[256]... aRow[17] = new ORowSetValueDecorator(nPosition); @@ -939,7 +939,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_CONSTASCII_USTRINGPARAM("TABLE")); + static const ::rtl::OUString aTable("TABLE"); sal_Bool bTableFound = sal_False; const ::rtl::OUString* p = types.getConstArray(), * pEnd = p + types.getLength(); @@ -1012,7 +1012,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getVersionColumns( aRow[2] = new ORowSetValueDecorator(sName); aRow[3] = new ORowSetValueDecorator(DataType::TIMESTAMP); - aRow[4] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); + aRow[4] = new ORowSetValueDecorator(::rtl::OUString("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 5e57981f21bf..b79383a40253 100644 --- a/connectivity/source/drivers/kab/KDriver.cxx +++ b/connectivity/source/drivers/kab/KDriver.cxx @@ -130,7 +130,7 @@ bool KabImplModule::impl_loadModule() OSL_ENSURE( !m_hConnectorModule && !m_pConnectionFactoryFunc && !m_pApplicationInitFunc && !m_pApplicationShutdownFunc && !m_pKDEVersionCheckFunc, "KabImplModule::impl_loadModule: inconsistence: inconsistency (never attempted load before, but some values already set)!"); - const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM( SAL_MODULENAME( "kabdrv1" ) )); + const ::rtl::OUString sModuleName( SAL_MODULENAME( "kabdrv1" )); m_hConnectorModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, SAL_LOADMODULE_NOW ); // LAZY! #i61335# OSL_ENSURE( m_hConnectorModule, "KabImplModule::impl_loadModule: could not load the implementation library!" ); if ( !m_hConnectorModule ) @@ -196,17 +196,17 @@ bool KabImplModule::impl_doAllowNewKDEVersion() comphelper::getComponentContext( m_xORB ) ) ); Sequence< Any > aCreationArgs(1); aCreationArgs[0] <<= PropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ), + ::rtl::OUString( "nodepath" ), 0, makeAny( KabDriver::impl_getConfigurationSettingsPath() ), PropertyState_DIRECT_VALUE ); Reference< XPropertySet > xSettings( xConfigProvider->createInstanceWithArguments( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" ) ), + ::rtl::OUString( "com.sun.star.configuration.ConfigurationAccess" ), aCreationArgs ), UNO_QUERY_THROW ); sal_Bool bDisableCheck = sal_False; - xSettings->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableKDEMaximumVersionCheck" ) ) ) >>= bDisableCheck; + xSettings->getPropertyValue( ::rtl::OUString( "DisableKDEMaximumVersionCheck" ) ) >>= bDisableCheck; return bDisableCheck != sal_False; } @@ -244,7 +244,7 @@ void KabImplModule::impl_throwGenericSQLException( const ::rtl::OUString& _rMess { SQLException aError; aError.Message = _rMessage; - aError.SQLState = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "S1000" ) ); + aError.SQLState = ::rtl::OUString( "S1000" ); aError.ErrorCode = 0; throw aError; } @@ -260,7 +260,7 @@ void KabImplModule::impl_throwKdeTooNewException() "$major$",::rtl::OUString::valueOf((sal_Int32)MIN_KDE_VERSION_MAJOR), "$minor$",::rtl::OUString::valueOf((sal_Int32)MIN_KDE_VERSION_MINOR) ); - aError.SQLState = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "S1000" ) ); + aError.SQLState = ::rtl::OUString( "S1000" ); aError.ErrorCode = 0; SQLContext aDetails; @@ -326,7 +326,7 @@ KabDriver::KabDriver( try { Reference< XDesktop > xDesktop( - m_xMSFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ) ), + m_xMSFactory->createInstance( ::rtl::OUString( "com.sun.star.frame.Desktop" ) ), UNO_QUERY_THROW ); xDesktop->addTerminateListener( this ); } @@ -364,7 +364,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(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); + aSNS[0] = ::rtl::OUString("com.sun.star.sdbc.Driver"); return aSNS; } @@ -422,7 +422,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(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:kab:")), 16)); + return (!url.compareTo(::rtl::OUString("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 69e6116553eb..feb74f3ffc86 100644 --- a/connectivity/source/drivers/kab/KResultSetMetaData.cxx +++ b/connectivity/source/drivers/kab/KResultSetMetaData.cxx @@ -50,7 +50,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_CONSTASCII_USTRINGPARAM("Name")); + static const ::rtl::OUString aName("Name"); for (aIter = xColumns->get().begin(); aIter != xColumns->get().end(); ++aIter) { diff --git a/connectivity/source/drivers/macab/MacabAddressBook.cxx b/connectivity/source/drivers/macab/MacabAddressBook.cxx index 41baf6244c0c..4a1df78fea0f 100644 --- a/connectivity/source/drivers/macab/MacabAddressBook.cxx +++ b/connectivity/source/drivers/macab/MacabAddressBook.cxx @@ -79,7 +79,7 @@ const ::rtl::OUString & MacabAddressBook::getDefaultTableName() { /* This string probably needs to be localized. */ static const ::rtl::OUString aDefaultTableName - (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Address Book"))); + (::rtl::OUString("Address Book")); return aDefaultTableName; } @@ -245,9 +245,9 @@ void MacabAddressBook::manageDuplicateGroups(::std::vector<MacabGroup *> _xGroup if(count != 1) { ::rtl::OUString sName = (*iter1)->getName(); - sName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" (")) + + sName += ::rtl::OUString(" (") + ::rtl::OUString::valueOf(count) + - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")")); + ::rtl::OUString(")"); (*iter1)->setName(sName); } } diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx index 865c90632059..8e8bd1bad1a8 100644 --- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx @@ -215,7 +215,7 @@ sal_Bool SAL_CALL MacabDatabaseMetaData::supportsNonNullableColumns( ) throw(SQ ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getIdentifierQuoteString( ) throw(SQLException, RuntimeException) { // normally this is " - ::rtl::OUString aVal(RTL_CONSTASCII_USTRINGPARAM("\"")); + ::rtl::OUString aVal("\""); return aVal; } // ------------------------------------------------------------------------- @@ -562,7 +562,7 @@ sal_Bool SAL_CALL MacabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw { // if someday we support more than the default address book, // this method should return the URL which was used to create it - ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "sdbc:address:macab:" )); + ::rtl::OUString aValue( "sdbc:address:macab:" ); return aValue; } // ------------------------------------------------------------------------- @@ -574,13 +574,13 @@ sal_Bool SAL_CALL MacabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { - ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "macab" )); + ::rtl::OUString aValue( "macab" ); return aValue; } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException) { - ::rtl::OUString aValue(RTL_CONSTASCII_USTRINGPARAM(MACAB_DRIVER_VERSION)); + ::rtl::OUString aValue(MACAB_DRIVER_VERSION); return aValue; } // ------------------------------------------------------------------------- @@ -787,7 +787,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTableTypes( ) throw( Reference< XResultSet > xRef = pResult; static ODatabaseMetaDataResultSet::ORows aRows; - static const ::rtl::OUString aTable(RTL_CONSTASCII_USTRINGPARAM("TABLE")); + static const ::rtl::OUString aTable("TABLE"); if (aRows.empty()) { @@ -812,7 +812,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(RTL_CONSTASCII_USTRINGPARAM("CHAR"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("CHAR")); aRow[2] = new ORowSetValueDecorator(DataType::CHAR); aRow[3] = new ORowSetValueDecorator((sal_Int32) 254); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); @@ -833,20 +833,20 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTypeInfo( ) throw(SQ aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("INTEGER"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("FLOAT"))); + aRow[1] = new ORowSetValueDecorator(::rtl::OUString("FLOAT")); aRow[2] = new ORowSetValueDecorator(DataType::FLOAT); aRow[3] = new ORowSetValueDecorator((sal_Int32)20); aRow[15] = new ORowSetValueDecorator((sal_Int32)15); @@ -907,7 +907,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(RTL_CONSTASCII_USTRINGPARAM("YES"))); + aRow[18] = new ORowSetValueDecorator(::rtl::OUString("YES")); sal_Int32 nPosition = 1; ::rtl::OUString sName; @@ -928,24 +928,24 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumns( { case kABStringProperty: aRow[5] = new ORowSetValueDecorator(DataType::CHAR); - aRow[6] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CHAR"))); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString("TIMESTAMP")); aRows.push_back(aRow); break; case kABIntegerProperty: aRow[5] = new ORowSetValueDecorator(DataType::INTEGER); - aRow[6] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INTEGER"))); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString("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(RTL_CONSTASCII_USTRINGPARAM("FLOAT"))); + aRow[6] = new ORowSetValueDecorator(::rtl::OUString("FLOAT")); aRow[7] = new ORowSetValueDecorator((sal_Int32) 15); aRows.push_back(aRow); break; @@ -972,7 +972,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_CONSTASCII_USTRINGPARAM("TABLE")); + static const ::rtl::OUString aTable("TABLE"); sal_Bool bTableFound = sal_False; const ::rtl::OUString* p = types.getConstArray(), * pEnd = p + types.getLength(); @@ -1054,7 +1054,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(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"))); + aRow[4] = new ORowSetValueDecorator(::rtl::OUString("TIMESTAMP")); aRow[5] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[6] = ODatabaseMetaDataResultSet::getEmptyValue(); diff --git a/connectivity/source/drivers/macab/MacabRecords.cxx b/connectivity/source/drivers/macab/MacabRecords.cxx index d8879756d3f9..3f679a2acac5 100644 --- a/connectivity/source/drivers/macab/MacabRecords.cxx +++ b/connectivity/source/drivers/macab/MacabRecords.cxx @@ -566,7 +566,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert multiLabelString = CFStringToOUString(localizedMultiLabel); CFRelease(multiLabel); CFRelease(localizedMultiLabel); - headerNameString = multiPropertyString + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) + fixLabel(multiLabelString); + headerNameString = multiPropertyString + ::rtl::OUString(": ") + fixLabel(multiLabelString); headerNames[i] = new macabfield; headerNames[i]->value = OUStringToCFString(headerNameString); headerNames[i]->type = multiType; @@ -617,7 +617,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert if(multiValue && multiLabel) { localizedMultiLabel = ABCopyLocalizedPropertyOrLabel(multiLabel); - multiLabelString = multiPropertyString + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) + fixLabel(CFStringToOUString(localizedMultiLabel)); + multiLabelString = multiPropertyString + ::rtl::OUString(": ") + fixLabel(CFStringToOUString(localizedMultiLabel)); CFRelease(multiLabel); CFRelease(localizedMultiLabel); multiLabel = OUStringToCFString(multiLabelString); @@ -705,7 +705,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert dictType = (ABPropertyType) getABTypeFromCFType( CFGetTypeID(dictValues[i]) ); localizedDictKey = ABCopyLocalizedPropertyOrLabel(dictKeys[i]); dictKeyString = CFStringToOUString(localizedDictKey); - dictLabelString = propertyNameString + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) + fixLabel(dictKeyString); + dictLabelString = propertyNameString + ::rtl::OUString(": ") + fixLabel(dictKeyString); dictLabel = OUStringToCFString(dictLabelString); dictHeaders[i] = createHeaderForProperty(dictType, dictValues[i], dictLabel); if (!dictHeaders[i]) @@ -845,7 +845,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(RTL_CONSTASCII_USTRINGPARAM(" (")) + ::rtl::OUString::valueOf(count) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")")); + newName += ::rtl::OUString(" (") + ::rtl::OUString::valueOf(count) + ::rtl::OUString(")"); _headerNames[i]->value = OUStringToCFString(newName); } } @@ -966,7 +966,7 @@ void MacabRecords::insertPropertyIntoMacabRecord(const ABPropertyType _propertyT { bPlaced = sal_False; i++; - columnName = ::rtl::OUString(_propertyName) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" (")) + ::rtl::OUString::valueOf(i) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")")); + columnName = ::rtl::OUString(_propertyName) + ::rtl::OUString(" (") + ::rtl::OUString::valueOf(i) + ::rtl::OUString(")"); } // success! @@ -1038,7 +1038,7 @@ void MacabRecords::insertPropertyIntoMacabRecord(const ABPropertyType _propertyT localizedDictKey = ABCopyLocalizedPropertyOrLabel(dictKeys[i]); dictKeyString = CFStringToOUString(localizedDictKey); CFRelease(localizedDictKey); - newPropertyName = _propertyName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) + fixLabel(dictKeyString); + newPropertyName = _propertyName + ::rtl::OUString(": ") + fixLabel(dictKeyString); insertPropertyIntoMacabRecord(_abrecord, _header, newPropertyName, dictValues[i]); } @@ -1081,7 +1081,7 @@ void MacabRecords::insertPropertyIntoMacabRecord(const ABPropertyType _propertyT localizedMultiLabel = ABCopyLocalizedPropertyOrLabel(multiLabel); multiLabelString = CFStringToOUString(localizedMultiLabel); - newPropertyName = _propertyName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) + fixLabel(multiLabelString); + newPropertyName = _propertyName + ::rtl::OUString(": ") + 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 c274aa2b1f61..f22158e31512 100644 --- a/connectivity/source/drivers/macab/MacabResultSet.cxx +++ b/connectivity/source/drivers/macab/MacabResultSet.cxx @@ -888,7 +888,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(RTL_CONSTASCII_USTRINGPARAM("UID"))); + macabfield *uidField = m_aMacabRecords->getField(m_nRowPos,::rtl::OUString("UID")); if(uidField != NULL) { if(uidField->type == kABStringProperty) @@ -910,7 +910,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(RTL_CONSTASCII_USTRINGPARAM("UID"))); + macabfield *uidField = m_aMacabRecords->getField(m_nRowPos,::rtl::OUString("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 d4fa11954339..5eb0463ce815 100644 --- a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx @@ -53,7 +53,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_CONSTASCII_USTRINGPARAM("Name")); + static const ::rtl::OUString aName("Name"); MacabRecords *aRecords; MacabHeader *aHeader; diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx index 6e11eb39aab8..c613faa78038 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx @@ -65,7 +65,7 @@ namespace aSecurity.getHomeDir( aConfigPath ); #endif - return aConfigPath + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + return aConfigPath + ::rtl::OUString("/"); } // ------------------------------------------------------------------- diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx index 33a2f3d8c62e..d3f67f87811c 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx @@ -60,7 +60,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce sal_uInt64 nSize = 0; osl_getFileSize(handle, &nSize); - OUString sectionName( RTL_CONSTASCII_USTRINGPARAM( "no name section" )); + OUString sectionName( "no name section" ); while (true) { sal_uInt64 nPos; @@ -91,7 +91,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce sectionName = OStringToOUString( line.copy(nIndexStart + 1,nIndexEnd - nIndexStart -1).trim(), RTL_TEXTENCODING_ASCII_US ); if (sectionName.isEmpty()) - sectionName = OUString(RTL_CONSTASCII_USTRINGPARAM("no name section")); + sectionName = OUString("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 49eec24696aa..d757e1d41c79 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx @@ -159,7 +159,7 @@ namespace connectivity #endif ::rtl::OUString regDir = getRegistryDir(product); ::rtl::OUString profilesIni( regDir ); - profilesIni += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("profiles.ini")); + profilesIni += ::rtl::OUString("profiles.ini"); IniParser parser( profilesIni ); IniSectionMap &mAllSection = *(parser.getAllSection()); diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx index d279c6b33c5b..6af5cf21da7c 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx @@ -76,7 +76,7 @@ void MNSTerminateListener::addTerminateListener() if( xFact.is() ) { - Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ), UNO_QUERY ); + Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString("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 b70d0b26e881..0d124a6a1b6a 100644 --- a/connectivity/source/drivers/mysql/YColumns.cxx +++ b/connectivity/source/drivers/mysql/YColumns.cxx @@ -64,7 +64,7 @@ OMySQLColumn::OMySQLColumn( sal_Bool _bCase) // ------------------------------------------------------------------------- void OMySQLColumn::construct() { - m_sAutoIncrement = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("auto_increment")); + m_sAutoIncrement = ::rtl::OUString("auto_increment"); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, ::getCppuType(&m_sAutoIncrement)); } // ----------------------------------------------------------------------------- @@ -81,7 +81,7 @@ void OMySQLColumn::construct() Sequence< ::rtl::OUString > SAL_CALL OMySQLColumn::getSupportedServiceNames( ) throw(RuntimeException) { Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.Column")); + aSupported[0] = ::rtl::OUString("com.sun.star.sdbcx.Column"); return aSupported; } diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx index 32ae159b329b..1a9d07e47ceb 100644 --- a/connectivity/source/drivers/mysql/YDriver.cxx +++ b/connectivity/source/drivers/mysql/YDriver.cxx @@ -111,7 +111,7 @@ namespace connectivity //-------------------------------------------------------------------- sal_Bool isNativeUrl(const ::rtl::OUString& _sUrl) { - return (!_sUrl.compareTo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:mysql:mysqlc:")), sizeof("sdbc:mysql:mysqlc:")-1)); + return (!_sUrl.compareTo(::rtl::OUString("sdbc:mysql:mysqlc:"), sizeof("sdbc:mysql:mysqlc:")-1)); } //-------------------------------------------------------------------- T_DRIVERTYPE lcl_getDriverType(const ::rtl::OUString& _sUrl) @@ -128,14 +128,14 @@ namespace connectivity { ::rtl::OUString sNewUrl = _sUrl.copy(11); if ( isOdbcUrl( _sUrl ) ) - sNewUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:")) + sNewUrl; + sNewUrl = ::rtl::OUString("sdbc:") + sNewUrl; else if ( isNativeUrl( _sUrl ) ) - sNewUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:")) + sNewUrl; + sNewUrl = ::rtl::OUString("sdbc:") + sNewUrl; else { sNewUrl = sNewUrl.copy(5); - ::rtl::OUString sTempUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("jdbc:mysql://")); + ::rtl::OUString sTempUrl = ::rtl::OUString("jdbc:mysql://"); sTempUrl += sNewUrl; sNewUrl = sTempUrl; @@ -145,7 +145,7 @@ namespace connectivity //-------------------------------------------------------------------- Reference< XDriver > lcl_loadDriver(const Reference< XMultiServiceFactory >& _rxFactory,const ::rtl::OUString& _sUrl) { - Reference<XDriverAccess> xDriverAccess(_rxFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.DriverManager")) ),UNO_QUERY); + Reference<XDriverAccess> xDriverAccess(_rxFactory->createInstance(::rtl::OUString("com.sun.star.sdbc.DriverManager") ),UNO_QUERY); OSL_ENSURE(xDriverAccess.is(),"Could not load driver manager!"); Reference< XDriver > xDriver; if ( xDriverAccess.is() ) @@ -168,12 +168,12 @@ namespace connectivity if ( _eType == D_ODBC ) { aProps.push_back( PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Silent")) + ::rtl::OUString("Silent") ,0 ,makeAny(sal_True) ,PropertyState_DIRECT_VALUE) ); aProps.push_back( PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PreventGetVersionColumns")) + ::rtl::OUString("PreventGetVersionColumns") ,0 ,makeAny(sal_True) ,PropertyState_DIRECT_VALUE) ); @@ -181,31 +181,31 @@ namespace connectivity else if ( _eType == D_JDBC ) { aProps.push_back( PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JavaDriverClass")) + ::rtl::OUString("JavaDriverClass") ,0 - ,makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.mysql.jdbc.Driver"))) + ,makeAny(::rtl::OUString("com.mysql.jdbc.Driver")) ,PropertyState_DIRECT_VALUE) ); } else { aProps.push_back( PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PublicConnectionURL")) + ::rtl::OUString("PublicConnectionURL") ,0 ,makeAny(_sUrl) ,PropertyState_DIRECT_VALUE) ); } aProps.push_back( PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsAutoRetrievingEnabled")) + ::rtl::OUString("IsAutoRetrievingEnabled") ,0 ,makeAny(sal_True) ,PropertyState_DIRECT_VALUE) ); aProps.push_back( PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoRetrievingStatement")) + ::rtl::OUString("AutoRetrievingStatement") ,0 - ,makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT LAST_INSERT_ID()"))) + ,makeAny(::rtl::OUString("SELECT LAST_INSERT_ID()")) ,PropertyState_DIRECT_VALUE) ); aProps.push_back( PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParameterNameSubstitution")) + ::rtl::OUString("ParameterNameSubstitution") ,0 ,makeAny(sal_True) ,PropertyState_DIRECT_VALUE) ); @@ -234,7 +234,7 @@ namespace connectivity else { ::comphelper::NamedValueCollection aSettings( info ); - ::rtl::OUString sDriverClass(RTL_CONSTASCII_USTRINGPARAM("com.mysql.jdbc.Driver")); + ::rtl::OUString sDriverClass("com.mysql.jdbc.Driver"); sDriverClass = aSettings.getOrDefault( "JavaDriverClass", sDriverClass ); TJDBCDrivers::iterator aFind = m_aJdbcDrivers.find(sDriverClass); @@ -272,18 +272,18 @@ namespace connectivity ::rtl::OUString sAdd; if ( RTL_TEXTENCODING_UTF8 == (*aLookup).getEncoding() ) { - static const ::rtl::OUString s_sCharSetOp(RTL_CONSTASCII_USTRINGPARAM("useUnicode=true&")); + static const ::rtl::OUString s_sCharSetOp("useUnicode=true&"); if ( !sCuttedUrl.matchIgnoreAsciiCase(s_sCharSetOp) ) { sAdd = s_sCharSetOp; } // if ( !sCuttedUrl.matchIgnoreAsciiCase(s_sCharSetOp) ) } // if ( RTL_TEXTENCODING_UTF8 == (*aLookup).getEncoding() ) if ( sCuttedUrl.indexOf('?') == -1 ) - sCuttedUrl += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?")); + sCuttedUrl += ::rtl::OUString("?"); else - sCuttedUrl += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&")); + sCuttedUrl += ::rtl::OUString("&"); sCuttedUrl += sAdd; - sCuttedUrl += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("characterEncoding=")); + sCuttedUrl += ::rtl::OUString("characterEncoding="); sCuttedUrl += sIanaName; } } @@ -329,32 +329,32 @@ namespace connectivity return Sequence< DriverPropertyInfo >(); Sequence< ::rtl::OUString > aBoolean(2); - aBoolean[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")); - aBoolean[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("1")); + aBoolean[0] = ::rtl::OUString("0"); + aBoolean[1] = ::rtl::OUString("1"); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet of the database.")) + ::rtl::OUString("CharSet") + ,::rtl::OUString("CharSet of the database.") ,sal_False ,::rtl::OUString() ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SuppressVersionColumns")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Display version columns (when available).")) + ::rtl::OUString("SuppressVersionColumns") + ,::rtl::OUString("Display version columns (when available).") ,sal_False - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")) + ,::rtl::OUString("0") ,aBoolean) ); const T_DRIVERTYPE eType = lcl_getDriverType( url ); if ( eType == D_JDBC ) { aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JavaDriverClass")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The JDBC driver class name.")) + ::rtl::OUString("JavaDriverClass") + ,::rtl::OUString("The JDBC driver class name.") ,sal_True - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.mysql.jdbc.Driver")) + ,::rtl::OUString("com.mysql.jdbc.Driver") ,Sequence< ::rtl::OUString >()) ); } @@ -442,14 +442,14 @@ namespace connectivity //------------------------------------------------------------------------------ rtl::OUString ODriverDelegator::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.drivers.MySQL.Driver")); + return rtl::OUString("org.openoffice.comp.drivers.MySQL.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(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.Driver")); + aSNS[0] = ::rtl::OUString("com.sun.star.sdbc.Driver"); + aSNS[1] = ::rtl::OUString("com.sun.star.sdbcx.Driver"); return aSNS; } //------------------------------------------------------------------ diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx index 1dba6792e81f..914f818417f3 100644 --- a/connectivity/source/drivers/mysql/YTable.cxx +++ b/connectivity/source/drivers/mysql/YTable.cxx @@ -69,7 +69,7 @@ namespace connectivity // ----------------------------------------------------------------------------- virtual ::rtl::OUString getDropForeignKey() const { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" DROP FOREIGN KEY ")); + return ::rtl::OUString(" DROP FOREIGN KEY "); } public: OMySQLKeysHelper( OTableHelper* _pTable, @@ -237,12 +237,12 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co ::rtl::OUString sTypeName; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPENAME)) >>= sTypeName; - static ::rtl::OUString s_sAutoIncrement(RTL_CONSTASCII_USTRINGPARAM("auto_increment")); + static ::rtl::OUString s_sAutoIncrement("auto_increment"); if ( bAutoIncrement ) { if ( sTypeName.indexOf(s_sAutoIncrement) == -1 ) { - sTypeName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); + sTypeName += ::rtl::OUString(" "); sTypeName += s_sAutoIncrement; } } @@ -280,10 +280,10 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co if ( !sNewColumnName.equalsIgnoreAsciiCase(colName) && !bColumnNameChanged ) { ::rtl::OUString sSql = getAlterTableColumnPart(); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" CHANGE ")); + sSql += ::rtl::OUString(" CHANGE "); const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); sSql += ::dbtools::quoteName(sQuote,colName); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); + sSql += ::rtl::OUString(" "); sSql += OTables::adjustSQL(::dbtools::createStandardColumnPart(descriptor,getConnection(),static_cast<OTables*>(m_pTables),getTypeCreatePattern())); executeStatement(sSql); } @@ -303,10 +303,10 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co void OMySQLTable::alterColumnType(sal_Int32 nNewType,const ::rtl::OUString& _rColName, const Reference<XPropertySet>& _xDescriptor) { ::rtl::OUString sSql = getAlterTableColumnPart(); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" CHANGE ")); + sSql += ::rtl::OUString(" CHANGE "); const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); sSql += ::dbtools::quoteName(sQuote,_rColName); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); + sSql += ::rtl::OUString(" "); OColumn* pColumn = new OColumn(sal_True); Reference<XPropertySet> xProp = pColumn; @@ -319,19 +319,19 @@ void OMySQLTable::alterColumnType(sal_Int32 nNewType,const ::rtl::OUString& _rCo // ----------------------------------------------------------------------------- ::rtl::OUString OMySQLTable::getTypeCreatePattern() const { - static const ::rtl::OUString s_sCreatePattern(RTL_CONSTASCII_USTRINGPARAM("(M,D)")); + static const ::rtl::OUString s_sCreatePattern("(M,D)"); return s_sCreatePattern; } // ----------------------------------------------------------------------------- void OMySQLTable::alterDefaultValue(const ::rtl::OUString& _sNewDefault,const ::rtl::OUString& _rColName) { ::rtl::OUString sSql = getAlterTableColumnPart(); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ALTER ")); + sSql += ::rtl::OUString(" ALTER "); const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); sSql += ::dbtools::quoteName(sQuote,_rColName); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" SET DEFAULT '")) + _sNewDefault; - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("'")); + sSql += ::rtl::OUString(" SET DEFAULT '") + _sNewDefault; + sSql += ::rtl::OUString("'"); executeStatement(sSql); } @@ -339,18 +339,18 @@ void OMySQLTable::alterDefaultValue(const ::rtl::OUString& _sNewDefault,const :: void OMySQLTable::dropDefaultValue(const ::rtl::OUString& _rColName) { ::rtl::OUString sSql = getAlterTableColumnPart(); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ALTER ")); + sSql += ::rtl::OUString(" ALTER "); const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); sSql += ::dbtools::quoteName(sQuote,_rColName); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" DROP DEFAULT")); + sSql += ::rtl::OUString(" DROP DEFAULT"); executeStatement(sSql); } // ----------------------------------------------------------------------------- ::rtl::OUString OMySQLTable::getAlterTableColumnPart() { - ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " )); + ::rtl::OUString sSql( "ALTER TABLE " ); const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sComposedName( @@ -364,7 +364,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(RTL_CONSTASCII_USTRINGPARAM(")"))); + sSQL = sSQL.replaceAt(sSQL.getLength()-1,1,::rtl::OUString(")")); Reference< XStatement > xStmt = getConnection()->createStatement( ); if ( xStmt.is() ) @@ -376,7 +376,7 @@ void OMySQLTable::executeStatement(const ::rtl::OUString& _rStatement ) // ----------------------------------------------------------------------------- ::rtl::OUString OMySQLTable::getRenameStart() const { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RENAME TABLE ")); + return ::rtl::OUString("RENAME TABLE "); } diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx index 2264ddb6914d..e77a22003fdc 100644 --- a/connectivity/source/drivers/mysql/YTables.cxx +++ b/connectivity/source/drivers/mysql/YTables.cxx @@ -60,9 +60,9 @@ sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName) ::rtl::OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); - static const ::rtl::OUString s_sTableTypeView(RTL_CONSTASCII_USTRINGPARAM("VIEW")); - static const ::rtl::OUString s_sTableTypeTable(RTL_CONSTASCII_USTRINGPARAM("TABLE")); - static const ::rtl::OUString s_sAll(RTL_CONSTASCII_USTRINGPARAM("%")); + static const ::rtl::OUString s_sTableTypeView("VIEW"); + static const ::rtl::OUString s_sTableTypeTable("TABLE"); + static const ::rtl::OUString s_sAll("%"); Sequence< ::rtl::OUString > sTableTypes(3); sTableTypes[0] = s_sTableTypeView; @@ -154,14 +154,14 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) ::rtl::OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData,_sElementName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); - ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP " )); + ::rtl::OUString aSql( "DROP " ); Reference<XPropertySet> xProp(xObject,UNO_QUERY); - sal_Bool bIsView = xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")); + sal_Bool bIsView = xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == ::rtl::OUString("VIEW"); if(bIsView) // here we have a view - aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW ")); + aSql += ::rtl::OUString("VIEW "); else - aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE ")); + aSql += ::rtl::OUString("TABLE "); ::rtl::OUString sComposedName( ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInDataManipulation ) ); @@ -185,7 +185,7 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) ::rtl::OUString OTables::adjustSQL(const ::rtl::OUString& _sSql) { ::rtl::OUString sSQL = _sSql; - static const ::rtl::OUString s_sUNSIGNED(RTL_CONSTASCII_USTRINGPARAM("UNSIGNED")); + static const ::rtl::OUString s_sUNSIGNED("UNSIGNED"); sal_Int32 nIndex = sSQL.indexOf(s_sUNSIGNED); while(nIndex != -1 ) { @@ -201,7 +201,7 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) void OTables::createTable( const Reference< XPropertySet >& descriptor ) { const Reference< XConnection > xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); - static const ::rtl::OUString s_sCreatePattern(RTL_CONSTASCII_USTRINGPARAM("(M,D)")); + static const ::rtl::OUString s_sCreatePattern("(M,D)"); const ::rtl::OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,this,s_sCreatePattern)); Reference< XStatement > xStmt = xConnection->createStatement( ); if ( xStmt.is() ) diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx index 575a6d076e07..f2dcf22eeed4 100644 --- a/connectivity/source/drivers/mysql/YUser.cxx +++ b/connectivity/source/drivers/mysql/YUser.cxx @@ -121,23 +121,23 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName Any aCatalog; if ( !sCatalog.isEmpty() ) aCatalog <<= sCatalog; - xRes = xMeta->getColumnPrivileges(aCatalog,sSchema,sTable,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%"))); + xRes = xMeta->getColumnPrivileges(aCatalog,sSchema,sTable,::rtl::OUString("%")); } break; } if ( xRes.is() ) { - static const ::rtl::OUString sSELECT( RTL_CONSTASCII_USTRINGPARAM( "SELECT" )); - static const ::rtl::OUString sINSERT( RTL_CONSTASCII_USTRINGPARAM( "INSERT" )); - static const ::rtl::OUString sUPDATE( RTL_CONSTASCII_USTRINGPARAM( "UPDATE" )); - static const ::rtl::OUString sDELETE( RTL_CONSTASCII_USTRINGPARAM( "DELETE" )); - static const ::rtl::OUString sREAD( RTL_CONSTASCII_USTRINGPARAM( "READ" )); - static const ::rtl::OUString sCREATE( RTL_CONSTASCII_USTRINGPARAM( "CREATE" )); - static const ::rtl::OUString sALTER( RTL_CONSTASCII_USTRINGPARAM( "ALTER" )); - static const ::rtl::OUString sREFERENCE( RTL_CONSTASCII_USTRINGPARAM( "REFERENCE" )); - static const ::rtl::OUString sDROP( RTL_CONSTASCII_USTRINGPARAM( "DROP" )); - static const ::rtl::OUString sYes( RTL_CONSTASCII_USTRINGPARAM( "YES" )); + static const ::rtl::OUString sSELECT( "SELECT" ); + static const ::rtl::OUString sINSERT( "INSERT" ); + static const ::rtl::OUString sUPDATE( "UPDATE" ); + static const ::rtl::OUString sDELETE( "DELETE" ); + static const ::rtl::OUString sREAD( "READ" ); + static const ::rtl::OUString sCREATE( "CREATE" ); + static const ::rtl::OUString sALTER( "ALTER" ); + static const ::rtl::OUString sREFERENCE( "REFERENCE" ); + static const ::rtl::OUString sDROP( "DROP" ); + static const ::rtl::OUString sYes( "YES" ); nRightsWithGrant = nRights = 0; @@ -235,12 +235,12 @@ void SAL_CALL OMySQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_I if(!sPrivs.isEmpty()) { ::rtl::OUString sGrant; - sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GRANT ")); + sGrant += ::rtl::OUString("GRANT "); sGrant += sPrivs; - sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON ")); + sGrant += ::rtl::OUString(" ON "); Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); - sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" TO ")); + sGrant += ::rtl::OUString(" TO "); sGrant += m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -265,12 +265,12 @@ void SAL_CALL OMySQLUser::revokePrivileges( const ::rtl::OUString& objName, sal_ if(!sPrivs.isEmpty()) { ::rtl::OUString sGrant; - sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVOKE ")); + sGrant += ::rtl::OUString("REVOKE "); sGrant += sPrivs; - sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON ")); + sGrant += ::rtl::OUString(" ON "); Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); - sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FROM ")); + sGrant += ::rtl::OUString(" FROM "); sGrant += m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -286,11 +286,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(RTL_CONSTASCII_USTRINGPARAM("SET PASSWORD FOR ")); + sAlterPwd = ::rtl::OUString("SET PASSWORD FOR "); sAlterPwd += m_Name; - sAlterPwd += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("@\"%\" = PASSWORD('")) ; + sAlterPwd += ::rtl::OUString("@\"%\" = PASSWORD('") ; sAlterPwd += newPassword; - sAlterPwd += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("')")) ; + sAlterPwd += ::rtl::OUString("')") ; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -305,41 +305,41 @@ void SAL_CALL OMySQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/ { ::rtl::OUString sPrivs; if((nRights & Privilege::INSERT) == Privilege::INSERT) - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INSERT")); + sPrivs += ::rtl::OUString("INSERT"); if((nRights & Privilege::DELETE) == Privilege::DELETE) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DELETE")); + sPrivs += ::rtl::OUString(","); + sPrivs += ::rtl::OUString("DELETE"); } if((nRights & Privilege::UPDATE) == Privilege::UPDATE) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UPDATE")); + sPrivs += ::rtl::OUString(","); + sPrivs += ::rtl::OUString("UPDATE"); } if((nRights & Privilege::ALTER) == Privilege::ALTER) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ALTER")); + sPrivs += ::rtl::OUString(","); + sPrivs += ::rtl::OUString("ALTER"); } if((nRights & Privilege::SELECT) == Privilege::SELECT) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT")); + sPrivs += ::rtl::OUString(","); + sPrivs += ::rtl::OUString("SELECT"); } if((nRights & Privilege::REFERENCE) == Privilege::REFERENCE) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); - sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REFERENCES")); + sPrivs += ::rtl::OUString(","); + sPrivs += ::rtl::OUString("REFERENCES"); } return sPrivs; diff --git a/connectivity/source/drivers/mysql/YUsers.cxx b/connectivity/source/drivers/mysql/YUsers.cxx index de00aecb1b06..ed9d6828ecb5 100644 --- a/connectivity/source/drivers/mysql/YUsers.cxx +++ b/connectivity/source/drivers/mysql/YUsers.cxx @@ -77,18 +77,18 @@ Reference< XPropertySet > OUsers::createDescriptor() // XAppend sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "GRANT USAGE ON * TO " )); + ::rtl::OUString aSql( "GRANT USAGE ON * TO " ); ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sUserName( _rForName ); aSql += ::dbtools::quoteName(aQuote,sUserName) - + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" @\"%\" ")); + + ::rtl::OUString(" @\"%\" "); ::rtl::OUString sPassword; descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPassword; if ( !sPassword.isEmpty() ) { - aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" IDENTIFIED BY '")); + aSql += ::rtl::OUString(" IDENTIFIED BY '"); aSql += sPassword; - aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("'")); + aSql += ::rtl::OUString("'"); } Reference< XStatement > xStmt = m_xConnection->createStatement( ); @@ -102,7 +102,7 @@ sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const // XDrop void OUsers::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName) { - ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "REVOKE ALL ON * FROM " )); + ::rtl::OUString aSql( "REVOKE ALL ON * FROM " ); ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); aSql += ::dbtools::quoteName(aQuote,_sElementName); diff --git a/connectivity/source/drivers/mysql/YViews.cxx b/connectivity/source/drivers/mysql/YViews.cxx index ac80c8d9806e..6cd100cc3ef5 100644 --- a/connectivity/source/drivers/mysql/YViews.cxx +++ b/connectivity/source/drivers/mysql/YViews.cxx @@ -111,7 +111,7 @@ void OViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString /*_sElementName*/) sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); if (!bIsNew) { - ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP VIEW" )); + ::rtl::OUString aSql( "DROP VIEW" ); Reference<XPropertySet> xProp(xObject,UNO_QUERY); aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::eInTableDefinitions, false, false, true ); @@ -134,13 +134,13 @@ void OViews::createView( const Reference< XPropertySet >& descriptor ) { Reference<XConnection> xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); - ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE VIEW " )); + ::rtl::OUString aSql( "CREATE VIEW " ); ::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sSchema,sCommand; aSql += ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true ); - aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" AS ")); + aSql += ::rtl::OUString(" AS "); descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_COMMAND)) >>= sCommand; aSql += sCommand; diff --git a/connectivity/source/drivers/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx index 1168521f2f25..cd1a9d59aa00 100644 --- a/connectivity/source/drivers/odbc/OFunctions.cxx +++ b/connectivity/source/drivers/odbc/OFunctions.cxx @@ -102,16 +102,16 @@ sal_Bool LoadLibrary_ODBC3(::rtl::OUString &_rPath) if (bLoaded) return sal_True; #ifdef WNT - _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODBC32.DLL")); + _rPath = ::rtl::OUString("ODBC32.DLL"); #endif #ifdef UNX #ifdef MACOSX - _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("libiodbc.dylib")); + _rPath = ::rtl::OUString("libiodbc.dylib"); #else - _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("libodbc.so.1")); + _rPath = ::rtl::OUString("libodbc.so.1"); pODBCso = osl_loadModule( _rPath.pData,SAL_LOADMODULE_NOW ); if ( !pODBCso ) - _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("libodbc.so")); + _rPath = ::rtl::OUString("libodbc.so"); #endif /* MACOSX */ #endif @@ -127,113 +127,113 @@ sal_Bool LoadLibrary_ODBC3(::rtl::OUString &_rPath) sal_Bool LoadFunctions(oslModule pODBCso) { - if( ( pODBC3SQLAllocHandle = (T3SQLAllocHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLAllocHandle")).pData )) == NULL ) + if( ( pODBC3SQLAllocHandle = (T3SQLAllocHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLAllocHandle").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLConnect = (T3SQLConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLConnect")).pData )) == NULL ) + if( ( pODBC3SQLConnect = (T3SQLConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLConnect").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLDriverConnect = (T3SQLDriverConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLDriverConnect")).pData )) == NULL ) + if( ( pODBC3SQLDriverConnect = (T3SQLDriverConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLDriverConnect").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLBrowseConnect = (T3SQLBrowseConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLBrowseConnect")).pData )) == NULL ) + if( ( pODBC3SQLBrowseConnect = (T3SQLBrowseConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLBrowseConnect").pData )) == NULL ) return sal_False; - if(( pODBC3SQLDataSources = (T3SQLDataSources)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLDataSources")).pData )) == NULL ) + if(( pODBC3SQLDataSources = (T3SQLDataSources)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLDataSources").pData )) == NULL ) return sal_False; - if(( pODBC3SQLDrivers = (T3SQLDrivers)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLDrivers")).pData )) == NULL ) + if(( pODBC3SQLDrivers = (T3SQLDrivers)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLDrivers").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetInfo = (T3SQLGetInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetInfo")).pData )) == NULL ) + if( ( pODBC3SQLGetInfo = (T3SQLGetInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLGetInfo").pData )) == NULL ) return sal_False; - if(( pODBC3SQLGetFunctions = (T3SQLGetFunctions)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetFunctions")).pData )) == NULL ) + if(( pODBC3SQLGetFunctions = (T3SQLGetFunctions)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLGetFunctions").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetTypeInfo = (T3SQLGetTypeInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetTypeInfo")).pData )) == NULL ) + if( ( pODBC3SQLGetTypeInfo = (T3SQLGetTypeInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLGetTypeInfo").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetConnectAttr = (T3SQLSetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSetConnectAttr")).pData )) == NULL ) + if( ( pODBC3SQLSetConnectAttr = (T3SQLSetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLSetConnectAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetConnectAttr = (T3SQLGetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetConnectAttr")).pData )) == NULL ) + if( ( pODBC3SQLGetConnectAttr = (T3SQLGetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLGetConnectAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetEnvAttr = (T3SQLSetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSetEnvAttr")).pData )) == NULL ) + if( ( pODBC3SQLSetEnvAttr = (T3SQLSetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLSetEnvAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetEnvAttr = (T3SQLGetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetEnvAttr")).pData )) == NULL ) + if( ( pODBC3SQLGetEnvAttr = (T3SQLGetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLGetEnvAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetStmtAttr = (T3SQLSetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSetStmtAttr")).pData )) == NULL ) + if( ( pODBC3SQLSetStmtAttr = (T3SQLSetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLSetStmtAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetStmtAttr = (T3SQLGetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetStmtAttr")).pData )) == NULL ) + if( ( pODBC3SQLGetStmtAttr = (T3SQLGetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLGetStmtAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLPrepare = (T3SQLPrepare)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLPrepare")).pData )) == NULL ) + if( ( pODBC3SQLPrepare = (T3SQLPrepare)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLPrepare").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLBindParameter = (T3SQLBindParameter)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLBindParameter")).pData )) == NULL ) + if( ( pODBC3SQLBindParameter = (T3SQLBindParameter)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLBindParameter").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetCursorName = (T3SQLSetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSetCursorName")).pData )) == NULL ) + if( ( pODBC3SQLSetCursorName = (T3SQLSetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLSetCursorName").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLExecute = (T3SQLExecute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLExecute")).pData )) == NULL ) + if( ( pODBC3SQLExecute = (T3SQLExecute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLExecute").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLExecDirect = (T3SQLExecDirect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLExecDirect")).pData )) == NULL ) + if( ( pODBC3SQLExecDirect = (T3SQLExecDirect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLExecDirect").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLDescribeParam = (T3SQLDescribeParam)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLDescribeParam")).pData )) == NULL ) + if( ( pODBC3SQLDescribeParam = (T3SQLDescribeParam)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLDescribeParam").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLNumParams = (T3SQLNumParams)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLNumParams")).pData )) == NULL ) + if( ( pODBC3SQLNumParams = (T3SQLNumParams)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLNumParams").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLParamData = (T3SQLParamData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLParamData")).pData )) == NULL ) + if( ( pODBC3SQLParamData = (T3SQLParamData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLParamData").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLPutData = (T3SQLPutData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLPutData")).pData )) == NULL ) + if( ( pODBC3SQLPutData = (T3SQLPutData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLPutData").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLRowCount = (T3SQLRowCount)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLRowCount")).pData )) == NULL ) + if( ( pODBC3SQLRowCount = (T3SQLRowCount)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLRowCount").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLNumResultCols = (T3SQLNumResultCols)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLNumResultCols")).pData )) == NULL ) + if( ( pODBC3SQLNumResultCols = (T3SQLNumResultCols)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLNumResultCols").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLDescribeCol = (T3SQLDescribeCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLDescribeCol")).pData )) == NULL ) + if( ( pODBC3SQLDescribeCol = (T3SQLDescribeCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLDescribeCol").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLColAttribute = (T3SQLColAttribute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLColAttribute")).pData )) == NULL ) + if( ( pODBC3SQLColAttribute = (T3SQLColAttribute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLColAttribute").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLBindCol = (T3SQLBindCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLBindCol")).pData )) == NULL ) + if( ( pODBC3SQLBindCol = (T3SQLBindCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLBindCol").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFetch = (T3SQLFetch)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLFetch")).pData )) == NULL ) + if( ( pODBC3SQLFetch = (T3SQLFetch)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLFetch").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFetchScroll = (T3SQLFetchScroll)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLFetchScroll")).pData )) == NULL ) + if( ( pODBC3SQLFetchScroll = (T3SQLFetchScroll)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLFetchScroll").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetData = (T3SQLGetData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetData")).pData )) == NULL ) + if( ( pODBC3SQLGetData = (T3SQLGetData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLGetData").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetPos = (T3SQLSetPos)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSetPos")).pData )) == NULL ) + if( ( pODBC3SQLSetPos = (T3SQLSetPos)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLSetPos").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLBulkOperations = (T3SQLBulkOperations)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLBulkOperations")).pData )) == NULL ) + if( ( pODBC3SQLBulkOperations = (T3SQLBulkOperations)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLBulkOperations").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLMoreResults = (T3SQLMoreResults)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLMoreResults")).pData )) == NULL ) + if( ( pODBC3SQLMoreResults = (T3SQLMoreResults)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLMoreResults").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetDiagRec = (T3SQLGetDiagRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetDiagRec")).pData )) == NULL ) + if( ( pODBC3SQLGetDiagRec = (T3SQLGetDiagRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLGetDiagRec").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLColumnPrivileges = (T3SQLColumnPrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLColumnPrivileges")).pData )) == NULL ) + if( ( pODBC3SQLColumnPrivileges = (T3SQLColumnPrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLColumnPrivileges").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLColumns = (T3SQLColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLColumns")).pData )) == NULL ) + if( ( pODBC3SQLColumns = (T3SQLColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLColumns").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLForeignKeys = (T3SQLForeignKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLForeignKeys")).pData )) == NULL ) + if( ( pODBC3SQLForeignKeys = (T3SQLForeignKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLForeignKeys").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLPrimaryKeys = (T3SQLPrimaryKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLPrimaryKeys")).pData )) == NULL ) + if( ( pODBC3SQLPrimaryKeys = (T3SQLPrimaryKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLPrimaryKeys").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLProcedureColumns = (T3SQLProcedureColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLProcedureColumns")).pData )) == NULL ) + if( ( pODBC3SQLProcedureColumns = (T3SQLProcedureColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLProcedureColumns").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLProcedures = (T3SQLProcedures)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLProcedures")).pData )) == NULL ) + if( ( pODBC3SQLProcedures = (T3SQLProcedures)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLProcedures").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSpecialColumns = (T3SQLSpecialColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLSpecialColumns")).pData )) == NULL ) + if( ( pODBC3SQLSpecialColumns = (T3SQLSpecialColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLSpecialColumns").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLStatistics = (T3SQLStatistics)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLStatistics")).pData )) == NULL ) + if( ( pODBC3SQLStatistics = (T3SQLStatistics)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLStatistics").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLTablePrivileges = (T3SQLTablePrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLTablePrivileges")).pData )) == NULL ) + if( ( pODBC3SQLTablePrivileges = (T3SQLTablePrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLTablePrivileges").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLTables = (T3SQLTables)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLTables")).pData )) == NULL ) + if( ( pODBC3SQLTables = (T3SQLTables)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLTables").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFreeStmt = (T3SQLFreeStmt)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLFreeStmt")).pData )) == NULL ) + if( ( pODBC3SQLFreeStmt = (T3SQLFreeStmt)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLFreeStmt").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLCloseCursor = (T3SQLCloseCursor)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLCloseCursor")).pData )) == NULL ) + if( ( pODBC3SQLCloseCursor = (T3SQLCloseCursor)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLCloseCursor").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLCancel = (T3SQLCancel)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLCancel")).pData )) == NULL ) + if( ( pODBC3SQLCancel = (T3SQLCancel)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLCancel").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLEndTran = (T3SQLEndTran)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLEndTran")).pData )) == NULL ) + if( ( pODBC3SQLEndTran = (T3SQLEndTran)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLEndTran").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLDisconnect = (T3SQLDisconnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLDisconnect")).pData )) == NULL ) + if( ( pODBC3SQLDisconnect = (T3SQLDisconnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLDisconnect").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFreeHandle = (T3SQLFreeHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLFreeHandle")).pData )) == NULL ) + if( ( pODBC3SQLFreeHandle = (T3SQLFreeHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLFreeHandle").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLGetCursorName")).pData )) == NULL ) + if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLGetCursorName").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLNativeSql")).pData )) == NULL ) + if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString("SQLNativeSql").pData )) == NULL ) return sal_False; return sal_True; diff --git a/connectivity/source/drivers/odbcbase/OConnection.cxx b/connectivity/source/drivers/odbcbase/OConnection.cxx index b206ab481db8..6ca518f9fc4b 100644 --- a/connectivity/source/drivers/odbcbase/OConnection.cxx +++ b/connectivity/source/drivers/odbcbase/OConnection.cxx @@ -168,7 +168,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(RTL_CONSTASCII_USTRINGPARAM("02.50")) || sVersion == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("02.00")); + m_bUseOldDateFormat = sVersion == ::rtl::OUString("02.50") || sVersion == ::rtl::OUString("02.00"); } catch(Exception&) { @@ -195,7 +195,7 @@ SQLRETURN OConnection::Construct(const ::rtl::OUString& url,const Sequence< Prop sal_Int32 nLen = url.indexOf(':'); nLen = url.indexOf(':',nLen+1); - ::rtl::OUString aDSN(RTL_CONSTASCII_USTRINGPARAM("DSN=")), aUID, aPWD, aSysDrvSettings; + ::rtl::OUString aDSN("DSN="), aUID, aPWD, aSysDrvSettings; aDSN += url.copy(nLen+1); const char* pUser = "user"; @@ -242,12 +242,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(RTL_CONSTASCII_USTRINGPARAM(";UID=")) + aUID; + aDSN = aDSN + ::rtl::OUString(";UID=") + aUID; } else if(!pBegin->Name.compareToAscii(pPwd)) { OSL_VERIFY( pBegin->Value >>= aPWD ); - aDSN = aDSN + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";PWD=")) + aPWD; + aDSN = aDSN + ::rtl::OUString(";PWD=") + aPWD; } else if(!pBegin->Name.compareToAscii(pUseCatalog)) { @@ -256,7 +256,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(RTL_CONSTASCII_USTRINGPARAM(";")); + aDSN += ::rtl::OUString(";"); 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 783e25906177..8646565f6879 100644 --- a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx +++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx @@ -60,7 +60,7 @@ ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon { m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); ::rtl::OUString sVersion = getDriverVersion(); - m_bOdbc3 = sVersion != ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("02.50")) && sVersion != ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("02.00")); + m_bOdbc3 = sVersion != ::rtl::OUString("02.50") && sVersion != ::rtl::OUString("02.00"); } catch(SQLException& ) { // doesn't matter here @@ -1197,7 +1197,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQL ::rtl::OUString aValue = m_pConnection->getURL(); if ( aValue.isEmpty() ) { - aValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:odbc:")); + aValue = ::rtl::OUString("sdbc:odbc:"); aValue += getURLImpl(); } return aValue; diff --git a/connectivity/source/drivers/odbcbase/ODriver.cxx b/connectivity/source/drivers/odbcbase/ODriver.cxx index 4c2f0be9f55b..1454d44c6d84 100644 --- a/connectivity/source/drivers/odbcbase/ODriver.cxx +++ b/connectivity/source/drivers/odbcbase/ODriver.cxx @@ -67,7 +67,7 @@ void ODBCDriver::disposing() //------------------------------------------------------------------------------ rtl::OUString ODBCDriver::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.ODBCDriver")); + return rtl::OUString("com.sun.star.comp.sdbc.ODBCDriver"); // this name is referenced in the configuration and in the odbc.xml // Please take care when changing it. } @@ -77,7 +77,7 @@ typedef Sequence< ::rtl::OUString > SS; SS ODBCDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { SS aSNS( 1 ); - aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); + aSNS[0] = ::rtl::OUString("com.sun.star.sdbc.Driver"); return aSNS; } @@ -128,7 +128,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(RTL_CONSTASCII_USTRINGPARAM("sdbc:odbc:")),10)); + return (!url.compareTo(::rtl::OUString("sdbc:odbc:"),10)); } // -------------------------------------------------------------------------------- Sequence< DriverPropertyInfo > SAL_CALL ODBCDriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) @@ -138,70 +138,70 @@ Sequence< DriverPropertyInfo > SAL_CALL ODBCDriver::getPropertyInfo( const ::rtl ::std::vector< DriverPropertyInfo > aDriverInfo; Sequence< ::rtl::OUString > aBooleanValues(2); - aBooleanValues[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) ); - aBooleanValues[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ); + aBooleanValues[0] = ::rtl::OUString( "false" ); + aBooleanValues[1] = ::rtl::OUString( "true" ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet of the database.")) + ::rtl::OUString("CharSet") + ,::rtl::OUString("CharSet of the database.") ,sal_False ,::rtl::OUString() ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseCatalog")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Use catalog for file-based databases.")) + ::rtl::OUString("UseCatalog") + ,::rtl::OUString("Use catalog for file-based databases.") ,sal_False - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) ) + ,::rtl::OUString( "false" ) ,aBooleanValues) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SystemDriverSettings")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Driver settings.")) + ::rtl::OUString("SystemDriverSettings") + ,::rtl::OUString("Driver settings.") ,sal_False ,::rtl::OUString() ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParameterNameSubstitution")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Change named parameters with '?'.")) + ::rtl::OUString("ParameterNameSubstitution") + ,::rtl::OUString("Change named parameters with '?'.") ,sal_False - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) ) + ,::rtl::OUString( "false" ) ,aBooleanValues) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IgnoreDriverPrivileges")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ignore the privileges from the database driver.")) + ::rtl::OUString("IgnoreDriverPrivileges") + ,::rtl::OUString("Ignore the privileges from the database driver.") ,sal_False - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) ) + ,::rtl::OUString( "false" ) ,aBooleanValues) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsAutoRetrievingEnabled")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Retrieve generated values.")) + ::rtl::OUString("IsAutoRetrievingEnabled") + ,::rtl::OUString("Retrieve generated values.") ,sal_False - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) ) + ,::rtl::OUString( "false" ) ,aBooleanValues) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoRetrievingStatement")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Auto-increment statement.")) + ::rtl::OUString("AutoRetrievingStatement") + ,::rtl::OUString("Auto-increment statement.") ,sal_False ,::rtl::OUString() ,Sequence< ::rtl::OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GenerateASBeforeCorrelationName")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Generate AS before table correlation names.")) + ::rtl::OUString("GenerateASBeforeCorrelationName") + ,::rtl::OUString("Generate AS before table correlation names.") ,sal_False - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) + ,::rtl::OUString( "true" ) ,aBooleanValues) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EscapeDateTime")) - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Escape date time format.")) + ::rtl::OUString("EscapeDateTime") + ,::rtl::OUString("Escape date time format.") ,sal_False - ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) + ,::rtl::OUString( "true" ) ,aBooleanValues) ); diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx index 43f96161d5a8..0934e919b8b0 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(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.odbc.ResultSet")); + return ::rtl::OUString("com.sun.star.sdbcx.odbc.ResultSet"); } // ------------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL OResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< ::rtl::OUString > aSupported(2); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet")); - aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.ResultSet")); + aSupported[0] = ::rtl::OUString("com.sun.star.sdbc.ResultSet"); + aSupported[1] = ::rtl::OUString("com.sun.star.sdbcx.ResultSet"); return aSupported; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx index 5c64c26b00e3..a1434336947f 100644 --- a/connectivity/source/drivers/odbcbase/OStatement.cxx +++ b/connectivity/source/drivers/odbcbase/OStatement.cxx @@ -290,7 +290,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(RTL_CONSTASCII_USTRINGPARAM(" FOR UPDATE"))); + sal_Int32 index = sqlStatement.indexOf(::rtl::OUString(" FOR UPDATE")); // We found it. Change our concurrency level to ensure that the // row can be updated. |