diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-01-15 22:40:04 -0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-01-16 19:00:12 +0000 |
commit | 1cf1f9338cc37895e2a68b411ffdc44d66357822 (patch) | |
tree | 07441c2d27deb2fc6ef551e439379cb8d2ad6e16 /dbaccess | |
parent | 41cc024a39d070911a5daa75ff8aa9340c71147e (diff) |
fdo#57950: dbaccess: STRINGPARAM and more chained appends
Change-Id: Iab1ba5eb6702d386e2775d7426c3398b606d2d97
Reviewed-on: https://gerrit.libreoffice.org/1706
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/CacheSet.cxx | 23 | ||||
-rw-r--r-- | dbaccess/source/core/api/OptimisticSet.cxx | 84 | ||||
-rw-r--r-- | dbaccess/source/core/api/View.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/query.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/api/querycomposer.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/api/querycontainer.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/ComponentDefinition.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlDataSourceSetting.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlServerDatabase.cxx | 37 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/composerdialogs.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/textconnectionsettings_uno.cxx | 12 |
11 files changed, 72 insertions, 123 deletions
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index 8b8e9242231c..5974d4a11c03 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -156,14 +156,12 @@ void OCacheSet::fillTableName(const Reference<XPropertySet>& _xTable) throw(SQL void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::insertRow" ); - ::rtl::OUStringBuffer aSql(::rtl::OUString("INSERT INTO ")); + OUStringBuffer aSql("INSERT INTO " + m_aComposedTableName + " ( "); Reference<XPropertySet> xSet(_xTable,UNO_QUERY); fillTableName(xSet); - aSql.append(m_aComposedTableName); - aSql.append(::rtl::OUString(" ( ")); // set values and column names - ::rtl::OUStringBuffer aValues = ::rtl::OUString(" VALUES ( "); + ::rtl::OUStringBuffer aValues(" VALUES ( "); static ::rtl::OUString aPara("?,"); ::rtl::OUString aQuote = getIdentifierQuoteString(); static ::rtl::OUString aComma(","); @@ -172,8 +170,7 @@ void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connecti connectivity::ORowVector< ORowSetValue > ::Vector::iterator aEnd = _rInsertRow->get().end(); for(; aIter != aEnd;++aIter) { - aSql.append(::dbtools::quoteName( aQuote,m_xSetMetaData->getColumnName(i++))); - aSql.append(aComma); + aSql.append(::dbtools::quoteName( aQuote,m_xSetMetaData->getColumnName(i++)) + aComma); aValues.append(aPara); } @@ -280,8 +277,7 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow } if(aIter->isModified()) { - _sParameter.append(::dbtools::quoteName( aQuote,aColumnName)); - _sParameter.append(aPara); + _sParameter.append(::dbtools::quoteName( aQuote,aColumnName) + aPara); } } } @@ -292,9 +288,7 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR Reference<XPropertySet> xSet(_xTable,UNO_QUERY); fillTableName(xSet); - ::rtl::OUStringBuffer aSql = ::rtl::OUString("UPDATE "); - aSql.append(m_aComposedTableName); - aSql.append(::rtl::OUString(" SET ")); + OUStringBuffer aSql("UPDATE " + m_aComposedTableName + " SET "); // list all cloumns that should be set ::rtl::OUStringBuffer aCondition; @@ -305,8 +299,7 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR { aCondition.setLength(aCondition.getLength()-5); - aSql.append(::rtl::OUString(" WHERE ")); - aSql.append(aCondition.makeStringAndClear()); + aSql.append(" WHERE " + aCondition.makeStringAndClear()); } else ::dbtools::throwSQLException( @@ -340,9 +333,7 @@ void SAL_CALL OCacheSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connecti Reference<XPropertySet> xSet(_xTable,UNO_QUERY); fillTableName(xSet); - ::rtl::OUStringBuffer aSql = ::rtl::OUString("DELETE FROM "); - aSql.append(m_aComposedTableName); - aSql.append(::rtl::OUString(" WHERE ")); + OUStringBuffer aSql("DELETE FROM " + m_aComposedTableName + " WHERE "); // list all cloumns that should be set ::rtl::OUString aQuote = getIdentifierQuoteString(); diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index ca6f1b59cf33..e68cc7e9ede0 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -74,12 +74,12 @@ namespace { ::rtl::OUStringBuffer& rKeyCondition = io_aKeyConditions[i_sTableName]; if ( rKeyCondition.getLength() ) - rKeyCondition.appendAscii(" AND "); + rKeyCondition.append(" AND "); rKeyCondition.append(i_sQuotedColumnName); if ( i_aValue.isNull() ) - rKeyCondition.appendAscii(" IS NULL"); + rKeyCondition.append(" IS NULL"); else - rKeyCondition.appendAscii(" = ?"); + rKeyCondition.append(" = ?"); } } @@ -214,9 +214,8 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow } ::rtl::OUStringBuffer& rPart = aSql[aIter->second.sTableName]; if ( rPart.getLength() ) - rPart.appendAscii(", "); - rPart.append(sQuotedColumnName); - rPart.append(s_sPara); + rPart.append(", "); + rPart.append(sQuotedColumnName + s_sPara); } } @@ -238,18 +237,14 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow if ( aSqlIter->second.getLength() ) { m_bResultSetChanged = m_bResultSetChanged || aResultSetChanged[aSqlIter->first]; - ::rtl::OUStringBuffer sSql(s_sUPDATE); ::rtl::OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); - sSql.append( ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ) ); - sSql.append(s_sSET); - sSql.append(aSqlIter->second.toString()); + ::rtl::OUStringBuffer sSql(s_sUPDATE + ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ) + + s_sSET + aSqlIter->second.toString()); ::rtl::OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first]; if ( rCondition.getLength() ) - { - sSql.appendAscii(" WHERE "); - sSql.append( rCondition.toString() ); - } + sSql.append(" WHERE " + rCondition.toString() ); + executeUpdate(_rInsertRow ,_rOrginalRow,sSql.makeStringAndClear(),aSqlIter->first); } } @@ -287,12 +282,12 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn } ::rtl::OUStringBuffer& rPart = aSql[aIter->second.sTableName]; if ( rPart.getLength() ) - rPart.appendAscii(", "); + rPart.append(", "); rPart.append(sQuotedColumnName); ::rtl::OUStringBuffer& rParam = aParameter[aIter->second.sTableName]; if ( rParam.getLength() ) - rParam.appendAscii(", "); - rParam.appendAscii("?"); + rParam.append(", "); + rParam.append("?"); } } if ( aParameter.empty() ) @@ -308,31 +303,21 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn if ( aSqlIter->second.getLength() ) { m_bResultSetChanged = m_bResultSetChanged || aResultSetChanged[aSqlIter->first]; - ::rtl::OUStringBuffer sSql(s_sINSERT); ::rtl::OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); ::rtl::OUString sComposedTableName = ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ); - sSql.append(sComposedTableName); - sSql.appendAscii(" ( "); - sSql.append(aSqlIter->second.toString()); - sSql.append(s_sVALUES); - sSql.append(aParameter[aSqlIter->first].toString()); - sSql.appendAscii(" )"); + ::rtl::OUString sSql(s_sINSERT + sComposedTableName + " ( " + aSqlIter->second.toString() + + s_sVALUES + aParameter[aSqlIter->first].toString() + " )"); ::rtl::OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first]; if ( rCondition.getLength() ) { - ::rtl::OUStringBuffer sQuery; - sQuery.appendAscii("SELECT "); - sQuery.append(aSqlIter->second.toString()); - sQuery.appendAscii(" FROM "); - sQuery.append(sComposedTableName); - sQuery.appendAscii(" WHERE "); - sQuery.append(rCondition.toString()); + ::rtl::OUString sQuery("SELECT " + aSqlIter->second.toString() + " FROM " + sComposedTableName + + " WHERE " + rCondition.toString()); try { - Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(sQuery.makeStringAndClear())); + Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(sQuery)); Reference< XParameters > xParameter(xPrep,UNO_QUERY); // and then the values of the where condition SelectColumnsMetaData::iterator aKeyCol = m_pKeyColumnNames->begin(); @@ -358,7 +343,7 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn } } - executeInsert(_rInsertRow,sSql.makeStringAndClear(),aSqlIter->first); + executeInsert(_rInsertRow,sSql,aSqlIter->first); } } } @@ -393,14 +378,11 @@ void SAL_CALL OptimisticSet::deleteRow(const ORowSetRow& _rDeleteRow,const conne ::rtl::OUStringBuffer& rCondition = aSqlIter->second; if ( rCondition.getLength() ) { - ::rtl::OUStringBuffer sSql; - sSql.appendAscii("DELETE FROM "); ::rtl::OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); - sSql.append( ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ) ); - sSql.appendAscii(" WHERE "); - sSql.append( rCondition.toString() ); - executeDelete(_rDeleteRow,sSql.makeStringAndClear(),aSqlIter->first); + ::rtl::OUString sSql("DELETE FROM " + ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ) + + " WHERE " + rCondition.toString() ); + executeDelete(_rDeleteRow, sSql, aSqlIter->first); } } } @@ -440,15 +422,10 @@ void OptimisticSet::fillJoinedColumns_throw(const ::std::vector< TNodePair >& i_ { ::rtl::OUString sColumnName,sTableName; m_aSqlIterator.getColumnRange(aIter->first,sColumnName,sTableName); - ::rtl::OUStringBuffer sLeft,sRight; - sLeft.append(sTableName); - sLeft.appendAscii("."); - sLeft.append(sColumnName); + ::rtl::OUString sLeft(sTableName + "." + sColumnName); m_aSqlIterator.getColumnRange(aIter->second,sColumnName,sTableName); - sRight.append(sTableName); - sRight.appendAscii("."); - sRight.append(sColumnName); - fillJoinedColumns_throw(sLeft.makeStringAndClear(),sRight.makeStringAndClear()); + ::rtl::OUString sRight(sTableName + "." + sColumnName); + fillJoinedColumns_throw(sLeft, sRight); } } @@ -645,7 +622,7 @@ void OptimisticSet::fillMissingValues(ORowSetValueVector::Vector& io_aRow) const } ::rtl::OUStringBuffer& rPart = aSql[aColIter->second.sTableName]; if ( rPart.getLength() ) - rPart.appendAscii(", "); + rPart.append(", "); rPart.append(sQuotedColumnName); } Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData(); @@ -661,17 +638,12 @@ void OptimisticSet::fillMissingValues(ORowSetValueVector::Vector& io_aRow) const ::rtl::OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); ::rtl::OUString sComposedTableName = ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ); - ::rtl::OUStringBuffer sQuery; - sQuery.appendAscii("SELECT "); - sQuery.append(aSqlIter->second.toString()); - sQuery.appendAscii(" FROM "); - sQuery.append(sComposedTableName); - sQuery.appendAscii(" WHERE "); - sQuery.append(rCondition.makeStringAndClear()); + ::rtl::OUString sQuery("SELECT " + aSqlIter->second.toString() + " FROM " + sComposedTableName + " WHERE " + + rCondition.makeStringAndClear()); try { - Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(sQuery.makeStringAndClear())); + Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(sQuery)); Reference< XParameters > xParameter(xPrep,UNO_QUERY); // and then the values of the where condition SelectColumnsMetaData::iterator aKeyIter = m_pKeyColumnNames->begin(); diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx index 54c735438928..8ab90a35105b 100644 --- a/dbaccess/source/core/api/View.cxx +++ b/dbaccess/source/core/api/View.cxx @@ -69,7 +69,7 @@ namespace dbaccess try { Reference<XMultiServiceFactory> xFac(_rxConnection,UNO_QUERY_THROW); - static const ::rtl::OUString s_sViewAccess(RTL_CONSTASCII_USTRINGPARAM("ViewAccessServiceName")); + static const ::rtl::OUString s_sViewAccess("ViewAccessServiceName"); m_xViewAccess.set(xFac->createInstance(lcl_getServiceNameForSetting(_rxConnection,s_sViewAccess)),UNO_QUERY); } catch(const Exception& ) diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx index e89d80eae03a..ed944d85af97 100644 --- a/dbaccess/source/core/api/query.cxx +++ b/dbaccess/source/core/api/query.cxx @@ -362,9 +362,9 @@ void OQuery::registerProperties() &m_aLayoutInformation, ::getCppuType(&m_aLayoutInformation)); } -::rtl::OUString OQuery::determineContentType() const +OUString OQuery::determineContentType() const { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseQuery" ) ); + return OUString( "application/vnd.org.openoffice.DatabaseQuery" ); } } // namespace dbaccess diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx index d84e771560dd..c970878a46b0 100644 --- a/dbaccess/source/core/api/querycomposer.cxx +++ b/dbaccess/source/core/api/querycomposer.cxx @@ -131,10 +131,10 @@ Any SAL_CALL OQueryComposer::queryInterface( const Type & rType ) throw(RuntimeE } // XServiceInfo -rtl::OUString OQueryComposer::getImplementationName( ) throw(RuntimeException) +OUString OQueryComposer::getImplementationName( ) throw(RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getImplementationName" ); - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.dbaccess.OQueryComposer")); + return OUString("com.sun.star.sdb.dbaccess.OQueryComposer"); } sal_Bool OQueryComposer::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException) diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx index 9744c161ceb5..11717a0b4742 100644 --- a/dbaccess/source/core/api/querycontainer.cxx +++ b/dbaccess/source/core/api/querycontainer.cxx @@ -328,7 +328,7 @@ void SAL_CALL OQueryContainer::disposing( const ::com::sun::star::lang::EventObj ::rtl::OUString OQueryContainer::determineContentType() const { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseQueryContainer" ) ); + return ::rtl::OUString( "application/vnd.org.openoffice.DatabaseQueryContainer" ); } Reference< XContent > OQueryContainer::implCreateWrapper(const ::rtl::OUString& _rName) diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx index d57bdf66bc18..5380332f661c 100644 --- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx +++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx @@ -148,9 +148,9 @@ IMPLEMENT_IMPLEMENTATION_ID(OComponentDefinition); IMPLEMENT_GETTYPES3(OComponentDefinition,ODataSettings,OContentHelper,OComponentDefinition_BASE); IMPLEMENT_FORWARD_XINTERFACE3( OComponentDefinition,OContentHelper,ODataSettings,OComponentDefinition_BASE) -::rtl::OUString OComponentDefinition::getImplementationName_static( ) throw(RuntimeException) +OUString OComponentDefinition::getImplementationName_static( ) throw(RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dba.OComponentDefinition")); + return OUString("com.sun.star.comp.dba.OComponentDefinition"); } ::rtl::OUString SAL_CALL OComponentDefinition::getImplementationName( ) throw(RuntimeException) @@ -162,7 +162,7 @@ Sequence< ::rtl::OUString > OComponentDefinition::getSupportedServiceNames_stati { Sequence< ::rtl::OUString > aServices(2); aServices.getArray()[0] = SERVICE_SDB_TABLEDEFINITION; - aServices.getArray()[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.Content")); + aServices.getArray()[1] = ::rtl::OUString("com.sun.star.ucb.Content"); return aServices; } @@ -208,8 +208,8 @@ Reference< XPropertySetInfo > SAL_CALL OComponentDefinition::getPropertySetInfo( ::rtl::OUString OComponentDefinition::determineContentType() const { return m_bTable - ? ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseTable" ) ) - : ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseCommandDefinition" ) ); + ? ::rtl::OUString( "application/vnd.org.openoffice.DatabaseTable" ) + : ::rtl::OUString( "application/vnd.org.openoffice.DatabaseCommandDefinition" ); } Reference< XNameAccess> OComponentDefinition::getColumns() throw (RuntimeException) diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx index c893a50789c1..02ea80bcad40 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx @@ -182,10 +182,9 @@ Any OXMLDataSourceSetting::convertString(const ::com::sun::star::uno::Type& _rEx sal_Bool bSuccess = #endif ::sax::Converter::convertBool(bValue, _rReadCharacters); - OSL_ENSURE(bSuccess, - ::rtl::OStringBuffer("OXMLDataSourceSetting::convertString: could not convert \"") - .append(::rtl::OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)) - .append("\" into a boolean!").getStr()); + OSL_ENSURE(bSuccess, OString("OXMLDataSourceSetting::convertString: could not convert \"") + + OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US) + + OString("\" into a boolean!")); aReturn <<= bValue; } break; diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.cxx b/dbaccess/source/filter/xml/xmlServerDatabase.cxx index e0c5cf70db3a..3daafca914fe 100644 --- a/dbaccess/source/filter/xml/xmlServerDatabase.cxx +++ b/dbaccess/source/filter/xml/xmlServerDatabase.cxx @@ -80,62 +80,49 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport, } if ( !sType.isEmpty() ) { - ::rtl::OUStringBuffer sURL; + OUStringBuffer sURL; if ( sType == "sdbc:mysql:jdbc" || sType == "sdbc:mysqlc" || sType == "sdbc:mysql:mysqlc" ) { - sURL.append( sType ); - sURL.append( sal_Unicode( ':' ) ); - sURL.append(sHostName); + sURL.append( sType + ":" + sHostName); if ( !sPortNumber.isEmpty() ) { - sURL.appendAscii(":"); - sURL.append(sPortNumber); + sURL.append(":" + sPortNumber); } if ( !sDatabaseName.isEmpty() ) { - sURL.appendAscii("/"); - sURL.append(sDatabaseName); + sURL.append("/" + sDatabaseName); } } else if ( sType == "jdbc:oracle:thin" ) { - sURL.appendAscii("jdbc:oracle:thin:@"); - sURL.append(sHostName); + sURL.append("jdbc:oracle:thin:@" + sHostName); if ( !sPortNumber.isEmpty() ) { - sURL.appendAscii(":"); - sURL.append(sPortNumber); + sURL.append(":" + sPortNumber); } if ( !sDatabaseName.isEmpty() ) { - sURL.appendAscii(":"); - sURL.append(sDatabaseName); + sURL.append(":" + sDatabaseName); } } else if ( sType == "sdbc:address:ldap" ) { - sURL.appendAscii("sdbc:address:ldap:"); - sURL.append(sHostName); + sURL.append("sdbc:address:ldap:" + sHostName); if ( !sPortNumber.isEmpty() ) { - sURL.appendAscii(":"); - sURL.append(sPortNumber); + sURL.append(":" + sPortNumber); } } else { - sURL.append(sType); - sURL.appendAscii(":"); - sURL.append(sHostName); + sURL.append(sType + ":" + sHostName); if ( !sPortNumber.isEmpty() ) { - sURL.appendAscii(":"); - sURL.append(sPortNumber); + sURL.append(":" + sPortNumber); } if ( !sDatabaseName.isEmpty() ) { - sURL.appendAscii(":"); - sURL.append(sDatabaseName); + sURL.append(":" + sDatabaseName); } } try diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx index 008d17416b6c..418e52e8388b 100644 --- a/dbaccess/source/ui/uno/composerdialogs.cxx +++ b/dbaccess/source/ui/uno/composerdialogs.cxx @@ -160,9 +160,9 @@ namespace dbaui aArguments[1] >>= xRowSet; Reference<com::sun::star::awt::XWindow> xParentWindow; aArguments[2] >>= xParentWindow; - setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "QueryComposer" ) ), makeAny( xQueryComposer ) ); - setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RowSet" ) ), makeAny( xRowSet ) ); - setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ) ), makeAny( xParentWindow ) ); + setPropertyValue( "QueryComposer", makeAny( xQueryComposer ) ); + setPropertyValue( "RowSet", makeAny( xRowSet ) ); + setPropertyValue( "ParentWindow", makeAny( xParentWindow ) ); } else ComposerDialog::initialize(aArguments); @@ -204,8 +204,8 @@ namespace dbaui aArguments[0] >>= xQueryComposer; Reference<com::sun::star::beans::XPropertySet> xRowSet; aArguments[1] >>= xRowSet; - setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "QueryComposer" ) ), makeAny( xQueryComposer ) ); - setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RowSet" ) ), makeAny( xRowSet ) ); + setPropertyValue( "QueryComposer", makeAny( xQueryComposer ) ); + setPropertyValue( "RowSet", makeAny( xRowSet ) ); } else ComposerDialog::initialize(aArguments); diff --git a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx index ff41dee33468..5cc0b6ac5d47 100644 --- a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx +++ b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx @@ -135,42 +135,42 @@ namespace dbaui aProps.realloc( nProp + 6 ); aProps[ nProp++ ] = Property( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HeaderLine" ) ), + ::rtl::OUString( "HeaderLine" ), PROPERTY_ID_HEADER_LINE, ::cppu::UnoType< sal_Bool >::get(), PropertyAttribute::TRANSIENT ); aProps[ nProp++ ] = Property( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FieldDelimiter" ) ), + ::rtl::OUString( "FieldDelimiter" ), PROPERTY_ID_FIELD_DELIMITER, ::cppu::UnoType< ::rtl::OUString >::get(), PropertyAttribute::TRANSIENT ); aProps[ nProp++ ] = Property( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StringDelimiter" ) ), + ::rtl::OUString( "StringDelimiter" ), PROPERTY_ID_STRING_DELIMITER, ::cppu::UnoType< ::rtl::OUString >::get(), PropertyAttribute::TRANSIENT ); aProps[ nProp++ ] = Property( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DecimalDelimiter" ) ), + ::rtl::OUString( "DecimalDelimiter" ), PROPERTY_ID_DECIMAL_DELIMITER, ::cppu::UnoType< ::rtl::OUString >::get(), PropertyAttribute::TRANSIENT ); aProps[ nProp++ ] = Property( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ThousandDelimiter" ) ), + ::rtl::OUString( "ThousandDelimiter" ), PROPERTY_ID_THOUSAND_DELIMITER, ::cppu::UnoType< ::rtl::OUString >::get(), PropertyAttribute::TRANSIENT ); aProps[ nProp++ ] = Property( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharSet" ) ), + ::rtl::OUString( "CharSet" ), PROPERTY_ID_ENCODING, ::cppu::UnoType< ::rtl::OUString >::get(), PropertyAttribute::TRANSIENT |