summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-08-30 07:43:52 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-08-30 07:43:52 +0200
commit5536aea8228778e00b9f1ca8199d858cd03780ad (patch)
treed244654bc3c5aa4e5b3a87df5f004ef61049996c /chart2
parent20f6a6b159c69771dc0e087f63b6c701908e32e2 (diff)
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
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2_trendcalculators.cxx8
-rw-r--r--chart2/source/tools/ExponentialRegressionCurveCalculator.cxx4
-rw-r--r--chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx4
-rw-r--r--chart2/source/tools/PolynomialRegressionCurveCalculator.cxx2
-rw-r--r--chart2/source/tools/PotentialRegressionCurveCalculator.cxx2
5 files changed, 10 insertions, 10 deletions
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<aMinusSign>() +" 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<aMinusSign>() +" 2x "+ OUStringLiteral1<aMinusSign>() +" 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<aMinusSign>() +" 2x" + OUString( aSuperscriptFigures[2] ) + " + 4x "+ OUStringLiteral1<aMinusSign>() +" 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<aMinusSign>() + " 2 exp( 0.3 x )");
+ checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1(aMinusSign) + " 2 exp( 0.3 x )");
}
diff --git a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
index 35c85e373ac6..7b6250428148 100644
--- a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
@@ -185,7 +185,7 @@ 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) + " " );
if ( bHasIntercept )
{
OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fIntercept, pValueLength );
@@ -210,7 +210,7 @@ OUString ExponentialRegressionCurveCalculator::ImplGetRepresentation(
}
}
if ( m_fLogSlope < 0.0 )
- aTmpBuf.append( OUStringLiteral1<aMinusSign>() + " " );
+ aTmpBuf.append( OUStringLiteral1(aMinusSign) + " " );
if ( bHasLogSlope )
{
OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fLogSlope), pValueLength );
diff --git a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
index 93cbf3a70263..c50a8c361b24 100644
--- a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
@@ -162,7 +162,7 @@ OUString LogarithmicRegressionCurveCalculator::ImplGetRepresentation(
{
if( m_fSlope < 0.0 )
{
- aTmpBuf.append( OUStringLiteral1<aMinusSign>() + " " );
+ aTmpBuf.append( OUStringLiteral1(aMinusSign) + " " );
}
if( bHasSlope )
{
@@ -181,7 +181,7 @@ OUString LogarithmicRegressionCurveCalculator::ImplGetRepresentation(
}
// add intercept value
if( m_fIntercept < 0.0 )
- aTmpBuf.append( OUStringLiteral1<aMinusSign>()+" " );
+ aTmpBuf.append( OUStringLiteral1(aMinusSign)+" " );
OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fIntercept), pValueLength );
if ( aValueString != "0" ) // aValueString may be rounded to 0 if nValueLength is small
{
diff --git a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
index 120c33e86386..9b885993d563 100644
--- a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
@@ -278,7 +278,7 @@ OUString PolynomialRegressionCurveCalculator::ImplGetRepresentation(
{
if ( bFindValue ) // if it is not the first aValue
aTmpBuf.append( " " );
- aTmpBuf.append( OUStringLiteral1<aMinusSign>() + " ");
+ aTmpBuf.append( OUStringLiteral1(aMinusSign) + " ");
aValue = - aValue;
}
else
diff --git a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
index b767412bc6b5..512b3736cfaa 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( OUStringLiteral1<aMinusSign>()+" " );
+ aTmpBuf.append( OUStringLiteral1(aMinusSign)+" " );
if( bHasIntercept )
{
OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fIntercept), pValueLength );