diff options
author | nadith <nadmalinda@gmail.com> | 2016-07-29 12:22:18 +0530 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-08-01 06:12:30 +0000 |
commit | efef273e2c61b19a63572a71b103e3b1490f15af (patch) | |
tree | 1d441e00b15eabd50820cae5e300cc8a6b6bb765 /connectivity | |
parent | dadb28a2fbe3e50361b60cee9dda43b1fba3629e (diff) |
tdf#100726: Improve readability of OUString concatenation
this bug fixed in the modules between canvas - cppu
Change-Id: I2022b022897dafde20251352376e3facdb9b8d75
Reviewed-on: https://gerrit.libreoffice.org/27663
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/commontools/dbtools.cxx | 3 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/APreparedStatement.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/file/fcomp.cxx | 3 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 5 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HTable.cxx | 4 |
5 files changed, 6 insertions, 15 deletions
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 1c1dbfe150a9..ea7849eba064 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -1396,8 +1396,7 @@ OUString createUniqueName( const Sequence< OUString >& _rNames, const OUString& while ( aUsedNames.find( sName ) != aUsedNames.end() ) { - sName = _rBaseName; - sName += OUString::number( ++nPos ); + sName = _rBaseName + OUString::number( ++nPos ); } return sName; } diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx index 0e4b78b8b711..b915a38e01ac 100644 --- a/connectivity/source/drivers/ado/APreparedStatement.cxx +++ b/connectivity/source/drivers/ado/APreparedStatement.cxx @@ -194,8 +194,7 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const DataTypeEn m_pParameters->get_Count(&nCount); if(nCount < (parameterIndex-1)) { - OUString sDefaultName( "parame" ); - sDefaultName += OUString::number(parameterIndex); + OUString sDefaultName = "parame" + OUString::number(parameterIndex); ADOParameter* pParam = m_Command.CreateParameter(sDefaultName,_eType,adParamInput,_nSize,_Val); if(pParam) { @@ -461,8 +460,7 @@ void OPreparedStatement::replaceParameterNodeName(OSQLParseNode* _pNode, { OSQLParseNode* pNewNode = new OSQLParseNode(OUString(":") ,SQLNodeType::Punctuation,0); delete pChildNode->replace(pChildNode->getChild(0),pNewNode); - OUString sParameterName = _sDefaultName; - sParameterName += OUString::number(++_rParameterCount); + OUString sParameterName = _sDefaultName + OUString::number(++_rParameterCount); pChildNode->append(new OSQLParseNode( sParameterName,SQLNodeType::Name,0)); } else diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index c89abee7a894..38eae6092be1 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -476,8 +476,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr (SQL_ISPUNCTUATION(pPredicateNode->getChild(0),"+") || SQL_ISPUNCTUATION(pPredicateNode->getChild(0),"-")) && pPredicateNode->getChild(1)->getNodeType() == SQLNodeType::IntNum) { // if -1 or +1 is there - OUString aValue(pPredicateNode->getChild(0)->getTokenValue()); - aValue += pPredicateNode->getChild(1)->getTokenValue(); + OUString aValue = pPredicateNode->getChild(0)->getTokenValue() + pPredicateNode->getChild(1)->getTokenValue(); pOperand = new OOperandConst(*pPredicateNode->getChild(1), aValue); } else if( SQL_ISRULE(pPredicateNode,set_fct_spec) && SQL_ISPUNCTUATION(pPredicateNode->getChild(0),"{") ) diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 3da41939886d..af24d3190e4f 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -323,10 +323,7 @@ namespace connectivity Sequence< PropertyValue > aConnectionArgs; aProperties >>= aConnectionArgs; - - OUString sConnectURL("jdbc:hsqldb:"); - - sConnectURL += sSystemPath; + OUString sConnectURL = "jdbc:hsqldb:" + sSystemPath; Reference<XConnection> xOrig; try { diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 4f479a159ceb..8a2aea665be8 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -260,9 +260,7 @@ void SAL_CALL OHSQLTable::alterColumnByName( const OUString& colName, const Refe void OHSQLTable::alterColumnType(sal_Int32 nNewType,const OUString& _rColName, const Reference<XPropertySet>& _xDescriptor) { - OUString sSql = getAlterTableColumnPart(); - - sSql += " ALTER COLUMN "; + OUString sSql = getAlterTableColumnPart() + " ALTER COLUMN "; #if OSL_DEBUG_LEVEL > 0 try { |