summaryrefslogtreecommitdiff
path: root/canvas
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 /canvas
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 'canvas')
-rw-r--r--canvas/inc/parametricpolypolygon.hxx2
-rw-r--r--canvas/source/tools/parametricpolypolygon.cxx16
2 files changed, 9 insertions, 9 deletions
diff --git a/canvas/inc/parametricpolypolygon.hxx b/canvas/inc/parametricpolypolygon.hxx
index 28be8b8155c8..15957b58f960 100644
--- a/canvas/inc/parametricpolypolygon.hxx
+++ b/canvas/inc/parametricpolypolygon.hxx
@@ -87,7 +87,7 @@ namespace canvas
static css::uno::Sequence< OUString > getAvailableServiceNames();
static ParametricPolyPolygon* create(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
- const OUString& rServiceName,
+ std::u16string_view rServiceName,
const css::uno::Sequence< css::uno::Any >& rArgs );
/// Dispose all internal references
diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx
index a0a9a7880219..bd62b1b5568a 100644
--- a/canvas/source/tools/parametricpolypolygon.cxx
+++ b/canvas/source/tools/parametricpolypolygon.cxx
@@ -41,7 +41,7 @@ namespace canvas
ParametricPolyPolygon* ParametricPolyPolygon::create(
const uno::Reference< rendering::XGraphicDevice >& rDevice,
- const OUString& rServiceName,
+ std::u16string_view rServiceName,
const uno::Sequence< uno::Any >& rArgs )
{
uno::Sequence< uno::Sequence< double > > colorSequence(2);
@@ -78,31 +78,31 @@ namespace canvas
}
}
- if ( rServiceName == "LinearGradient" )
+ if ( rServiceName == u"LinearGradient" )
{
return createLinearHorizontalGradient(rDevice, colorSequence, colorStops);
}
- else if ( rServiceName == "EllipticalGradient" )
+ else if ( rServiceName == u"EllipticalGradient" )
{
return createEllipticalGradient(rDevice, colorSequence, colorStops, fAspectRatio);
}
- else if ( rServiceName == "RectangularGradient" )
+ else if ( rServiceName == u"RectangularGradient" )
{
return createRectangularGradient(rDevice, colorSequence, colorStops, fAspectRatio);
}
- else if ( rServiceName == "VerticalLineHatch" )
+ else if ( rServiceName == u"VerticalLineHatch" )
{
// TODO: NYI
}
- else if ( rServiceName == "OrthogonalLinesHatch" )
+ else if ( rServiceName == u"OrthogonalLinesHatch" )
{
// TODO: NYI
}
- else if ( rServiceName == "ThreeCrossingLinesHatch" )
+ else if ( rServiceName == u"ThreeCrossingLinesHatch" )
{
// TODO: NYI
}
- else if ( rServiceName == "FourCrossingLinesHatch" )
+ else if ( rServiceName == u"FourCrossingLinesHatch" )
{
// TODO: NYI
}