diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-25 17:17:50 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-04 10:11:07 +0200 |
commit | aeb41c9b9b7559c6d87bf92807acdc0df9e104cc (patch) | |
tree | 5a36bcd5af873c2b597fcda5fbd7e2f76f997669 /dbaccess | |
parent | 57c2de08ddf14c0da80de06736d99382ad036539 (diff) |
remove redundant calls to OUString constructor
Change code like this:
aStr = OUString("xxxx");
into this:
aStr = "xxxx";
Change-Id: I31cb92e21658d57bb9e14b65c179536eae8096f6
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/queryorder.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/DExport.cxx | 14 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 16 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WCopyTable.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryDesignView.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 6 |
6 files changed, 19 insertions, 27 deletions
diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx index 8c9ce5c4708c..12aa23c5fd59 100644 --- a/dbaccess/source/ui/dlg/queryorder.cxx +++ b/dbaccess/source/ui/dlg/queryorder.cxx @@ -232,7 +232,7 @@ OUString DlgOrderCrit::GetOrderList( ) const if(m_aColumnList[i]->GetSelectEntryPos() != 0) { if(!sOrder.isEmpty()) - sOrder += OUString(","); + sOrder += ","; OUString sName = m_aColumnList[i]->GetSelectEntry(); sOrder += ::dbtools::quoteName(sQuote,sName); diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index eccb7d9dc391..1e8ea2b13861 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -829,15 +829,13 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R ,const TPositions& _rvColumns) { SAL_INFO("dbaccess.ui", "ODatabaseExport::createPreparedStatment" ); - OUString aSql(OUString("INSERT INTO ")); + OUString aSql("INSERT INTO "); OUString sComposedTableName = ::dbtools::composeTableName( _xMetaData, _xDestTable, ::dbtools::eInDataManipulation, false, false, true ); aSql += sComposedTableName; - aSql += OUString(" ( "); + aSql += " ( "; // set values and column names OUString aValues(" VALUES ( "); - static OUString aPara("?,"); - static OUString aComma(","); OUString aQuote; if ( _xMetaData.is() ) @@ -874,13 +872,13 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R if ( !aInsertIter->isEmpty() ) { aSql += *aInsertIter; - aSql += aComma; - aValues += aPara; + aSql += ","; + aValues += "?,"; } } - aSql = aSql.replaceAt(aSql.getLength()-1,1,OUString(")")); - aValues = aValues.replaceAt(aValues.getLength()-1,1,OUString(")")); + aSql = aSql.replaceAt(aSql.getLength()-1, 1, ")"); + aValues = aValues.replaceAt(aValues.getLength()-1, 1, ")"); aSql += aValues; // now create,fill and execute the prepared statement diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 6c6126ff044a..807764b2a78f 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1093,15 +1093,15 @@ void AppendConfigToken( OUString& _rURL, sal_Bool _bQuestionMark ) // query part exists? if ( _bQuestionMark ) // no, so start with '?' - _rURL += OUString("?"); + _rURL += "?"; else // yes, so only append with '&' - _rURL += OUString("&"); + _rURL += "&"; // set parameters - _rURL += OUString("Language="); + _rURL += "Language="; _rURL += utl::ConfigManager::getLocale(); - _rURL += OUString("&System="); + _rURL += "&System="; _rURL += SvtHelpOptions().GetSystem(); } @@ -1143,10 +1143,8 @@ namespace ::com::sun::star::util::URL createHelpAgentURL(const OUString& _sModuleName, const OString& sHelpId) { ::com::sun::star::util::URL aURL; - aURL.Complete = OUString( "vnd.sun.star.help://" ); - aURL.Complete += _sModuleName; - aURL.Complete += OUString( "/" ); - aURL.Complete += OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8); + aURL.Complete = "vnd.sun.star.help://" + + _sModuleName + "/" + OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8); OUString sAnchor; OUString sTempURL = aURL.Complete; @@ -1155,7 +1153,7 @@ namespace AppendConfigToken(aURL.Complete,sal_True); if ( bHasAnchor ) { - aURL.Complete += OUString("#"); + aURL.Complete += "#"; aURL.Complete += sAnchor; } return aURL; diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index d5effc13b5f3..4b4a5bbab3a0 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -166,9 +166,7 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _ const OUString sTargetName = ::dbtools::composeTableNameForSelect(_xConnection,_rxObject); const OUString sTargetNameTemp = (sTargetName + OUString(".")); - OUString sStatement("SELECT * FROM "); - sStatement += sTargetName; - sStatement += OUString(" WHERE 0=1"); + OUString sStatement = "SELECT * FROM " + sTargetName + " WHERE 0=1"; for ( size_t i=0; i < SAL_N_ELEMENTS(aProperties); ++i ) { diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index fecdf380e7e4..682bd07f0e6c 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2874,9 +2874,7 @@ OUString OQueryDesignView::getStatement() GenerateInnerJoinCriterias(xConnection,aJoinCrit,pConnList); if(!aJoinCrit.isEmpty()) { - OUString aTmp("( "); - aTmp += aJoinCrit; - aTmp += OUString(" )"); + OUString aTmp = "( " + aJoinCrit + " )"; if(!aCriteriaListStr.isEmpty()) { aTmp += C_AND; diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index c368cf0bda55..78f5f7e72d48 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -711,13 +711,13 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe else sSql += sFullFieldName; - sSql = OUString("SELECT ") + sSql; + sSql = "SELECT " + sSql; if ( !sFieldAlias.isEmpty() ) { // always quote the alias name: there cannot be a function in it - sSql += OUString(" "); + sSql += " "; sSql += ::dbtools::quoteName( xMetaData->getIdentifierQuoteString(), sFieldAlias ); } - sSql += OUString(" FROM x"); + sSql += " FROM x"; pParseNode = rParser.parseTree( sErrorMsg, sSql, bInternational ); } |