[PATCH] fdo#57950: dbaccess: STRINGPARAM and more chained appends

Marcos Souza (via Code Review) gerrit at gerrit.libreoffice.org
Tue Jan 15 16:50:34 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1706

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/06/1706/1

fdo#57950: dbaccess: STRINGPARAM and more chained appends

Change-Id: Iab1ba5eb6702d386e2775d7426c3398b606d2d97
---
M dbaccess/source/core/api/CacheSet.cxx
M dbaccess/source/core/api/OptimisticSet.cxx
M dbaccess/source/core/api/View.cxx
M dbaccess/source/core/api/query.cxx
M dbaccess/source/core/api/querycomposer.cxx
M dbaccess/source/core/api/querycontainer.cxx
M dbaccess/source/core/dataaccess/ComponentDefinition.cxx
M dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
M dbaccess/source/filter/xml/xmlServerDatabase.cxx
M dbaccess/source/ui/uno/composerdialogs.cxx
M dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
11 files changed, 72 insertions(+), 123 deletions(-)



diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 8b8e924..5974d4a 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -156,14 +156,12 @@
 void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen at 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 @@
     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 @@
         }
         if(aIter->isModified())
         {
-            _sParameter.append(::dbtools::quoteName( aQuote,aColumnName));
-            _sParameter.append(aPara);
+            _sParameter.append(::dbtools::quoteName( aQuote,aColumnName) + aPara);
         }
     }
 }
@@ -292,9 +288,7 @@
     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 @@
     {
         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 @@
     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 ca6f1b5..e68cc7e 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -74,12 +74,12 @@
     {
         ::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 @@
             }
             ::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 @@
         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 @@
             }
             ::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 @@
         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 @@
                 }
             }
 
-            executeInsert(_rInsertRow,sSql.makeStringAndClear(),aSqlIter->first);
+            executeInsert(_rInsertRow,sSql,aSqlIter->first);
         }
     }
 }
@@ -393,14 +378,11 @@
         ::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 @@
     {
         ::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 @@
         }
         ::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 @@
                 ::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 54c7354..8ab90a3 100644
--- a/dbaccess/source/core/api/View.cxx
+++ b/dbaccess/source/core/api/View.cxx
@@ -69,7 +69,7 @@
         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 e89d80e..ed944d8 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -362,9 +362,9 @@
                     &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 d84e771..c970878 100644
--- a/dbaccess/source/core/api/querycomposer.cxx
+++ b/dbaccess/source/core/api/querycomposer.cxx
@@ -131,10 +131,10 @@
 }
 
 // XServiceInfo
-rtl::OUString OQueryComposer::getImplementationName(  ) throw(RuntimeException)
+OUString OQueryComposer::getImplementationName(  ) throw(RuntimeException)
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen at 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 9744c16..11717a0 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -328,7 +328,7 @@
 
 ::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 d57bdf6..5380332 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
@@ -148,9 +148,9 @@
 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 > 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 @@
 ::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 c893a50..02ea80b 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
@@ -182,10 +182,9 @@
             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 e0c5cf7..3daafca 100644
--- a/dbaccess/source/filter/xml/xmlServerDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlServerDatabase.cxx
@@ -80,62 +80,49 @@
     }
     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 008d174..418e52e 100644
--- a/dbaccess/source/ui/uno/composerdialogs.cxx
+++ b/dbaccess/source/ui/uno/composerdialogs.cxx
@@ -160,9 +160,9 @@
             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 @@
             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 ff41dee..5cc0b6a 100644
--- a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
+++ b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
@@ -135,42 +135,42 @@
         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

-- 
To view, visit https://gerrit.libreoffice.org/1706
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab1ba5eb6702d386e2775d7426c3398b606d2d97
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Marcos Souza <marcos.souza.org at gmail.com>



More information about the LibreOffice mailing list