diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 11:39:07 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 10:48:30 +0000 |
commit | 39d45390f4fab1e9e85f211d74ed2c08fda5b652 (patch) | |
tree | ac4b224a66a18429cd4722a61ee3d401f8e9951c /connectivity/source | |
parent | 5c908d0431ee975c1ee7aa245af83b9eb7f95da6 (diff) |
removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarations
s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms
Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b
Reviewed-on: https://gerrit.libreoffice.org/2835
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'connectivity/source')
28 files changed, 78 insertions, 80 deletions
diff --git a/connectivity/source/commontools/AutoRetrievingBase.cxx b/connectivity/source/commontools/AutoRetrievingBase.cxx index c3a136678020..ffbb348dcd60 100644 --- a/connectivity/source/commontools/AutoRetrievingBase.cxx +++ b/connectivity/source/commontools/AutoRetrievingBase.cxx @@ -29,8 +29,8 @@ namespace connectivity if ( sStmt.startsWith("INSERT") ) { sStatement = m_sGeneratedValueStatement; - static const ::rtl::OUString sColumn(RTL_CONSTASCII_USTRINGPARAM("$column")); - static const ::rtl::OUString sTable(RTL_CONSTASCII_USTRINGPARAM("$table")); + static const ::rtl::OUString sColumn("$column"); + static const ::rtl::OUString sTable("$table"); sal_Int32 nIndex = 0; nIndex = sStatement.indexOf(sColumn,nIndex); if ( -1 != nIndex ) diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index 7d19e700dfbf..a8408fe83cb6 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -118,7 +118,7 @@ OConnectionWrapper::~OConnectionWrapper() aSupported = m_xServiceInfo->getSupportedServiceNames(); // append our own service, if necessary - ::rtl::OUString sConnectionService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdbc.Connection" ) ); + ::rtl::OUString sConnectionService( "com.sun.star.sdbc.Connection" ); if ( 0 == ::comphelper::findValue( aSupported, sConnectionService, sal_True ).getLength() ) { sal_Int32 nLen = aSupported.getLength(); diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index f102744f10f6..b9c0b3d98f04 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -83,8 +83,8 @@ using namespace ::com::sun::star::uno; ::rtl::OUString aTemp; _rxTypeConverter->convertToSimpleType(_rVal, TypeClass_STRING) >>= aTemp; sal_Int32 nIndex = (sal_Int32)-1; - const ::rtl::OUString sQuot(RTL_CONSTASCII_USTRINGPARAM("\'")); - const ::rtl::OUString sQuotToReplace(RTL_CONSTASCII_USTRINGPARAM("\'\'")); + const ::rtl::OUString sQuot("\'"); + const ::rtl::OUString sQuotToReplace("\'\'"); do { nIndex += 2; @@ -258,7 +258,7 @@ void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant, if ((NumberFormat::NUMBER == nRealUsedTypeClass) && (NumberFormat::PERCENT == nTypeClass)) { // formatting should be "percent", but the String provides just a simple number -> adjust ::rtl::OUString sExpanded(rString); - static ::rtl::OUString s_sPercentSymbol( RTL_CONSTASCII_USTRINGPARAM( "%" )); + static ::rtl::OUString s_sPercentSymbol( "%" ); // 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/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx index 8b94f6919d0c..1bdf05ee6fce 100644 --- a/connectivity/source/commontools/DriversConfig.cxx +++ b/connectivity/source/commontools/DriversConfig.cxx @@ -43,7 +43,7 @@ namespace if ( aPropertiesNode.isValid() ) { uno::Sequence< ::rtl::OUString > aStringSeq; - static const ::rtl::OUString s_sValue(RTL_CONSTASCII_USTRINGPARAM("/Value")); + static const ::rtl::OUString s_sValue("/Value"); const uno::Sequence< ::rtl::OUString > aProperties = aPropertiesNode.getNodeNames(); const ::rtl::OUString* pPropertiesIter = aProperties.getConstArray(); const ::rtl::OUString* pPropertiesEnd = pPropertiesIter + aProperties.getLength(); @@ -96,7 +96,7 @@ void DriversConfigImpl::Load(const uno::Reference< uno::XComponentContext >& _rx { if ( !m_aInstalled.isValid() ) { - static const ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess.Drivers/Installed")); ///Installed + static const ::rtl::OUString s_sNodeName("org.openoffice.Office.DataAccess.Drivers/Installed"); ///Installed m_aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(_rxORB, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY); } diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index 309ec2fe58c1..65ef48317858 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -1060,8 +1060,8 @@ bool ORowSetValue::getBool() const case DataType::LONGVARCHAR: { const ::rtl::OUString sValue(m_aValue.m_pString); - const static ::rtl::OUString s_sTrue(RTL_CONSTASCII_USTRINGPARAM("true")); - const static ::rtl::OUString s_sFalse(RTL_CONSTASCII_USTRINGPARAM("false")); + const static ::rtl::OUString s_sTrue("true"); + const static ::rtl::OUString s_sFalse("false"); if ( sValue.equalsIgnoreAsciiCase(s_sTrue) ) { bRet = sal_True; diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx index 0f7830fa2692..8f68406813c3 100644 --- a/connectivity/source/commontools/TColumnsHelper.cxx +++ b/connectivity/source/commontools/TColumnsHelper.cxx @@ -177,7 +177,7 @@ sdbcx::ObjectType OColumnsHelper::appendObject( const ::rtl::OUString& _rForName return cloneDescriptor( descriptor ); Reference<XDatabaseMetaData> xMetaData = m_pTable->getConnection()->getMetaData(); - ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " )); + ::rtl::OUString aSql( "ALTER TABLE " ); aSql += ::dbtools::composeTableName( xMetaData, m_pTable, ::dbtools::eInTableDefinitions, false, false, true ); aSql += ::rtl::OUString(" ADD "); @@ -198,7 +198,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_CONSTASCII_USTRINGPARAM( "ALTER TABLE " )); + ::rtl::OUString aSql( "ALTER TABLE " ); Reference<XDatabaseMetaData> xMetaData = m_pTable->getConnection()->getMetaData(); ::rtl::OUString aQuote = xMetaData->getIdentifierQuoteString( ); diff --git a/connectivity/source/commontools/TIndexColumns.cxx b/connectivity/source/commontools/TIndexColumns.cxx index c64e94bf1d14..eb04b27eb391 100644 --- a/connectivity/source/commontools/TIndexColumns.cxx +++ b/connectivity/source/commontools/TIndexColumns.cxx @@ -60,7 +60,7 @@ sdbcx::ObjectType OIndexColumns::createObject(const ::rtl::OUString& _rName) if ( xResult.is() ) { Reference< XRow > xRow(xResult,UNO_QUERY); - ::rtl::OUString aD(RTL_CONSTASCII_USTRINGPARAM("D")); + ::rtl::OUString aD("D"); while( xResult->next() ) { if(xRow->getString(9) == _rName) diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx index ea28c41c451e..d1db21506511 100644 --- a/connectivity/source/commontools/TIndexes.cxx +++ b/connectivity/source/commontools/TIndexes.cxx @@ -138,7 +138,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const ::rtl::OUString& _rForName ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); ::rtl::OUStringBuffer aSql( ::rtl::OUString("CREATE ")); ::rtl::OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); - ::rtl::OUString aDot( RTL_CONSTASCII_USTRINGPARAM( "." )); + ::rtl::OUString aDot( "." ); if(comphelper::getBOOL(descriptor->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_ISUNIQUE)))) aSql.appendAscii("UNIQUE "); @@ -226,7 +226,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_CONSTASCII_USTRINGPARAM( "DROP INDEX " )); + ::rtl::OUString aSql( "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/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index 3822b9af2ecd..e17eaa5a013c 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -122,13 +122,13 @@ namespace connectivity Reference<XMultiServiceFactory> xFac(_xConnection,UNO_QUERY); if ( xFac.is() ) { - static const ::rtl::OUString s_sTableRename(RTL_CONSTASCII_USTRINGPARAM("TableRenameServiceName")); + static const ::rtl::OUString s_sTableRename("TableRenameServiceName"); m_xRename.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sTableRename)),UNO_QUERY); - static const ::rtl::OUString s_sTableAlteration(RTL_CONSTASCII_USTRINGPARAM("TableAlterationServiceName")); + static const ::rtl::OUString s_sTableAlteration("TableAlterationServiceName"); m_xAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sTableAlteration)),UNO_QUERY); - static const ::rtl::OUString s_sKeyAlteration(RTL_CONSTASCII_USTRINGPARAM("KeyAlterationServiceName")); + static const ::rtl::OUString s_sKeyAlteration("KeyAlterationServiceName"); m_xKeyAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sKeyAlteration)),UNO_QUERY); - static const ::rtl::OUString s_sIndexAlteration(RTL_CONSTASCII_USTRINGPARAM("IndexAlterationServiceName")); + static const ::rtl::OUString s_sIndexAlteration("IndexAlterationServiceName"); m_xIndexAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sIndexAlteration)),UNO_QUERY); } } @@ -475,7 +475,7 @@ void OTableHelper::refreshIndexes() // ----------------------------------------------------------------------------- ::rtl::OUString OTableHelper::getRenameStart() const { - ::rtl::OUString sSql(RTL_CONSTASCII_USTRINGPARAM("RENAME ")); + ::rtl::OUString sSql("RENAME "); if ( m_Type == ::rtl::OUString("VIEW") ) sSql += ::rtl::OUString(" VIEW "); else diff --git a/connectivity/source/commontools/conncleanup.cxx b/connectivity/source/commontools/conncleanup.cxx index 94ab93245bbc..2da06c8f9179 100644 --- a/connectivity/source/commontools/conncleanup.cxx +++ b/connectivity/source/commontools/conncleanup.cxx @@ -35,7 +35,7 @@ namespace dbtools //===================================================================== static const ::rtl::OUString& getActiveConnectionPropertyName() { - static const ::rtl::OUString s_sActiveConnectionPropertyName( RTL_CONSTASCII_USTRINGPARAM( "ActiveConnection" )); + static const ::rtl::OUString s_sActiveConnectionPropertyName( "ActiveConnection" ); return s_sActiveConnectionPropertyName; } diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx index 087495d26fc1..698ce2e37e18 100644 --- a/connectivity/source/commontools/dbconversion.cxx +++ b/connectivity/source/commontools/dbconversion.cxx @@ -441,7 +441,7 @@ namespace dbtools { // our time struct only supports hundredth seconds sNano = sNano.copy(0,::std::min<sal_Int32>(sNano.getLength(),2)); - const static ::rtl::OUString s_Zeros(RTL_CONSTASCII_USTRINGPARAM("00")); + const static ::rtl::OUString s_Zeros("00"); sNano += s_Zeros.copy(0,s_Zeros.getLength() - sNano.getLength()); nHundredthSeconds = static_cast<sal_uInt16>(sNano.toInt32()); } diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index d06ca5e4e276..499e6b23ca83 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -393,7 +393,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_CONSTASCII_USTRINGPARAM( "User" )); + const ::rtl::OUString sUserProp( "User" ); ::rtl::OUString sDataSourceName; xRowSetProps->getPropertyValue(::rtl::OUString("DataSourceName")) >>= sDataSourceName; ::rtl::OUString sURL; @@ -952,7 +952,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_CONSTASCII_USTRINGPARAM( "NumberFormatsSupplier" )); + ::rtl::OUString sPropFormatsSupplier( "NumberFormatsSupplier" ); if (xConnAsChild.is()) { Reference< XPropertySet> xConnParentProps(xConnAsChild->getParent(), UNO_QUERY); @@ -990,22 +990,22 @@ try Property* pOldProps = aOldProperties.getArray(); Property* pNewProps = aNewProperties.getArray(); - ::rtl::OUString sPropDefaultControl(RTL_CONSTASCII_USTRINGPARAM("DefaultControl")); - ::rtl::OUString sPropLabelControl(RTL_CONSTASCII_USTRINGPARAM("LabelControl")); - ::rtl::OUString sPropFormatsSupplier(RTL_CONSTASCII_USTRINGPARAM("FormatsSupplier")); - ::rtl::OUString sPropCurrencySymbol(RTL_CONSTASCII_USTRINGPARAM("CurrencySymbol")); - ::rtl::OUString sPropDecimals(RTL_CONSTASCII_USTRINGPARAM("Decimals")); - ::rtl::OUString sPropEffectiveMin(RTL_CONSTASCII_USTRINGPARAM("EffectiveMin")); - ::rtl::OUString sPropEffectiveMax(RTL_CONSTASCII_USTRINGPARAM("EffectiveMax")); - ::rtl::OUString sPropEffectiveDefault(RTL_CONSTASCII_USTRINGPARAM("EffectiveDefault")); - ::rtl::OUString sPropDefaultText(RTL_CONSTASCII_USTRINGPARAM("DefaultText")); - ::rtl::OUString sPropDefaultDate(RTL_CONSTASCII_USTRINGPARAM("DefaultDate")); - ::rtl::OUString sPropDefaultTime(RTL_CONSTASCII_USTRINGPARAM("DefaultTime")); - ::rtl::OUString sPropValueMin(RTL_CONSTASCII_USTRINGPARAM("ValueMin")); - ::rtl::OUString sPropValueMax(RTL_CONSTASCII_USTRINGPARAM("ValueMax")); - ::rtl::OUString sPropDecimalAccuracy(RTL_CONSTASCII_USTRINGPARAM("DecimalAccuracy")); - ::rtl::OUString sPropClassId(RTL_CONSTASCII_USTRINGPARAM("ClassId")); - ::rtl::OUString sFormattedServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.FormattedField" ) ); + ::rtl::OUString sPropDefaultControl("DefaultControl"); + ::rtl::OUString sPropLabelControl("LabelControl"); + ::rtl::OUString sPropFormatsSupplier("FormatsSupplier"); + ::rtl::OUString sPropCurrencySymbol("CurrencySymbol"); + ::rtl::OUString sPropDecimals("Decimals"); + ::rtl::OUString sPropEffectiveMin("EffectiveMin"); + ::rtl::OUString sPropEffectiveMax("EffectiveMax"); + ::rtl::OUString sPropEffectiveDefault("EffectiveDefault"); + ::rtl::OUString sPropDefaultText("DefaultText"); + ::rtl::OUString sPropDefaultDate("DefaultDate"); + ::rtl::OUString sPropDefaultTime("DefaultTime"); + ::rtl::OUString sPropValueMin("ValueMin"); + ::rtl::OUString sPropValueMax("ValueMax"); + ::rtl::OUString sPropDecimalAccuracy("DecimalAccuracy"); + ::rtl::OUString sPropClassId("ClassId"); + ::rtl::OUString sFormattedServiceName( "com.sun.star.form.component.FormattedField" ); for (sal_Int16 i=0; i<aOldProperties.getLength(); ++i) { diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index a348e8743c66..4d6d802f046d 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -229,7 +229,7 @@ namespace static const ::rtl::OUString sComma(::rtl::OUString(",")); const ::rtl::OUString sQuote(_xMetaData->getIdentifierQuoteString()); - ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( " (" )); + ::rtl::OUString sSql( " (" ); Reference< XPropertySet > xColProp; sal_Int32 nColCount = _xColumns->getCount(); @@ -673,15 +673,15 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData, Reference< XRow > xCurrentRow(xPrivileges, UNO_QUERY); const ::rtl::OUString sUserWorkingFor = _xMetaData->getUserName(); - 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 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" ); if ( xCurrentRow.is() ) { @@ -795,7 +795,7 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData, } catch(const SQLException& e) { - static ::rtl::OUString sNotSupportedState( RTL_CONSTASCII_USTRINGPARAM( "IM001" )); + static ::rtl::OUString sNotSupportedState( "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 | @@ -966,19 +966,19 @@ sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const ::rtl::OUString& } ::rtl::OUString lcl_getReportEngines() { - static ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess/ReportEngines")); + static ::rtl::OUString s_sNodeName("org.openoffice.Office.DataAccess/ReportEngines"); return s_sNodeName; } // ----------------------------------------------------------------------------- ::rtl::OUString lcl_getDefaultReportEngine() { - static ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("DefaultReportEngine")); + static ::rtl::OUString s_sNodeName("DefaultReportEngine"); return s_sNodeName; } // ----------------------------------------------------------------------------- ::rtl::OUString lcl_getReportEngineNames() { - static ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("ReportEngineNames")); + static ::rtl::OUString s_sNodeName("ReportEngineNames"); return s_sNodeName; } // ----------------------------------------------------------------------------- @@ -1000,7 +1000,7 @@ sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const ::rtl::OUString& if ( aReportEngine.isValid() ) { ::rtl::OUString sRet; - const static ::rtl::OUString s_sService(RTL_CONSTASCII_USTRINGPARAM("ServiceName")); + const static ::rtl::OUString s_sService("ServiceName"); aReportEngine.getNodeValue(s_sService) >>= sRet; return sRet; } diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx index 46be1486fc2d..972e6831eee6 100644 --- a/connectivity/source/commontools/parameters.cxx +++ b/connectivity/source/commontools/parameters.cxx @@ -380,7 +380,7 @@ namespace dbtools // did we find links where the detail field refers to a detail column (instead of a parameter name)? if ( !aAdditionalFilterComponents.empty() ) { - const static ::rtl::OUString s_sAnd( RTL_CONSTASCII_USTRINGPARAM( " AND " ) ); + const static ::rtl::OUString s_sAnd( " AND " ); // build a conjunction of all the filter components ::rtl::OUStringBuffer sAdditionalFilter; for ( ::std::vector< ::rtl::OUString >::const_iterator aComponent = aAdditionalFilterComponents.begin(); diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index 43ac90c181e4..42d60a047d7c 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -156,8 +156,8 @@ namespace dbtools ) ) { - static const ::rtl::OUString sSingleQuote( RTL_CONSTASCII_USTRINGPARAM( "'" ) ); - static const ::rtl::OUString sDoubleQuote( RTL_CONSTASCII_USTRINGPARAM( "''" ) ); + static const ::rtl::OUString sSingleQuote( "'" ); + static const ::rtl::OUString sDoubleQuote( "''" ); sal_Int32 nIndex = -1; sal_Int32 nTemp = 0; @@ -306,8 +306,8 @@ namespace dbtools if ( bValidQuotedText ) { sValue = sValue.copy( 1, sValue.getLength() - 2 ); - static const ::rtl::OUString sSingleQuote( RTL_CONSTASCII_USTRINGPARAM( "'" ) ); - static const ::rtl::OUString sDoubleQuote( RTL_CONSTASCII_USTRINGPARAM( "''" ) ); + static const ::rtl::OUString sSingleQuote( "'" ); + static const ::rtl::OUString sDoubleQuote( "''" ); sal_Int32 nIndex = -1; sal_Int32 nTemp = 0; diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx index 7a10ad2318d7..075978fd7b03 100644 --- a/connectivity/source/commontools/sqlerror.cxx +++ b/connectivity/source/commontools/sqlerror.cxx @@ -115,7 +115,7 @@ namespace connectivity //-------------------------------------------------------------------- const ::rtl::OUString& SQLError_Impl::getMessagePrefix() { - static ::rtl::OUString s_sMessagePrefix( RTL_CONSTASCII_USTRINGPARAM( "[OOoBase]" ) ); + static ::rtl::OUString s_sMessagePrefix( "[OOoBase]" ); return s_sMessagePrefix; } diff --git a/connectivity/source/commontools/statementcomposer.cxx b/connectivity/source/commontools/statementcomposer.cxx index f0bf69a5bb63..40cee318d3a1 100644 --- a/connectivity/source/commontools/statementcomposer.cxx +++ b/connectivity/source/commontools/statementcomposer.cxx @@ -180,7 +180,7 @@ namespace dbtools // the filter sal_Bool bApplyFilter = sal_True; - const ::rtl::OUString sPropApply( RTL_CONSTASCII_USTRINGPARAM( "ApplyFilter" )); + const ::rtl::OUString sPropApply( "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 cdd889797968..83879188af38 100644 --- a/connectivity/source/cpool/ZConnectionPool.cxx +++ b/connectivity/source/cpool/ZConnectionPool.cxx @@ -53,7 +53,7 @@ namespace //-------------------------------------------------------------------- static const ::rtl::OUString& getTimeoutNodeName() { - static ::rtl::OUString s_sNodeName( RTL_CONSTASCII_USTRINGPARAM( "Timeout" )); + static ::rtl::OUString s_sNodeName( "Timeout" ); return s_sNodeName; } diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index 775f0a2aa175..019935d344b4 100644 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx @@ -435,7 +435,7 @@ void OConnection::buildTypeInfo() throw( SQLException) if ( bOk ) { // HACK for access - static const ::rtl::OUString s_sVarChar(RTL_CONSTASCII_USTRINGPARAM("VarChar")); + static const ::rtl::OUString s_sVarChar("VarChar"); do { sal_Int32 nPos = 1; diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx index de0ba5f7e5cf..cca5f6ae001f 100644 --- a/connectivity/source/drivers/ado/APreparedStatement.cxx +++ b/connectivity/source/drivers/ado/APreparedStatement.cxx @@ -68,7 +68,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OTypeInf { // special handling for parameters /* we recusive replace all occurrences of ? in the statement and replace them with name like "" */ sal_Int32 nParameterCount = 0; - ::rtl::OUString sDefaultName( RTL_CONSTASCII_USTRINGPARAM( "parame" )); + ::rtl::OUString sDefaultName( "parame" ); replaceParameterNodeName(pNode,sDefaultName,nParameterCount); pNode->parseNodeToStr( sNewSql, _pConnection ); delete pNode; @@ -215,7 +215,7 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const DataTypeEn m_pParameters->get_Count(&nCount); if(nCount < (parameterIndex-1)) { - ::rtl::OUString sDefaultName( RTL_CONSTASCII_USTRINGPARAM( "parame" )); + ::rtl::OUString sDefaultName( "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 7d754064a480..5d38e0a8b0a9 100644 --- a/connectivity/source/drivers/ado/Awrapado.cxx +++ b/connectivity/source/drivers/ado/Awrapado.cxx @@ -1986,7 +1986,7 @@ ADORecordset* WpADOConnection::getTables( const ::com::sun::star::uno::Any& cata ++nPos; ::rtl::OUStringBuffer aTypes; - ::rtl::OUString aComma( RTL_CONSTASCII_USTRINGPARAM( "," )); + ::rtl::OUString aComma( "," ); const ::rtl::OUString* pIter = types.getConstArray(); const ::rtl::OUString* pEnd = pIter + types.getLength(); for( ; pIter != pEnd ; ++pIter) diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx index ea447b75fc02..22f5a0057834 100644 --- a/connectivity/source/drivers/hsqldb/HCatalog.cxx +++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx @@ -53,8 +53,8 @@ void OHCatalog::refreshObjects(const Sequence< ::rtl::OUString >& _sKindOfObject void OHCatalog::refreshTables() { TStringVector aVector; - 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_sTableTypeView("VIEW"); + static const ::rtl::OUString s_sTableTypeTable("TABLE"); Sequence< ::rtl::OUString > sTableTypes(2); sTableTypes[0] = s_sTableTypeView; diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx index 5667b7547081..9207cdb4b5f8 100644 --- a/connectivity/source/drivers/jdbc/JConnection.cxx +++ b/connectivity/source/drivers/jdbc/JConnection.cxx @@ -757,7 +757,7 @@ void java_sql_Connection::loadDriverFromProperties( const ::rtl::OUString& _sDri // ----------------------------------------------------------------------------- ::rtl::OUString java_sql_Connection::impl_getJavaDriverClassPath_nothrow(const ::rtl::OUString& _sDriverClass) { - static const ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess/JDBC/DriverClassPaths")); + static const ::rtl::OUString s_sNodeName("org.openoffice.Office.DataAccess/JDBC/DriverClassPaths"); ::utl::OConfigurationTreeRoot aNamesRoot = ::utl::OConfigurationTreeRoot::createWithComponentContext( m_pDriver->getContext().getUNOContext(), s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY); ::rtl::OUString sURL; diff --git a/connectivity/source/drivers/mozab/MConfigAccess.cxx b/connectivity/source/drivers/mozab/MConfigAccess.cxx index ee1e1b3c6761..d71c6ece474b 100644 --- a/connectivity/source/drivers/mozab/MConfigAccess.cxx +++ b/connectivity/source/drivers/mozab/MConfigAccess.cxx @@ -46,7 +46,7 @@ namespace connectivity com::sun::star::configuration::theDefaultProvider::get( comphelper::getComponentContext( _rxORB ) ) ); - ::rtl::OUString sCompleteNodePath(RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.DataAccess/DriverSettings/" )); + ::rtl::OUString sCompleteNodePath( "/org.openoffice.Office.DataAccess/DriverSettings/" ); sCompleteNodePath += OConnection::getDriverImplementationName(); //========================================================= diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx index 090a7ca152e5..09d665bde55f 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx @@ -114,8 +114,7 @@ sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists) { nsCOMPtr<nsILocalFile> binDir; // Note: if path3 construction fails, mozilla will default to using MOZILLA_FIVE_HOME in the NS_InitXPCOM2() - rtl::OUString path1( - RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/program")); + rtl::OUString path1("$BRAND_BASE_DIR/program"); rtl::Bootstrap::expandMacros(path1); rtl::OString path2; if ((osl::FileBase::getSystemPathFromFileURL(path1, path1) == diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx index a756e2ce01c8..cb0bd5a86e62 100644 --- a/connectivity/source/drivers/mysql/YCatalog.cxx +++ b/connectivity/source/drivers/mysql/YCatalog.cxx @@ -54,9 +54,9 @@ void OMySQLCatalog::refreshObjects(const Sequence< ::rtl::OUString >& _sKindOfOb void OMySQLCatalog::refreshTables() { TStringVector aVector; - 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; diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx index 7a14c3b20478..e0060e9cd6ee 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.cxx +++ b/connectivity/source/drivers/postgresql/pq_connection.cxx @@ -164,7 +164,7 @@ OUString ConnectionGetImplementationName() } com::sun::star::uno::Sequence<rtl::OUString> ConnectionGetSupportedServiceNames(void) { - OUString serv( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdbc.Connection" ) ); + OUString serv( "com.sun.star.sdbc.Connection" ); return Sequence< OUString> (&serv,1); } diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx b/connectivity/source/drivers/postgresql/pq_driver.cxx index 96e719faf5e0..2d2d03daacef 100644 --- a/connectivity/source/drivers/postgresql/pq_driver.cxx +++ b/connectivity/source/drivers/postgresql/pq_driver.cxx @@ -102,8 +102,7 @@ OUString DriverGetImplementationName() if (! p ) { MutexGuard guard( osl::Mutex::getGlobalMutex() ); - static OUString instance( - RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.connectivity.pq.Driver.noext" ) ); + static OUString instance( "org.openoffice.comp.connectivity.pq.Driver.noext" ); p = &instance; } return *p; @@ -115,7 +114,7 @@ Sequence< OUString > DriverGetSupportedServiceNames() if( ! p ) { MutexGuard guard( osl::Mutex::getGlobalMutex() ); - OUString tmp( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdbc.Driver" ) ); + OUString tmp( "com.sun.star.sdbc.Driver" ); static Sequence< OUString > instance( &tmp,1 ); p = &instance; } |