summaryrefslogtreecommitdiff
path: root/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-28 15:09:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-29 09:05:18 +0200
commit4c91b89d8ce9c34179f31854dc88bd0a9fa84cba (patch)
tree1fe9cc9db455779d33c24320fedc1e25888b3e5c /chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
parenta1f31211920bfae1a21ea375fa5280c9c6595e15 (diff)
new loplugin:oustringbuffer
look for places where we are appending the temporary result of adding strings together, to an OUStringBuffer, where we could rather call append repeatedly and avoid the temporary creation Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82 Reviewed-on: https://gerrit.libreoffice.org/59708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/tools/ExponentialRegressionCurveCalculator.cxx')
-rw-r--r--chart2/source/tools/ExponentialRegressionCurveCalculator.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
index db59250b76b0..42d0480d6b73 100644
--- a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
@@ -179,13 +179,13 @@ OUString ExponentialRegressionCurveCalculator::ImplGetRepresentation(
// if nValueLength not calculated then nullptr
sal_Int32* pValueLength = nValueLength ? &nValueLength : nullptr;
if ( m_fSign < 0.0 )
- aTmpBuf.append( OUStringLiteral1(aMinusSign) + " " );
+ aTmpBuf.append( OUStringLiteral1(aMinusSign) ).append( " " );
if ( bHasIntercept )
{
OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fIntercept, pValueLength );
if ( aValueString != "1" ) // aValueString may be rounded to 1 if nValueLength is small
{
- aTmpBuf.append( aValueString + " " );
+ aTmpBuf.append( aValueString ).append( " " );
addStringToEquation( aBuf, nLineLength, aTmpBuf, pFormulaMaxWidth );
aTmpBuf.truncate();
}
@@ -199,21 +199,21 @@ OUString ExponentialRegressionCurveCalculator::ImplGetRepresentation(
OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogIntercept, pValueLength );
if ( aValueString != "0" ) // aValueString may be rounded to 0 if nValueLength is small
{
- aTmpBuf.append( aValueString + ( (m_fLogSlope < 0.0) ? OUStringLiteral(" ") : OUStringLiteral(" + ") ) );
+ aTmpBuf.append( aValueString ).append( (m_fLogSlope < 0.0) ? OUStringLiteral(" ") : OUStringLiteral(" + ") );
}
}
}
if ( m_fLogSlope < 0.0 )
- aTmpBuf.append( OUStringLiteral1(aMinusSign) + " " );
+ aTmpBuf.append( OUStringLiteral1(aMinusSign) ).append( " " );
if ( bHasLogSlope )
{
OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fLogSlope), pValueLength );
if ( aValueString != "1" ) // aValueString may be rounded to 1 if nValueLength is small
{
- aTmpBuf.append( aValueString + " " );
+ aTmpBuf.append( aValueString ).append( " " );
}
}
- aTmpBuf.append( mXName + " )");
+ aTmpBuf.append( mXName ).append(" )");
addStringToEquation( aBuf, nLineLength, aTmpBuf, pFormulaMaxWidth );
return aBuf.makeStringAndClear();