summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-07-21 14:23:23 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-08-16 06:30:09 +0000
commit127f70d66ac32b7a4ec818adaf1bdccb71865ee5 (patch)
treea020d2002c2eea81484297421f0fbe3ee84c2db0 /chart2
parentce95e39f8e952159844e9dc04a1df402bb103634 (diff)
new loplugin to check for static OUStrings
that are better declared as OUStringLiteral Change-Id: Ifb5d9a12bb31a68641940bec16971a8181a46567 Reviewed-on: https://gerrit.libreoffice.org/27377 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2_trendcalculators.cxx8
-rw-r--r--chart2/source/tools/PotentialRegressionCurveCalculator.cxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/chart2/qa/extras/chart2_trendcalculators.cxx b/chart2/qa/extras/chart2_trendcalculators.cxx
index ca327f1e2c94..738a6d6bfca4 100644
--- a/chart2/qa/extras/chart2_trendcalculators.cxx
+++ b/chart2/qa/extras/chart2_trendcalculators.cxx
@@ -136,7 +136,7 @@ void Chart2TrendCalculators::testPotentialRegression2()
xValues[i] = d;
yValues[i] = -2.0 * pow ( d, 3 );
}
- checkCalculator( xValues, yValues, "f(x) = "+ aMinusSign +" 2 x^3");
+ checkCalculator( xValues, yValues, "f(x) = "+ OUString(aMinusSign) +" 2 x^3");
}
// test y = - 2 X - 5
@@ -152,7 +152,7 @@ void Chart2TrendCalculators::testLinearRegression1()
xValues[i] = d;
yValues[i] = - 2.0 * d - 5.0 ;
}
- checkCalculator( xValues, yValues, "f(x) = "+ aMinusSign +" 2x "+ aMinusSign +" 5");
+ checkCalculator( xValues, yValues, "f(x) = "+ OUString(aMinusSign) +" 2x "+ OUString(aMinusSign) +" 5");
}
// test y = A x ^ B
@@ -168,7 +168,7 @@ void Chart2TrendCalculators::testPolynomialRegression1()
xValues[i] = d;
yValues[i] = - 2.0 * d * d + 4 * d - 5;
}
- OUString sExpectedFormula( "f(x) = "+ aMinusSign +" 2x" + OUString( aSuperscriptFigures[2] ) + " + 4x "+ aMinusSign +" 5" );
+ OUString sExpectedFormula( "f(x) = "+ OUString(aMinusSign) +" 2x" + OUString( aSuperscriptFigures[2] ) + " + 4x "+ OUString(aMinusSign) +" 5" );
checkCalculator( xValues, yValues, sExpectedFormula );
}
@@ -199,7 +199,7 @@ void Chart2TrendCalculators::testExponentialRegression2()
xValues[i] = d;
yValues[i] = -2.0 * exp ( 0.3 * d );
}
- checkCalculator( xValues, yValues, "f(x) = "+ aMinusSign + " 2 exp( 0.3 x )");
+ checkCalculator( xValues, yValues, "f(x) = "+ OUString(aMinusSign) + " 2 exp( 0.3 x )");
}
diff --git a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
index 3c19a3e2804e..3282f2dc1abc 100644
--- a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
@@ -176,7 +176,7 @@ OUString PotentialRegressionCurveCalculator::ImplGetRepresentation(
// if nValueLength not calculated then nullptr
sal_Int32* pValueLength = nValueLength ? &nValueLength : nullptr;
if ( m_fIntercept < 0.0 ) // add intercept value
- aTmpBuf.append( aMinusSign+" " );
+ aTmpBuf.append( aMinusSign+" " );
if( bHasIntercept )
{
OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fIntercept), pValueLength );