summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-08-28 09:47:27 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-08-29 11:44:31 +0000
commit2c10714426cc813c36aa82e4870b7b51c5c03050 (patch)
treedecd4f4343fb19a1e058c034e32b03be17cd9547 /chart2
parent0c8fa58a2d73702770687ed15b98822d09f96ac3 (diff)
Make OUStringLiteral1 a wrapper around UTF-16 instead of just ASCII
...not merely an ASCII character Change-Id: Id2b381b35fe3a15574728ed973d60263dfef7249 Reviewed-on: https://gerrit.libreoffice.org/28446 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/inc/SpecialUnicodes.hxx2
-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
6 files changed, 11 insertions, 11 deletions
diff --git a/chart2/inc/SpecialUnicodes.hxx b/chart2/inc/SpecialUnicodes.hxx
index db6e3b65fdb5..22ddc35b5e39 100644
--- a/chart2/inc/SpecialUnicodes.hxx
+++ b/chart2/inc/SpecialUnicodes.hxx
@@ -10,7 +10,7 @@
#ifndef INCLUDED_CHART2_INC_SPECIALUNICODES_HXX
#define INCLUDED_CHART2_INC_SPECIALUNICODES_HXX
-const OUString aMinusSign ( sal_Unicode (0x2212) );
+const sal_Unicode aMinusSign = 0x2212;
const OUString aNewLine ("\n");
const OUString aHashString ("###");
const sal_Unicode aSuperscriptFigures[10]={ 0x2070, 0x00B9, 0x00B2, 0x00B3, 0x2074, 0x2075, 0x2076, 0x2077, 0x2078, 0x2079 };
diff --git a/chart2/qa/extras/chart2_trendcalculators.cxx b/chart2/qa/extras/chart2_trendcalculators.cxx
index 738a6d6bfca4..dd79dadab345 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) = "+ OUString(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) = "+ OUString(aMinusSign) +" 2x "+ OUString(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) = "+ OUString(aMinusSign) +" 2x" + OUString( aSuperscriptFigures[2] ) + " + 4x "+ OUString(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) = "+ OUString(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 9d3f105d9b54..35c85e373ac6 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( 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( 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 b3d5e8f018af..93cbf3a70263 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( aMinusSign + " " );
+ aTmpBuf.append( OUStringLiteral1<aMinusSign>() + " " );
}
if( bHasSlope )
{
@@ -181,7 +181,7 @@ OUString LogarithmicRegressionCurveCalculator::ImplGetRepresentation(
}
// add intercept value
if( m_fIntercept < 0.0 )
- aTmpBuf.append( 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 c4976a54efa7..120c33e86386 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( aMinusSign + " ");
+ aTmpBuf.append( OUStringLiteral1<aMinusSign>() + " ");
aValue = - aValue;
}
else
diff --git a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
index aea4e68ad0ac..b767412bc6b5 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( OUStringLiteral1<aMinusSign>()+" " );
if( bHasIntercept )
{
OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fIntercept), pValueLength );