summaryrefslogtreecommitdiff
path: root/chart2/source/view
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-25 08:14:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-30 12:32:14 +0100
commit8332d6d8200e8ca1f22dd98d9373efd5a431d09c (patch)
treedd45d452202998297b8562743ea6345462304d04 /chart2/source/view
parentd05a4cfbdcece491f7385dbeaa7eca03f2fdc1d5 (diff)
loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/view')
-rw-r--r--chart2/source/view/inc/VDataSeries.hxx2
-rw-r--r--chart2/source/view/main/VDataSeries.cxx20
2 files changed, 11 insertions, 11 deletions
diff --git a/chart2/source/view/inc/VDataSeries.hxx b/chart2/source/view/inc/VDataSeries.hxx
index f95f4f1ba98f..cc6943f2d51a 100644
--- a/chart2/source/view/inc/VDataSeries.hxx
+++ b/chart2/source/view/inc/VDataSeries.hxx
@@ -137,7 +137,7 @@ public:
void setStartingAngle( sal_Int32 nStartingAngle );
sal_Int32 getStartingAngle() const;
- void setRoleOfSequenceForDataLabelNumberFormatDetection( const OUString& rRole );
+ void setRoleOfSequenceForDataLabelNumberFormatDetection( std::u16string_view rRole );
//this is only temporarily here for area chart:
css::drawing::PolyPolygonShape3D m_aPolyPolygonShape3D;
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 22e23d27dc80..d9bb82e8c30c 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -570,21 +570,21 @@ sal_Int32 VDataSeries::getExplicitNumberFormat( sal_Int32 nPointIndex, bool bFor
xPointProp->getPropertyValue(aPropName) >>= nNumberFormat;
return nNumberFormat;
}
-void VDataSeries::setRoleOfSequenceForDataLabelNumberFormatDetection( const OUString& rRole )
+void VDataSeries::setRoleOfSequenceForDataLabelNumberFormatDetection( std::u16string_view rRole )
{
- if (rRole == "values-y")
+ if (rRole == u"values-y")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y;
- else if (rRole == "values-size")
+ else if (rRole == u"values-size")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Bubble_Size;
- else if (rRole == "values-min")
+ else if (rRole == u"values-min")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y_Min;
- else if (rRole == "values-max")
+ else if (rRole == u"values-max")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y_Max;
- else if (rRole == "values-first")
+ else if (rRole == u"values-first")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y_First;
- else if (rRole == "values-last")
+ else if (rRole == u"values-last")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y_Last;
- else if (rRole == "values-x")
+ else if (rRole == u"values-x")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_X;
}
sal_Int32 VDataSeries::detectNumberFormatKey( sal_Int32 index ) const
@@ -771,7 +771,7 @@ double VDataSeries::getXMeanValue() const
{
if( std::isnan( m_fXMeanValue ) )
{
- uno::Reference< XRegressionCurveCalculator > xCalculator( RegressionCurveHelper::createRegressionCurveCalculatorByServiceName( "com.sun.star.chart2.MeanValueRegressionCurve" ) );
+ uno::Reference< XRegressionCurveCalculator > xCalculator( RegressionCurveHelper::createRegressionCurveCalculatorByServiceName( u"com.sun.star.chart2.MeanValueRegressionCurve" ) );
uno::Sequence< double > aXValuesDummy;
xCalculator->recalculateRegression( aXValuesDummy, getAllX() );
m_fXMeanValue = xCalculator->getCurveValue( 1.0 );
@@ -784,7 +784,7 @@ double VDataSeries::getYMeanValue() const
if( std::isnan( m_fYMeanValue ) )
{
uno::Reference< XRegressionCurveCalculator > xCalculator(
- RegressionCurveHelper::createRegressionCurveCalculatorByServiceName("com.sun.star.chart2.MeanValueRegressionCurve"));
+ RegressionCurveHelper::createRegressionCurveCalculatorByServiceName(u"com.sun.star.chart2.MeanValueRegressionCurve"));
uno::Sequence< double > aXValuesDummy;
xCalculator->recalculateRegression( aXValuesDummy, getAllY() );
m_fYMeanValue = xCalculator->getCurveValue( 1.0 );