diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-25 08:14:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-30 12:32:14 +0100 |
commit | 8332d6d8200e8ca1f22dd98d9373efd5a431d09c (patch) | |
tree | dd45d452202998297b8562743ea6345462304d04 /oox/source/drawingml | |
parent | d05a4cfbdcece491f7385dbeaa7eca03f2fdc1d5 (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 'oox/source/drawingml')
-rw-r--r-- | oox/source/drawingml/chart/seriesconverter.cxx | 14 | ||||
-rw-r--r-- | oox/source/drawingml/color.cxx | 58 |
2 files changed, 36 insertions, 36 deletions
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 2de8ee82d2f9..6e0b21071553 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -239,19 +239,19 @@ void importFillProperties( PropertySet& rPropSet, Shape& rShape, const GraphicHe } -DataPointCustomLabelFieldType lcl_ConvertFieldNameToFieldEnum( const OUString& rField ) +DataPointCustomLabelFieldType lcl_ConvertFieldNameToFieldEnum( std::u16string_view rField ) { - if (rField == "VALUE") + if (rField == u"VALUE") return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE; - else if (rField == "SERIESNAME") + else if (rField == u"SERIESNAME") return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME; - else if (rField == "CATEGORYNAME") + else if (rField == u"CATEGORYNAME") return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CATEGORYNAME; - else if (rField == "CELLREF") + else if (rField == u"CELLREF") return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLREF; - else if (rField == "CELLRANGE") + else if (rField == u"CELLRANGE") return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLRANGE; - else if (rField == "PERCENTAGE") + else if (rField == u"PERCENTAGE") return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_PERCENTAGE; else return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT; diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx index 33e3c3dcd053..e87079945600 100644 --- a/oox/source/drawingml/color.cxx +++ b/oox/source/drawingml/color.cxx @@ -402,63 +402,63 @@ OUString Color::getColorTransformationName( sal_Int32 nElement ) return OUString(); } -sal_Int32 Color::getColorTransformationToken( const OUString& sName ) +sal_Int32 Color::getColorTransformationToken( std::u16string_view sName ) { - if( sName == "red" ) + if( sName == u"red" ) return XML_red; - else if( sName == "redMod" ) + else if( sName == u"redMod" ) return XML_redMod; - else if( sName == "redOff" ) + else if( sName == u"redOff" ) return XML_redOff; - else if( sName == "green" ) + else if( sName == u"green" ) return XML_green; - else if( sName == "greenMod" ) + else if( sName == u"greenMod" ) return XML_greenMod; - else if( sName == "greenOff" ) + else if( sName == u"greenOff" ) return XML_greenOff; - else if( sName == "blue" ) + else if( sName == u"blue" ) return XML_blue; - else if( sName == "blueMod" ) + else if( sName == u"blueMod" ) return XML_blueMod; - else if( sName == "blueOff" ) + else if( sName == u"blueOff" ) return XML_blueOff; - else if( sName == "alpha" ) + else if( sName == u"alpha" ) return XML_alpha; - else if( sName == "alphaMod" ) + else if( sName == u"alphaMod" ) return XML_alphaMod; - else if( sName == "alphaOff" ) + else if( sName == u"alphaOff" ) return XML_alphaOff; - else if( sName == "hue" ) + else if( sName == u"hue" ) return XML_hue; - else if( sName == "hueMod" ) + else if( sName == u"hueMod" ) return XML_hueMod; - else if( sName == "hueOff" ) + else if( sName == u"hueOff" ) return XML_hueOff; - else if( sName == "sat" ) + else if( sName == u"sat" ) return XML_sat; - else if( sName == "satMod" ) + else if( sName == u"satMod" ) return XML_satMod; - else if( sName == "satOff" ) + else if( sName == u"satOff" ) return XML_satOff; - else if( sName == "lum" ) + else if( sName == u"lum" ) return XML_lum; - else if( sName == "lumMod" ) + else if( sName == u"lumMod" ) return XML_lumMod; - else if( sName == "lumOff" ) + else if( sName == u"lumOff" ) return XML_lumOff; - else if( sName == "shade" ) + else if( sName == u"shade" ) return XML_shade; - else if( sName == "tint" ) + else if( sName == u"tint" ) return XML_tint; - else if( sName == "gray" ) + else if( sName == u"gray" ) return XML_gray; - else if( sName == "comp" ) + else if( sName == u"comp" ) return XML_comp; - else if( sName == "inv" ) + else if( sName == u"inv" ) return XML_inv; - else if( sName == "gamma" ) + else if( sName == u"gamma" ) return XML_gamma; - else if( sName == "invGamma" ) + else if( sName == u"invGamma" ) return XML_invGamma; SAL_WARN( "oox.drawingml", "Color::getColorTransformationToken - unexpected transformation type" ); |