Kaydet (Commit) 6cd93911 authored tarafından Neil Moore's avatar Neil Moore Kaydeden (comit) Norbert Thiebaud

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/5329Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
Tested-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst 9ffa46f0
......@@ -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;
}
// ------------------------------------------------------------------------
......
......@@ -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:
......
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment