diff options
Diffstat (limited to 'connectivity')
45 files changed, 106 insertions, 112 deletions
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 3f5093c3a225..d3515a33a2fa 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -274,7 +274,7 @@ void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant, { // die Formatierung soll eigentlich als Prozent erfolgen, aber der String stellt nur eine // einfache Nummer dar -> anpassen ::rtl::OUString sExpanded(rString); - static ::rtl::OUString s_sPercentSymbol = ::rtl::OUString::createFromAscii("%"); + static ::rtl::OUString s_sPercentSymbol( RTL_CONSTASCII_USTRINGPARAM( "%" )); // need a method to add a sal_Unicode to a string, 'til then we use a static string sExpanded += s_sPercentSymbol; fValue = xFormatter->convertStringToNumber(nKeyToUse, sExpanded); diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx index 691a0c48d084..b9f5b11afd96 100644 --- a/connectivity/source/commontools/TColumnsHelper.cxx +++ b/connectivity/source/commontools/TColumnsHelper.cxx @@ -182,7 +182,7 @@ sdbcx::ObjectType OColumnsHelper::appendObject( const ::rtl::OUString& _rForName return cloneDescriptor( descriptor ); Reference<XDatabaseMetaData> xMetaData = m_pTable->getConnection()->getMetaData(); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("ALTER TABLE "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " )); ::rtl::OUString aQuote = xMetaData->getIdentifierQuoteString( ); aSql += ::dbtools::composeTableName( xMetaData, m_pTable, ::dbtools::eInTableDefinitions, false, false, true ); @@ -204,7 +204,7 @@ void OColumnsHelper::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElem OSL_ENSURE(m_pTable,"OColumnsHelper::dropByName: Table is null!"); if ( m_pTable && !m_pTable->isNew() ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("ALTER TABLE "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " )); Reference<XDatabaseMetaData> xMetaData = m_pTable->getConnection()->getMetaData(); ::rtl::OUString aQuote = xMetaData->getIdentifierQuoteString( ); diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx index 564d36b2bece..796310d36039 100644 --- a/connectivity/source/commontools/TIndexes.cxx +++ b/connectivity/source/commontools/TIndexes.cxx @@ -150,7 +150,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const ::rtl::OUString& _rForName ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); ::rtl::OUStringBuffer aSql( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CREATE "))); ::rtl::OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); - ::rtl::OUString aDot = ::rtl::OUString::createFromAscii("."); + ::rtl::OUString aDot( RTL_CONSTASCII_USTRINGPARAM( "." )); if(comphelper::getBOOL(descriptor->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_ISUNIQUE)))) aSql.appendAscii("UNIQUE "); @@ -238,7 +238,7 @@ void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElem aSchema = _sElementName.copy(0,nLen); aName = _sElementName.copy(nLen+1); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP INDEX "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP INDEX " )); ::rtl::OUString aComposedName = dbtools::composeTableName( m_pTable->getMetaData(), m_pTable, ::dbtools::eInIndexDefinitions, false, false, true ); ::rtl::OUString sIndexName,sTemp; diff --git a/connectivity/source/commontools/conncleanup.cxx b/connectivity/source/commontools/conncleanup.cxx index ab8300f66c00..6c6516f9fd1f 100644 --- a/connectivity/source/commontools/conncleanup.cxx +++ b/connectivity/source/commontools/conncleanup.cxx @@ -46,7 +46,7 @@ namespace dbtools //===================================================================== static const ::rtl::OUString& getActiveConnectionPropertyName() { - static const ::rtl::OUString s_sActiveConnectionPropertyName = ::rtl::OUString::createFromAscii("ActiveConnection"); + static const ::rtl::OUString s_sActiveConnectionPropertyName( RTL_CONSTASCII_USTRINGPARAM( "ActiveConnection" )); return s_sActiveConnectionPropertyName; } diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index c04c76bd7bcd..7a719b7ca0c4 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -432,7 +432,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R // build a connection with it's current settings (4. data source name, or 5. URL) - const ::rtl::OUString sUserProp = ::rtl::OUString::createFromAscii("User"); + const ::rtl::OUString sUserProp( RTL_CONSTASCII_USTRINGPARAM( "User" )); ::rtl::OUString sDataSourceName; xRowSetProps->getPropertyValue(::rtl::OUString::createFromAscii("DataSourceName")) >>= sDataSourceName; ::rtl::OUString sURL; @@ -989,7 +989,7 @@ Reference< XNumberFormatsSupplier> getNumberFormats( // ask the parent of the connection (should be an DatabaseAccess) Reference< XNumberFormatsSupplier> xReturn; Reference< XChild> xConnAsChild(_rxConn, UNO_QUERY); - ::rtl::OUString sPropFormatsSupplier = ::rtl::OUString::createFromAscii("NumberFormatsSupplier"); + ::rtl::OUString sPropFormatsSupplier( RTL_CONSTASCII_USTRINGPARAM( "NumberFormatsSupplier" )); if (xConnAsChild.is()) { Reference< XPropertySet> xConnParentProps(xConnAsChild->getParent(), UNO_QUERY); @@ -1544,7 +1544,7 @@ void showError(const SQLExceptionInfo& _rInfo, aArgs[0] <<= PropertyValue(::rtl::OUString::createFromAscii("SQLException"), 0, _rInfo.get(), PropertyState_DIRECT_VALUE); aArgs[1] <<= PropertyValue(::rtl::OUString::createFromAscii("ParentWindow"), 0, makeAny(_xParent), PropertyState_DIRECT_VALUE); - static ::rtl::OUString s_sDialogServiceName = ::rtl::OUString::createFromAscii("com.sun.star.sdb.ErrorMessageDialog"); + static ::rtl::OUString s_sDialogServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.ErrorMessageDialog" )); Reference< XExecutableDialog > xErrorDialog( _xFactory->createInstanceWithArguments(s_sDialogServiceName, aArgs), UNO_QUERY); if (xErrorDialog.is()) diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 7c9db2d4a024..c54cf921ad9d 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -240,7 +240,7 @@ namespace static const ::rtl::OUString sComma(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","))); const ::rtl::OUString sQuote(_xMetaData->getIdentifierQuoteString()); - ::rtl::OUString sSql = ::rtl::OUString::createFromAscii(" ("); + ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( " (" )); Reference< XPropertySet > xColProp; sal_Int32 nColCount = _xColumns->getCount(); @@ -681,15 +681,15 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData, if ( xCurrentRow.is() ) { ::rtl::OUString sUserWorkingFor = _xMetaData->getUserName(); - static const ::rtl::OUString sSELECT = ::rtl::OUString::createFromAscii("SELECT"); - static const ::rtl::OUString sINSERT = ::rtl::OUString::createFromAscii("INSERT"); - static const ::rtl::OUString sUPDATE = ::rtl::OUString::createFromAscii("UPDATE"); - static const ::rtl::OUString sDELETE = ::rtl::OUString::createFromAscii("DELETE"); - static const ::rtl::OUString sREAD = ::rtl::OUString::createFromAscii("READ"); - static const ::rtl::OUString sCREATE = ::rtl::OUString::createFromAscii("CREATE"); - static const ::rtl::OUString sALTER = ::rtl::OUString::createFromAscii("ALTER"); - static const ::rtl::OUString sREFERENCE = ::rtl::OUString::createFromAscii("REFERENCE"); - static const ::rtl::OUString sDROP = ::rtl::OUString::createFromAscii("DROP"); + 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" )); // after creation the set is positioned before the first record, per definitionem #ifdef DBG_UTIL Reference< XResultSetMetaDataSupplier > xSup(xPrivileges,UNO_QUERY); @@ -750,7 +750,7 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData, } catch(const SQLException& e) { - static ::rtl::OUString sNotSupportedState = ::rtl::OUString::createFromAscii("IM001"); + static ::rtl::OUString sNotSupportedState( RTL_CONSTASCII_USTRINGPARAM( "IM001" )); // some drivers don't support any privileges so we assume that we are allowed to do all we want :-) if(e.SQLState == sNotSupportedState) nPrivileges |= Privilege::DROP | diff --git a/connectivity/source/commontools/statementcomposer.cxx b/connectivity/source/commontools/statementcomposer.cxx index 3fd2b763554b..ba8ba3819e47 100644 --- a/connectivity/source/commontools/statementcomposer.cxx +++ b/connectivity/source/commontools/statementcomposer.cxx @@ -193,7 +193,7 @@ namespace dbtools // the filter sal_Bool bApplyFilter = sal_True; - const ::rtl::OUString sPropApply = ::rtl::OUString::createFromAscii( "ApplyFilter" ); + const ::rtl::OUString sPropApply( RTL_CONSTASCII_USTRINGPARAM( "ApplyFilter" )); if ( ::comphelper::hasProperty( sPropApply, xQuery ) ) { OSL_VERIFY( xQuery->getPropertyValue( sPropApply ) >>= bApplyFilter ); diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx index a65c7c1c99b8..3e63d401a735 100644 --- a/connectivity/source/cpool/ZConnectionPool.cxx +++ b/connectivity/source/cpool/ZConnectionPool.cxx @@ -65,7 +65,7 @@ namespace //-------------------------------------------------------------------- static const ::rtl::OUString& getTimeoutNodeName() { - static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("Timeout"); + static ::rtl::OUString s_sNodeName( RTL_CONSTASCII_USTRINGPARAM( "Timeout" )); return s_sNodeName; } diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx index f3d2e1b3fc31..2cc925ccde6a 100644 --- a/connectivity/source/cpool/ZPoolCollection.cxx +++ b/connectivity/source/cpool/ZPoolCollection.cxx @@ -49,31 +49,31 @@ using namespace connectivity; //-------------------------------------------------------------------- static const ::rtl::OUString& getConnectionPoolNodeName() { - static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("org.openoffice.Office.DataAccess/ConnectionPool"); + static ::rtl::OUString s_sNodeName( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.DataAccess/ConnectionPool" )); return s_sNodeName; } //-------------------------------------------------------------------- static const ::rtl::OUString& getEnablePoolingNodeName() { - static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("EnablePooling"); + static ::rtl::OUString s_sNodeName( RTL_CONSTASCII_USTRINGPARAM( "EnablePooling" )); return s_sNodeName; } //-------------------------------------------------------------------- static const ::rtl::OUString& getDriverNameNodeName() { - static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("DriverName"); + static ::rtl::OUString s_sNodeName( RTL_CONSTASCII_USTRINGPARAM( "DriverName" )); return s_sNodeName; } // ----------------------------------------------------------------------------- static const ::rtl::OUString& getDriverSettingsNodeName() { - static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("DriverSettings"); + static ::rtl::OUString s_sNodeName( RTL_CONSTASCII_USTRINGPARAM( "DriverSettings" )); return s_sNodeName; } //-------------------------------------------------------------------------- static const ::rtl::OUString& getEnableNodeName() { - static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("Enable"); + static ::rtl::OUString s_sNodeName( RTL_CONSTASCII_USTRINGPARAM( "Enable" )); return s_sNodeName; } @@ -406,7 +406,7 @@ Reference< XInterface > OPoolCollection::createWithProvider(const Reference< XMu aCreationArgs[1] = makeAny(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("depth")), 0, makeAny((sal_Int32)-1), PropertyState_DIRECT_VALUE)); aCreationArgs[2] = makeAny(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("lazywrite")), 0, makeAny(sal_True), PropertyState_DIRECT_VALUE)); - static ::rtl::OUString sAccessService = ::rtl::OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess"); + static ::rtl::OUString sAccessService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" )); xInterface = _rxConfProvider->createInstanceWithArguments(sAccessService, aCreationArgs); OSL_ENSURE(xInterface.is(), "::createWithProvider: could not create the node access!"); diff --git a/connectivity/source/cpool/Zregistration.cxx b/connectivity/source/cpool/Zregistration.cxx index c1ebcd213031..3acb300a862e 100644 --- a/connectivity/source/cpool/Zregistration.cxx +++ b/connectivity/source/cpool/Zregistration.cxx @@ -53,7 +53,7 @@ extern "C" //--------------------------------------------------------------------------------------- sal_Bool SAL_CALL component_writeInfo(void* /*_pServiceManager*/, com::sun::star::registry::XRegistryKey* _pRegistryKey) { - ::rtl::OUString sMainKeyName = ::rtl::OUString::createFromAscii("/"); + ::rtl::OUString sMainKeyName( RTL_CONSTASCII_USTRINGPARAM( "/" )); sMainKeyName += OPoolCollection::getImplementationName_Static(); sMainKeyName += ::rtl::OUString::createFromAscii("/UNO/SERVICES"); diff --git a/connectivity/source/drivers/adabas/BCatalog.cxx b/connectivity/source/drivers/adabas/BCatalog.cxx index 13ce824e00ec..e04f4d3a9373 100644 --- a/connectivity/source/drivers/adabas/BCatalog.cxx +++ b/connectivity/source/drivers/adabas/BCatalog.cxx @@ -63,7 +63,6 @@ OAdabasCatalog::OAdabasCatalog(SQLHANDLE _aConnectionHdl, OAdabasConnection* _pC sName += OAdabasCatalog::getDot(); sName += _xRow->getString(3); - return sName; } // ----------------------------------------------------------------------------- @@ -158,7 +157,7 @@ void OAdabasCatalog::correctColumnProperties(sal_Int32 /*_nPrec*/, sal_Int32& _r } // else if(_nPrec > 15) // { -// static const ::rtl::OUString sReal = ::rtl::OUString::createFromAscii("REAL"); +// static const ::rtl::OUString sReal( RTL_CONSTASCII_USTRINGPARAM( "REAL" )); // _rsTypeName = sReal; // _rnType = DataType::REAL; // } diff --git a/connectivity/source/drivers/adabas/BGroup.cxx b/connectivity/source/drivers/adabas/BGroup.cxx index 2669454192e1..2478e12b6b57 100644 --- a/connectivity/source/drivers/adabas/BGroup.cxx +++ b/connectivity/source/drivers/adabas/BGroup.cxx @@ -70,7 +70,7 @@ void OAdabasGroup::refreshUsers() TStringVector aVector; Reference< XStatement > xStmt = m_pConnection->createStatement( ); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("SELECT DISTINCT USERNAME FROM DOMAIN.USERS WHERE USERNAME IS NOT NULL AND USERNAME <> ' ' AND USERNAME <> 'CONTROL' AND GROUPNAME = '"); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "SELECT DISTINCT USERNAME FROM DOMAIN.USERS WHERE USERNAME IS NOT NULL AND USERNAME <> ' ' AND USERNAME <> 'CONTROL' AND GROUPNAME = '" )); aSql += getName( ); aSql += ::rtl::OUString::createFromAscii("'"); diff --git a/connectivity/source/drivers/adabas/BGroups.cxx b/connectivity/source/drivers/adabas/BGroups.cxx index f514b9eef8bb..2a58ec10ea14 100644 --- a/connectivity/source/drivers/adabas/BGroups.cxx +++ b/connectivity/source/drivers/adabas/BGroups.cxx @@ -65,7 +65,7 @@ Reference< XPropertySet > OGroups::createDescriptor() // XAppend sdbcx::ObjectType OGroups::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& /*descriptor*/ ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE USERGROUP "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE USERGROUP " )); ::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); aSql = aSql + aQuote + _rForName + aQuote; @@ -80,7 +80,7 @@ sdbcx::ObjectType OGroups::appendObject( const ::rtl::OUString& _rForName, const // XDrop void OGroups::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP USERGROUP "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP USERGROUP " )); ::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); aSql = aSql + aQuote + _sElementName + aQuote; diff --git a/connectivity/source/drivers/adabas/BIndexes.cxx b/connectivity/source/drivers/adabas/BIndexes.cxx index 0da65ae53257..a762e1eaf43a 100644 --- a/connectivity/source/drivers/adabas/BIndexes.cxx +++ b/connectivity/source/drivers/adabas/BIndexes.cxx @@ -105,7 +105,7 @@ sdbcx::ObjectType OIndexes::appendObject( const ::rtl::OUString& _rForName, cons if ( m_pTable->isNew() ) ::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(this)); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE " )); ::rtl::OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); @@ -171,7 +171,7 @@ void OIndexes::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementNam aSchema = _sElementName.copy(0,nLen); aName = _sElementName.copy(nLen+1); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP INDEX "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP INDEX " )); ::rtl::OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); diff --git a/connectivity/source/drivers/adabas/BKeys.cxx b/connectivity/source/drivers/adabas/BKeys.cxx index 9c130d6e5690..e807d726b3f4 100644 --- a/connectivity/source/drivers/adabas/BKeys.cxx +++ b/connectivity/source/drivers/adabas/BKeys.cxx @@ -65,7 +65,7 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R sal_Int32 nKeyType = getINT32(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("ALTER TABLE "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " )); const ::rtl::OUString aQuote = getTable()->getConnection()->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); diff --git a/connectivity/source/drivers/adabas/BTable.cxx b/connectivity/source/drivers/adabas/BTable.cxx index ad76c4a3f4b1..77a5709dbfea 100644 --- a/connectivity/source/drivers/adabas/BTable.cxx +++ b/connectivity/source/drivers/adabas/BTable.cxx @@ -193,7 +193,7 @@ void SAL_CALL OAdabasTable::alterColumnByName( const ::rtl::OUString& colName, c const ::rtl::OUString sQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); - ::rtl::OUString sSql = ::rtl::OUString::createFromAscii("RENAME COLUMN ") ; + ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( "RENAME COLUMN " )) ; sSql += ::dbtools::quoteName(sQuote,m_SchemaName) + sDot + ::dbtools::quoteName(sQuote,m_Name); sSql += sDot + ::dbtools::quoteName(sQuote,colName); sSql += ::rtl::OUString::createFromAscii(" TO "); @@ -362,7 +362,7 @@ void OAdabasTable::rollbackTransAction() // ----------------------------------------------------------------------------- ::rtl::OUString OAdabasTable::getAlterTableColumnPart(const ::rtl::OUString& _rsColumnName ) { - ::rtl::OUString sSql = ::rtl::OUString::createFromAscii("ALTER TABLE "); + ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " )); const ::rtl::OUString sQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); diff --git a/connectivity/source/drivers/adabas/BTables.cxx b/connectivity/source/drivers/adabas/BTables.cxx index b09476b154e8..be1044f0579c 100644 --- a/connectivity/source/drivers/adabas/BTables.cxx +++ b/connectivity/source/drivers/adabas/BTables.cxx @@ -112,7 +112,7 @@ sdbcx::ObjectType OTables::appendObject( const ::rtl::OUString& _rForName, const // ------------------------------------------------------------------------- void OTables::setComments(const Reference< XPropertySet >& descriptor ) throw(SQLException, RuntimeException) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE TABLE "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE TABLE " )); ::rtl::OUString aQuote = static_cast<OAdabasCatalog&>(m_rParent).getConnection()->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); @@ -175,7 +175,7 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) sal_Int32 nLen = _sElementName.indexOf('.'); aSchema = _sElementName.copy(0,nLen); aName = _sElementName.copy(nLen+1); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP " )); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); Reference<XPropertySet> xProp(xObject,UNO_QUERY); @@ -202,7 +202,7 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) // ------------------------------------------------------------------------- void OTables::createTable( const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE TABLE "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE TABLE " )); ::rtl::OUString aQuote = static_cast<OAdabasCatalog&>(m_rParent).getConnection()->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); ::rtl::OUString sSchema; diff --git a/connectivity/source/drivers/adabas/BUser.cxx b/connectivity/source/drivers/adabas/BUser.cxx index 671edf6df8fb..bd4748db8b85 100644 --- a/connectivity/source/drivers/adabas/BUser.cxx +++ b/connectivity/source/drivers/adabas/BUser.cxx @@ -70,7 +70,7 @@ void OAdabasUser::refreshGroups() TStringVector aVector; aVector.reserve(7); // we don't know the excatly count of users but this should fit the normal need Reference< XStatement > xStmt = m_pConnection->createStatement( ); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("SELECT DISTINCT GROUPNAME FROM DOMAIN.USERS WHERE GROUPNAME IS NOT NULL AND GROUPNAME <> ' ' AND USERNAME = '"); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "SELECT DISTINCT GROUPNAME FROM DOMAIN.USERS WHERE GROUPNAME IS NOT NULL AND GROUPNAME <> ' ' AND USERNAME = '" )); aSql += getName( ); aSql += ::rtl::OUString::createFromAscii("'"); @@ -136,7 +136,7 @@ void OAdabasUser::getAnyTablePrivileges(const ::rtl::OUString& objName, sal_Int3 ::rtl::OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(xMeta,objName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); Reference<XStatement> xStmt = m_pConnection->createStatement(); - ::rtl::OUString sSql = ::rtl::OUString::createFromAscii("SELECT REFTABLENAME,PRIVILEGES FROM DOMAIN.USR_USES_TAB WHERE REFOBJTYPE <> 'SYSTEM' AND DEFUSERNAME = '"); + ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( "SELECT REFTABLENAME,PRIVILEGES FROM DOMAIN.USR_USES_TAB WHERE REFOBJTYPE <> 'SYSTEM' AND DEFUSERNAME = '" )); sSql += m_Name; sSql += ::rtl::OUString::createFromAscii("' AND REFTABLENAME = '"); sSql += sTable; diff --git a/connectivity/source/drivers/adabas/BUsers.cxx b/connectivity/source/drivers/adabas/BUsers.cxx index c342a9158339..904831bc1b95 100644 --- a/connectivity/source/drivers/adabas/BUsers.cxx +++ b/connectivity/source/drivers/adabas/BUsers.cxx @@ -69,7 +69,7 @@ Reference< XPropertySet > OUsers::createDescriptor() // XAppend sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE USER "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE USER " )); ::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sUserName( _rForName ); @@ -94,7 +94,7 @@ void OUsers::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName) { // first we have to check if this user is live relevaant for the database // which means with out these users the database will miss more than one important system table - ::rtl::OUString sUsers = ::rtl::OUString::createFromAscii("SELECT USERMODE,USERNAME FROM DOMAIN.USERS WHERE USERNAME = '"); + ::rtl::OUString sUsers( RTL_CONSTASCII_USTRINGPARAM( "SELECT USERMODE,USERNAME FROM DOMAIN.USERS WHERE USERNAME = '" )); sUsers += _sElementName + ::rtl::OUString::createFromAscii("'"); Reference< XStatement > xStmt = m_pConnection->createStatement(); if(xStmt.is()) @@ -103,7 +103,7 @@ void OUsers::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName) Reference<XRow> xRow(xRes,UNO_QUERY); if(xRes.is() && xRow.is() && xRes->next()) // there can only be one user with this name { - static const ::rtl::OUString sDbaUser = ::rtl::OUString::createFromAscii("DBA"); + static const ::rtl::OUString sDbaUser( RTL_CONSTASCII_USTRINGPARAM( "DBA" )); if(xRow->getString(1) == sDbaUser) { ::comphelper::disposeComponent(xStmt); @@ -115,7 +115,7 @@ void OUsers::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName) } { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP USER "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP USER " )); ::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); aSql += ::dbtools::quoteName(aQuote,_sElementName); diff --git a/connectivity/source/drivers/adabas/BViews.cxx b/connectivity/source/drivers/adabas/BViews.cxx index 75caf4fd3967..f34869f4e5b8 100644 --- a/connectivity/source/drivers/adabas/BViews.cxx +++ b/connectivity/source/drivers/adabas/BViews.cxx @@ -66,7 +66,7 @@ sdbcx::ObjectType OViews::createObject(const ::rtl::OUString& _rName) aSchema = _rName.copy(0,nLen); aName = _rName.copy(nLen+1); - ::rtl::OUString sStmt = ::rtl::OUString::createFromAscii("SELECT DISTINCT * FROM DOMAIN.SHOW_VIEW WHERE "); + ::rtl::OUString sStmt( RTL_CONSTASCII_USTRINGPARAM( "SELECT DISTINCT * FROM DOMAIN.SHOW_VIEW WHERE " )); if(aSchema.getLength()) { sStmt += ::rtl::OUString::createFromAscii("OWNER = '"); @@ -142,7 +142,7 @@ void OViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) sal_Int32 nLen = _sElementName.indexOf('.'); aSchema = _sElementName.copy(0,nLen); aName = _sElementName.copy(nLen+1); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP VIEW"); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP VIEW" )); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); aSql = aSql + m_xMetaData->getIdentifierQuoteString( ) + aSchema + m_xMetaData->getIdentifierQuoteString( ); @@ -162,7 +162,7 @@ void OViews::dropByNameImpl(const ::rtl::OUString& elementName) // ----------------------------------------------------------------------------- void OViews::createView( const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE VIEW "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE VIEW " )); ::rtl::OUString aQuote = static_cast<OAdabasCatalog&>(m_rParent).getConnection()->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); ::rtl::OUString sSchema,sCommand; diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx index 433ed279ba2e..64a039e5fc9b 100644 --- a/connectivity/source/drivers/ado/APreparedStatement.cxx +++ b/connectivity/source/drivers/ado/APreparedStatement.cxx @@ -78,7 +78,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OTypeInf { // special handling for parameters /* we recusive replace all occurences of ? in the statement and replace them with name like "" */ sal_Int32 nParameterCount = 0; - ::rtl::OUString sDefaultName = ::rtl::OUString::createFromAscii("parame"); + ::rtl::OUString sDefaultName( RTL_CONSTASCII_USTRINGPARAM( "parame" )); replaceParameterNodeName(pNode,sDefaultName,nParameterCount); pNode->parseNodeToStr( sNewSql, _pConnection ); delete pNode; @@ -225,7 +225,7 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const DataTypeEn m_pParameters->get_Count(&nCount); if(nCount < (parameterIndex-1)) { - ::rtl::OUString sDefaultName = ::rtl::OUString::createFromAscii("parame"); + ::rtl::OUString sDefaultName( RTL_CONSTASCII_USTRINGPARAM( "parame" )); sDefaultName += ::rtl::OUString::valueOf(parameterIndex); ADOParameter* pParam = m_Command.CreateParameter(sDefaultName,_eType,adParamInput,_nSize,_Val); if(pParam) diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx index bc9bb2948608..fa8dc5739029 100644 --- a/connectivity/source/drivers/ado/Awrapado.cxx +++ b/connectivity/source/drivers/ado/Awrapado.cxx @@ -2006,7 +2006,7 @@ ADORecordset* WpADOConnection::getTables( const ::com::sun::star::uno::Any& cata ++nPos; ::rtl::OUStringBuffer aTypes; - ::rtl::OUString aComma = ::rtl::OUString::createFromAscii(","); + ::rtl::OUString aComma( RTL_CONSTASCII_USTRINGPARAM( "," )); const ::rtl::OUString* pIter = types.getConstArray(); const ::rtl::OUString* pEnd = pIter + types.getLength(); for( ; pIter != pEnd ; ++pIter) diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index 74c053b66f8d..17cad00bb64b 100644 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx @@ -391,7 +391,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::OUString::createFromAscii("IsReadOnly"); + static ::rtl::OUString sReadOnly( RTL_CONSTASCII_USTRINGPARAM( "IsReadOnly" )); ::ucbhelper::Content aFile(m_pConnection->getContent(),Reference< XCommandEnvironment >()); aFile.getPropertyValue(sReadOnly) >>= bReadOnly; diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx index 88bce2c7d869..a48def0a0425 100644 --- a/connectivity/source/drivers/evoab2/NTables.cxx +++ b/connectivity/source/drivers/evoab2/NTables.cxx @@ -60,7 +60,7 @@ typedef connectivity::sdbcx::OCollection OCollection_TYPE; ObjectType OEvoabTables::createObject(const ::rtl::OUString& aName) { - ::rtl::OUString aSchema = ::rtl::OUString::createFromAscii("%"); + ::rtl::OUString aSchema( RTL_CONSTASCII_USTRINGPARAM( "%" )); Sequence< ::rtl::OUString > aTypes(1); aTypes[0] = ::rtl::OUString::createFromAscii("TABLE"); diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index 91443bab7ed8..89fe6ee57126 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -973,7 +973,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::OUString::createFromAscii("sdbc:file:"); + static const ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "sdbc:file:" )); return aValue; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 3d4373542e08..b75bd5151e08 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -327,7 +327,7 @@ void OHSQLTable::dropDefaultValue(const ::rtl::OUString& _rColName) // ----------------------------------------------------------------------------- ::rtl::OUString OHSQLTable::getAlterTableColumnPart() { - ::rtl::OUString sSql = ::rtl::OUString::createFromAscii("ALTER TABLE "); + ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " )); const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sComposedName( ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, sal_True, ::dbtools::eInTableDefinitions ) ); diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index 44ce6dfbecc9..259f33c3a41a 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -140,7 +140,7 @@ 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::OUString::createFromAscii("DROP "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP " )); Reference<XPropertySet> xProp(xObject,UNO_QUERY); sal_Bool bIsView; diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx index bfc9d5a44144..2e9655fe7fba 100644 --- a/connectivity/source/drivers/hsqldb/HUser.cxx +++ b/connectivity/source/drivers/hsqldb/HUser.cxx @@ -131,16 +131,16 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName, if ( xRes.is() ) { - static const ::rtl::OUString sSELECT = ::rtl::OUString::createFromAscii("SELECT"); - static const ::rtl::OUString sINSERT = ::rtl::OUString::createFromAscii("INSERT"); - static const ::rtl::OUString sUPDATE = ::rtl::OUString::createFromAscii("UPDATE"); - static const ::rtl::OUString sDELETE = ::rtl::OUString::createFromAscii("DELETE"); - static const ::rtl::OUString sREAD = ::rtl::OUString::createFromAscii("READ"); - static const ::rtl::OUString sCREATE = ::rtl::OUString::createFromAscii("CREATE"); - static const ::rtl::OUString sALTER = ::rtl::OUString::createFromAscii("ALTER"); - static const ::rtl::OUString sREFERENCE = ::rtl::OUString::createFromAscii("REFERENCE"); - static const ::rtl::OUString sDROP = ::rtl::OUString::createFromAscii("DROP"); - static const ::rtl::OUString sYes = ::rtl::OUString::createFromAscii("YES"); + 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" )); nRightsWithGrant = nRights = 0; diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx b/connectivity/source/drivers/hsqldb/HUsers.cxx index e9c2ead9d733..78c7d4525997 100644 --- a/connectivity/source/drivers/hsqldb/HUsers.cxx +++ b/connectivity/source/drivers/hsqldb/HUsers.cxx @@ -81,7 +81,7 @@ Reference< XPropertySet > OUsers::createDescriptor() // XAppend sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("GRANT USAGE ON * TO "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "GRANT USAGE ON * TO " )); ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sUserName( _rForName ); aSql += ::dbtools::quoteName(aQuote,sUserName) @@ -107,7 +107,7 @@ sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const void OUsers::dropObject(sal_Int32 /*nPos*/,const ::rtl::OUString _sElementName) { { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("REVOKE ALL ON * FROM "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "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 1ead660ac9be..6c414b65b38f 100644 --- a/connectivity/source/drivers/hsqldb/HViews.cxx +++ b/connectivity/source/drivers/hsqldb/HViews.cxx @@ -119,7 +119,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::OUString::createFromAscii("DROP VIEW"); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP VIEW" )); Reference<XPropertySet> xProp(xObject,UNO_QUERY); aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::eInTableDefinitions, false, false, true ); @@ -142,7 +142,7 @@ void HViews::createView( const Reference< XPropertySet >& descriptor ) { Reference<XConnection> xConnection = static_cast<OHCatalog&>(m_rParent).getConnection(); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE VIEW "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE VIEW " )); ::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sSchema,sCommand; diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx index 18ea813b25a1..0fe4540a879b 100644 --- a/connectivity/source/drivers/jdbc/JDriver.cxx +++ b/connectivity/source/drivers/jdbc/JDriver.cxx @@ -129,7 +129,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::OUString::createFromAscii("jdbc:"); + static const ::rtl::OUString s_sJdbcPrefix( RTL_CONSTASCII_USTRINGPARAM( "jdbc:" )); return bEnabled && 0 == url.compareTo(s_sJdbcPrefix, 5); } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx index 8ae1227a0062..2569e106e7da 100644 --- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx +++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx @@ -567,7 +567,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::OUString::createFromAscii("sdbc:address:kab:"); + ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "sdbc:address:kab:" )); return aValue; } // ------------------------------------------------------------------------- @@ -579,7 +579,7 @@ sal_Bool SAL_CALL KabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(S // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL KabDatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { - ::rtl::OUString aValue = ::rtl::OUString::createFromAscii("kab"); + ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "kab" )); return aValue; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx index a7217c6bd666..fe5aabf635cd 100644 --- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx @@ -564,7 +564,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::OUString::createFromAscii("sdbc:address:macab:"); + ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "sdbc:address:macab:" )); return aValue; } // ------------------------------------------------------------------------- @@ -576,7 +576,7 @@ sal_Bool SAL_CALL MacabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL MacabDatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { - ::rtl::OUString aValue = ::rtl::OUString::createFromAscii("macab"); + ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "macab" )); return aValue; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx index 7e523f44e7fd..fe40a35844ff 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx @@ -62,7 +62,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce sal_uInt64 nSize = 0; osl_getFileSize(handle, &nSize); - OUString sectionName = OUString::createFromAscii("no name section"); + OUString sectionName( RTL_CONSTASCII_USTRINGPARAM( "no name section" )); while (true) { sal_uInt64 nPos; diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx index dbf1c598b5c8..8eba5b6fb284 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx @@ -90,9 +90,9 @@ static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CI // Registry Keys -static ::rtl::OUString szProfileSubtreeString=::rtl::OUString::createFromAscii("Profiles"); -static ::rtl::OUString szCurrentProfileString= ::rtl::OUString::createFromAscii("CurrentProfile"); -static ::rtl::OUString szDirectoryString =::rtl::OUString::createFromAscii("directory"); +static ::rtl::OUString szProfileSubtreeString( RTL_CONSTASCII_USTRINGPARAM( "Profiles" )); +static ::rtl::OUString szCurrentProfileString( RTL_CONSTASCII_USTRINGPARAM( "CurrentProfile" )); +static ::rtl::OUString szDirectoryString( RTL_CONSTASCII_USTRINGPARAM( "directory" )); #ifndef MAXPATHLEN #define MAXPATHLEN 1024 diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx index f40a348db09e..8d453979f681 100644 --- a/connectivity/source/drivers/mysql/YTable.cxx +++ b/connectivity/source/drivers/mysql/YTable.cxx @@ -352,7 +352,7 @@ void OMySQLTable::dropDefaultValue(const ::rtl::OUString& _rColName) // ----------------------------------------------------------------------------- ::rtl::OUString OMySQLTable::getAlterTableColumnPart() { - ::rtl::OUString sSql = ::rtl::OUString::createFromAscii("ALTER TABLE "); + ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " )); const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sComposedName( diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx index 7248e3a7327d..26dfb19dfcdb 100644 --- a/connectivity/source/drivers/mysql/YTables.cxx +++ b/connectivity/source/drivers/mysql/YTables.cxx @@ -157,7 +157,7 @@ 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::OUString::createFromAscii("DROP "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP " )); Reference<XPropertySet> xProp(xObject,UNO_QUERY); sal_Bool bIsView = xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == ::rtl::OUString::createFromAscii("VIEW"); diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx index 0cdd1bf5e8c4..b8b4f830c79d 100644 --- a/connectivity/source/drivers/mysql/YUser.cxx +++ b/connectivity/source/drivers/mysql/YUser.cxx @@ -131,16 +131,16 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName if ( xRes.is() ) { - static const ::rtl::OUString sSELECT = ::rtl::OUString::createFromAscii("SELECT"); - static const ::rtl::OUString sINSERT = ::rtl::OUString::createFromAscii("INSERT"); - static const ::rtl::OUString sUPDATE = ::rtl::OUString::createFromAscii("UPDATE"); - static const ::rtl::OUString sDELETE = ::rtl::OUString::createFromAscii("DELETE"); - static const ::rtl::OUString sREAD = ::rtl::OUString::createFromAscii("READ"); - static const ::rtl::OUString sCREATE = ::rtl::OUString::createFromAscii("CREATE"); - static const ::rtl::OUString sALTER = ::rtl::OUString::createFromAscii("ALTER"); - static const ::rtl::OUString sREFERENCE = ::rtl::OUString::createFromAscii("REFERENCE"); - static const ::rtl::OUString sDROP = ::rtl::OUString::createFromAscii("DROP"); - static const ::rtl::OUString sYes = ::rtl::OUString::createFromAscii("YES"); + 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" )); nRightsWithGrant = nRights = 0; diff --git a/connectivity/source/drivers/mysql/YUsers.cxx b/connectivity/source/drivers/mysql/YUsers.cxx index da6e024fef62..05ba70939844 100644 --- a/connectivity/source/drivers/mysql/YUsers.cxx +++ b/connectivity/source/drivers/mysql/YUsers.cxx @@ -81,7 +81,7 @@ Reference< XPropertySet > OUsers::createDescriptor() // XAppend sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("GRANT USAGE ON * TO "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "GRANT USAGE ON * TO " )); ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sUserName( _rForName ); aSql += ::dbtools::quoteName(aQuote,sUserName) @@ -106,7 +106,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::OUString::createFromAscii("REVOKE ALL ON * FROM "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "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 767ae19cdb48..80c691cfbfe9 100644 --- a/connectivity/source/drivers/mysql/YViews.cxx +++ b/connectivity/source/drivers/mysql/YViews.cxx @@ -113,7 +113,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::OUString::createFromAscii("DROP VIEW"); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP VIEW" )); Reference<XPropertySet> xProp(xObject,UNO_QUERY); aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::eInTableDefinitions, false, false, true ); @@ -136,7 +136,7 @@ void OViews::createView( const Reference< XPropertySet >& descriptor ) { Reference<XConnection> xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE VIEW "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE VIEW " )); ::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sSchema,sCommand; diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index e07d051f2099..6770fa447a5a 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -202,16 +202,11 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W try { // some strings we need - const ::rtl::OUString sConfigurationProviderServiceName = - ::rtl::OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider"); - const ::rtl::OUString sDriverManagerConfigLocation = - ::rtl::OUString::createFromAscii("org.openoffice.Office.DataAccess/DriverManager"); - const ::rtl::OUString sDriverPreferenceLocation = - ::rtl::OUString::createFromAscii("DriverPrecedence"); - const ::rtl::OUString sNodePathArgumentName = - ::rtl::OUString::createFromAscii("nodepath"); - const ::rtl::OUString sNodeAccessServiceName = - ::rtl::OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess"); + const ::rtl::OUString sConfigurationProviderServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" )); + const ::rtl::OUString sDriverManagerConfigLocation( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.DataAccess/DriverManager" )); + const ::rtl::OUString sDriverPreferenceLocation( RTL_CONSTASCII_USTRINGPARAM( "DriverPrecedence" )); + const ::rtl::OUString sNodePathArgumentName( RTL_CONSTASCII_USTRINGPARAM( "nodepath" )); + const ::rtl::OUString sNodeAccessServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" )); // create a configuration provider Reference< XMultiServiceFactory > xConfigurationProvider; diff --git a/connectivity/source/manager/mregistration.cxx b/connectivity/source/manager/mregistration.cxx index afc23aaff31a..6000ab52e694 100644 --- a/connectivity/source/manager/mregistration.cxx +++ b/connectivity/source/manager/mregistration.cxx @@ -60,7 +60,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void* /*_pServiceMana try { - ::rtl::OUString sMainKeyName = ::rtl::OUString::createFromAscii("/"); + ::rtl::OUString sMainKeyName( RTL_CONSTASCII_USTRINGPARAM( "/" )); sMainKeyName += ::drivermanager::OSDBCDriverManager::getImplementationName_static(); sMainKeyName += ::rtl::OUString::createFromAscii("/UNO/SERVICES"); Reference< XRegistryKey > xMainKey = _pRegistryKey->createKey(sMainKeyName); diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index ef07f908836a..90004c9451a3 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -283,7 +283,7 @@ namespace 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_sWildcard = ::rtl::OUString::createFromAscii("%"); + static const ::rtl::OUString s_sWildcard( RTL_CONSTASCII_USTRINGPARAM( "%" )); // we want all catalogues, all schemas, all tables Sequence< ::rtl::OUString > sTableTypes(3); diff --git a/connectivity/workben/iniParser/main.cxx b/connectivity/workben/iniParser/main.cxx index 41c183040d7b..683da1e03d85 100644 --- a/connectivity/workben/iniParser/main.cxx +++ b/connectivity/workben/iniParser/main.cxx @@ -97,7 +97,7 @@ public: sal_uInt64 nSize = 0; osl_getFileSize(handle, &nSize); - OUString sectionName = OUString::createFromAscii("no name section"); + OUString sectionName( RTL_CONSTASCII_USTRINGPARAM( "no name section" )); while (true) { sal_uInt64 nPos; diff --git a/connectivity/workben/little/main.cxx b/connectivity/workben/little/main.cxx index 2bed1a8496f8..cb41137ce3a8 100644 --- a/connectivity/workben/little/main.cxx +++ b/connectivity/workben/little/main.cxx @@ -87,7 +87,7 @@ void _cdecl main( int argc, char * argv[] ) Reference<XResultSet> xRes = xStmt->executeQuery(OUString::createFromAscii("SELECT * FROM Tele")); if(xRes.is()) { - ::rtl::OUString aPat = ::rtl::OUString::createFromAscii("%s\t"); + ::rtl::OUString aPat( RTL_CONSTASCII_USTRINGPARAM( "%s\t" )); Reference<XRow> xRow(xRes,UNO_QUERY); Reference<XResultSetMetaData> xMeta = Reference<XResultSetMetaDataSupplier>(xRes,UNO_QUERY)->getMetaData(); for(sal_Int32 i=1;i<xMeta->getColumnCount();++i) |