summaryrefslogtreecommitdiff
path: root/xmloff/source/chart
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 /xmloff/source/chart
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 'xmloff/source/chart')
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.cxx10
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.hxx4
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx4
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx6
4 files changed, 12 insertions, 12 deletions
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index d395fbae78f2..4447c093c566 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -671,12 +671,12 @@ Reference< chart2::XAxis > lcl_getAxis( const Reference< chart2::XCoordinateSyst
} // anonymous namespace
void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDocument >& xNewDoc,
- const OUString& rChartTypeServiceName,
- const OUString& rODFVersionOfFile,
+ std::u16string_view rChartTypeServiceName,
+ std::u16string_view rODFVersionOfFile,
bool bAxisPositionAttributeImported )
{
- if( !(rODFVersionOfFile.isEmpty() || rODFVersionOfFile == "1.0" || rODFVersionOfFile == "1.1"
- || ( rODFVersionOfFile == "1.2" && !bAxisPositionAttributeImported )) )
+ if( !(rODFVersionOfFile.empty() || rODFVersionOfFile == u"1.0" || rODFVersionOfFile == u"1.1"
+ || ( rODFVersionOfFile == u"1.2" && !bAxisPositionAttributeImported )) )
return;
try
@@ -702,7 +702,7 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc
if( xMainXAxisProp.is() && xMainYAxisProp.is() )
{
chart2::ScaleData aMainXScale = xMainXAxis->getScaleData();
- if( rChartTypeServiceName == "com.sun.star.chart2.ScatterChartType" )
+ if( rChartTypeServiceName == u"com.sun.star.chart2.ScatterChartType" )
{
xMainYAxisProp->setPropertyValue("CrossoverPosition"
, uno::makeAny( css::chart::ChartAxisPosition_VALUE) );
diff --git a/xmloff/source/chart/SchXMLAxisContext.hxx b/xmloff/source/chart/SchXMLAxisContext.hxx
index 8cb8f78098e9..ab2516a0bffd 100644
--- a/xmloff/source/chart/SchXMLAxisContext.hxx
+++ b/xmloff/source/chart/SchXMLAxisContext.hxx
@@ -49,8 +49,8 @@ public:
const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
static void CorrectAxisPositions( const css::uno::Reference< css::chart2::XChartDocument >& xNewDoc,
- const OUString& rChartTypeServiceName,
- const OUString& rODFVersionOfFile,
+ std::u16string_view rChartTypeServiceName,
+ std::u16string_view rODFVersionOfFile,
bool bAxisPositionAttributeImported );
private:
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 02c4df000d36..5221ffd67140 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -602,11 +602,11 @@ void lcl_swapPointAndSeriesStylesForDonutCharts( ::std::vector< DataRowPointStyl
}
bool lcl_SpecialHandlingForDonutChartNeeded(
- const OUString & rServiceName,
+ std::u16string_view rServiceName,
const SvXMLImport & rImport )
{
bool bResult = false;
- if( rServiceName == "com.sun.star.chart2.DonutChartType" )
+ if( rServiceName == u"com.sun.star.chart2.DonutChartType" )
{
bResult = SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan2_3( rImport.GetModel() );
}
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index af1f9e33bd4b..0ae039da9a3e 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -205,7 +205,7 @@ public:
void exportAxis( enum XMLTokenEnum eDimension, enum XMLTokenEnum eAxisName,
const Reference< beans::XPropertySet >& rAxisProps, const Reference< chart2::XAxis >& rChart2Axis,
const OUString& rCategoriesRanges,
- bool bHasTitle, bool bHasMajorGrid, bool bHasMinorGrid, bool bExportContent, OUString sChartType );
+ bool bHasTitle, bool bHasMajorGrid, bool bHasMinorGrid, bool bExportContent, std::u16string_view sChartType );
void exportGrid( const Reference< beans::XPropertySet >& rGridProperties, bool bMajor, bool bExportContent );
void exportDateScale( const Reference< beans::XPropertySet >& rAxisProps );
void exportAxisTitle( const Reference< beans::XPropertySet >& rTitleProps, bool bExportContent );
@@ -2290,7 +2290,7 @@ void SchXMLExportHelper_Impl::exportAxis(
const Reference< chart2::XAxis >& rChart2Axis,
const OUString& rCategoriesRange,
bool bHasTitle, bool bHasMajorGrid, bool bHasMinorGrid,
- bool bExportContent, OUString sChartType )
+ bool bExportContent, std::u16string_view sChartType )
{
std::vector< XMLPropertyState > aPropertyStates;
std::unique_ptr<SvXMLElementExport> pAxis;
@@ -2304,7 +2304,7 @@ void SchXMLExportHelper_Impl::exportAxis(
{
chart2::ScaleData aScaleData(rChart2Axis->getScaleData());
bool bShiftedCatPos = aScaleData.ShiftedCategoryPosition;
- if (sChartType == "com.sun.star.chart.BarDiagram" || sChartType == "com.sun.star.chart.StockDiagram")
+ if (sChartType == u"com.sun.star.chart.BarDiagram" || sChartType == u"com.sun.star.chart.StockDiagram")
{
if (!bShiftedCatPos)
rAxisProps->setPropertyValue("MajorOrigin", uno::makeAny(0.0));