BUG:57950 Remove chained appends

Removed some chained OUString::append()'s from forms. OUStringBuffer
could really use a append operator(+=).

Change-Id: I635bdd25da9f09373e686d87a1d198bc09bda906
Reviewed-on: https://gerrit.libreoffice.org/5329
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
This commit is contained in:
Neil Moore
2013-08-10 15:04:11 +00:00
committed by Norbert Thiebaud
parent 9ffa46f008
commit 6cd939111a
3 changed files with 12 additions and 33 deletions
+2 -5
View File
@@ -386,11 +386,8 @@ namespace
aDateTime.Minutes, aDateTime.Hours, aDateTime.IsUTC);
OUString sTime = lcl_toXSD_UNOTime_typed( aTime );
OUStringBuffer sInfo;
sInfo.append( sDate );
sInfo.append( (sal_Unicode) 'T' );
sInfo.append( sTime );
return sInfo.makeStringAndClear();
OUString sRet = sDate + "T" + sTime;
return sRet;
}
// ------------------------------------------------------------------------
+8 -21
View File
@@ -300,9 +300,7 @@ OUString Model::getNodeDisplayName( const XNode_t& xNode,
OUString sContent = xNode->getNodeValue();
if( bDetail || ! lcl_isWhitespace( sContent ) )
{
aBuffer.append( sal_Unicode('"') );
aBuffer.append( Convert::collapseWhitespace( sContent ) );
aBuffer.append( sal_Unicode('"') );
aBuffer = aBuffer + "\"" + Convert::collapseWhitespace( sContent ) + "\"";
}
}
break;
@@ -360,18 +358,15 @@ OUString Model::getBindingName( const XPropertySet_t& xBinding,
OUString sExpression;
xBinding->getPropertyValue( "BindingExpression" ) >>= sExpression;
OUStringBuffer aBuffer;
OUString sRet;
if( !sID.isEmpty() )
{
aBuffer.append( sID );
aBuffer.append( " (" );
aBuffer.append( sExpression );
aBuffer.append( ")" );
sRet = sID + " (" + sExpression + ") ";
}
else
aBuffer.append( sExpression );
sRet = sExpression;
return aBuffer.makeStringAndClear();
return sRet;
}
OUString Model::getSubmissionName( const XPropertySet_t& xSubmission,
@@ -766,18 +761,12 @@ static OUString lcl_serializeForDisplay( const Reference< XAttr >& _rxAttrNode )
OSL_ENSURE( _rxAttrNode.is(), "lcl_serializeForDisplay( attr ): invalid argument!" );
if ( _rxAttrNode.is() )
{
OUStringBuffer aBuffer;
aBuffer.append( _rxAttrNode->getName() );
aBuffer.appendAscii( "=" );
OUString sValue = _rxAttrNode->getValue();
sal_Unicode nQuote = '"';
if ( sValue.indexOf( nQuote ) >= 0 )
nQuote = '\'';
aBuffer.append( nQuote );
aBuffer.append( sValue );
aBuffer.append( nQuote );
aBuffer.append( (sal_Unicode)' ' );
sResult = aBuffer.makeStringAndClear();
sResult = _rxAttrNode->getName() + "=" + OUString(nQuote) + sValue + OUString(nQuote) + " ";
}
return sResult;
}
@@ -884,9 +873,7 @@ static OUString lcl_serializeForDisplay( const Reference<XXPathObject>& xResult
break;
case XPathObjectType_XPATH_STRING:
aBuffer.append( sal_Unicode('"') );
aBuffer.append( xResult->getString() );
aBuffer.append( sal_Unicode('"') );
aBuffer = aBuffer + "\"" + xResult->getString() + "\"";
break;
case XPathObjectType_XPATH_NODESET:
+2 -7
View File
@@ -478,13 +478,8 @@ sal_Int64 SAL_CALL Submission::getSomething(
static OUString lcl_message( const OUString& rID, const OUString& rText )
{
OUStringBuffer aMessage;
aMessage.append( "XForms submission '" );
aMessage.append( rID );
aMessage.append( "' failed" );
aMessage.append( rText );
aMessage.append( "." );
return aMessage.makeStringAndClear();
OUString aMessage = "XForms submission '" + rID + "' failed" + rText + ".";
return aMessage;
}
void SAL_CALL Submission::submitWithInteraction(