From 5536aea8228778e00b9f1ca8199d858cd03780ad Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 30 Aug 2016 07:43:52 +0200 Subject: Let OUStringLiteral1 take its arg as ctor arg, not template arg ...which makes it more flexible, can now also be used on non-const arguments. The drawback of the argument no longer being a compile-time constant is remedied by making the ctor constexpr. Change-Id: Ia4903a2cc86791fece92eac0cb8406b6659dd19d --- chart2/qa/extras/chart2_trendcalculators.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'chart2/qa/extras') diff --git a/chart2/qa/extras/chart2_trendcalculators.cxx b/chart2/qa/extras/chart2_trendcalculators.cxx index dd79dadab345..56cc6aa8c952 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) = "+ OUStringLiteral1() +" 2 x^3"); + checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1(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) = "+ OUStringLiteral1() +" 2x "+ OUStringLiteral1() +" 5"); + checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1(aMinusSign) +" 2x "+ OUStringLiteral1(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) = "+ OUStringLiteral1() +" 2x" + OUString( aSuperscriptFigures[2] ) + " + 4x "+ OUStringLiteral1() +" 5" ); + OUString sExpectedFormula( "f(x) = "+ OUStringLiteral1(aMinusSign) +" 2x" + OUString( aSuperscriptFigures[2] ) + " + 4x "+ OUStringLiteral1(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) = "+ OUStringLiteral1() + " 2 exp( 0.3 x )"); + checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1(aMinusSign) + " 2 exp( 0.3 x )"); } -- cgit