diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:28:26 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:28:26 +0100 |
commit | 898a8b00622d219741ec7649dbac560bc1f70f6b (patch) | |
tree | 56701de314ff3150fe3287ba4d02465a02dda2b6 /chart2/qa | |
parent | 56bd8bb862bf6bcb2242bc864be9abf56f0c092f (diff) |
More loplugin:cstylecast: chart2
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: I745557506326b2b0ce66d0058ebf85e5ed2a0952
Diffstat (limited to 'chart2/qa')
-rw-r--r-- | chart2/qa/extras/chart2_trendcalculators.cxx | 14 | ||||
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 2 | ||||
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/chart2/qa/extras/chart2_trendcalculators.cxx b/chart2/qa/extras/chart2_trendcalculators.cxx index a45091057e80..42e1f52e467e 100644 --- a/chart2/qa/extras/chart2_trendcalculators.cxx +++ b/chart2/qa/extras/chart2_trendcalculators.cxx @@ -87,7 +87,7 @@ void Chart2TrendCalculators::loadCalculatorFromSheet(sal_Int32 nSheet) CPPUNIT_ASSERT( xRegressionCurveContainer.is() ); Sequence< Reference< chart2::XRegressionCurve > > xRegressionCurveSequence = xRegressionCurveContainer->getRegressionCurves(); - CPPUNIT_ASSERT_EQUAL((sal_Int32) 1, xRegressionCurveSequence.getLength()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xRegressionCurveSequence.getLength()); m_xCurve = xRegressionCurveSequence[0]; CPPUNIT_ASSERT(m_xCurve.is()); @@ -116,7 +116,7 @@ void Chart2TrendCalculators::testPotentialRegression1() Sequence< double > yValues( 7 ); for (int i=0; i<7; i++) { - const double d = (double) i; + const double d = static_cast<double>(i); xValues[i] = d; yValues[i] = 2.0 * pow ( d, 3 ); } @@ -132,7 +132,7 @@ void Chart2TrendCalculators::testPotentialRegression2() Sequence< double > yValues( 7 ); for (int i=0; i<7; i++) { - const double d = (double) i; + const double d = static_cast<double>(i); xValues[i] = d; yValues[i] = -2.0 * pow ( d, 3 ); } @@ -148,7 +148,7 @@ void Chart2TrendCalculators::testLinearRegression1() Sequence< double > yValues( 7 ); for (int i=0; i<7; i++) { - const double d = (double) i; + const double d = static_cast<double>(i); xValues[i] = d; yValues[i] = - 2.0 * d - 5.0 ; } @@ -164,7 +164,7 @@ void Chart2TrendCalculators::testPolynomialRegression1() Sequence< double > yValues( 7 ); for (int i=0; i<7; i++) { - const double d = (double) i; + const double d = static_cast<double>(i); xValues[i] = d; yValues[i] = - 2.0 * d * d + 4 * d - 5; } @@ -180,7 +180,7 @@ void Chart2TrendCalculators::testExponentialRegression1() Sequence< double > yValues( 7 ); for (int i=0; i<7; i++) { - const double d = (double) i; + const double d = static_cast<double>(i); xValues[i] = d; yValues[i] = 2.0 * exp ( 0.3 * d ); } @@ -195,7 +195,7 @@ void Chart2TrendCalculators::testExponentialRegression2() Sequence< double > yValues( 7 ); for (int i=0; i<7; i++) { - const double d = (double) i; + const double d = static_cast<double>(i); xValues[i] = d; yValues[i] = -2.0 * exp ( 0.3 * d ); } diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 6764935a91cc..deedbc0bee7f 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -392,7 +392,7 @@ void checkTrendlinesInChart(uno::Reference< chart2::XChartDocument > const & xCh CPPUNIT_ASSERT( xRegressionCurveContainer.is() ); Sequence< Reference< chart2::XRegressionCurve > > xRegressionCurveSequence = xRegressionCurveContainer->getRegressionCurves(); - CPPUNIT_ASSERT_EQUAL((sal_Int32) 3, xRegressionCurveSequence.getLength()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xRegressionCurveSequence.getLength()); Reference<chart2::XRegressionCurve> xCurve; diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index a49e80e1b867..b7e1bb79faec 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -1045,7 +1045,7 @@ void Chart2ImportTest::testTrendlineDefaultValue2007XLSX() CPPUNIT_ASSERT(xDataSeries.is()); Reference<chart2::XRegressionCurveContainer> xRegressionCurveContainer(xDataSeries, UNO_QUERY_THROW); Sequence< Reference<chart2::XRegressionCurve> > xRegressionCurveSequence = xRegressionCurveContainer->getRegressionCurves(); - CPPUNIT_ASSERT_EQUAL((sal_Int32) 1, xRegressionCurveSequence.getLength()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xRegressionCurveSequence.getLength()); Reference<chart2::XRegressionCurve> xCurve = xRegressionCurveSequence[0]; @@ -1071,7 +1071,7 @@ void Chart2ImportTest::testTrendlineDefaultValue2013XLSX() CPPUNIT_ASSERT(xDataSeries.is()); Reference<chart2::XRegressionCurveContainer> xRegressionCurveContainer(xDataSeries, UNO_QUERY_THROW); Sequence< Reference<chart2::XRegressionCurve> > xRegressionCurveSequence = xRegressionCurveContainer->getRegressionCurves(); - CPPUNIT_ASSERT_EQUAL((sal_Int32) 1, xRegressionCurveSequence.getLength()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xRegressionCurveSequence.getLength()); Reference<chart2::XRegressionCurve> xCurve = xRegressionCurveSequence[0]; |