summaryrefslogtreecommitdiff
path: root/sdext
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 /sdext
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 'sdext')
-rw-r--r--sdext/source/presenter/PresenterBitmapContainer.cxx8
-rw-r--r--sdext/source/presenter/PresenterBitmapContainer.hxx2
-rw-r--r--sdext/source/presenter/PresenterTheme.cxx6
3 files changed, 8 insertions, 8 deletions
diff --git a/sdext/source/presenter/PresenterBitmapContainer.cxx b/sdext/source/presenter/PresenterBitmapContainer.cxx
index 1ddaaff8e671..e094bae22ac0 100644
--- a/sdext/source/presenter/PresenterBitmapContainer.cxx
+++ b/sdext/source/presenter/PresenterBitmapContainer.cxx
@@ -265,13 +265,13 @@ std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> PresenterBitmapConta
}
PresenterBitmapContainer::BitmapDescriptor::TexturingMode
- PresenterBitmapContainer::StringToTexturingMode (const OUString& rsTexturingMode)
+ PresenterBitmapContainer::StringToTexturingMode (std::u16string_view rsTexturingMode)
{
- if (rsTexturingMode == "Once")
+ if (rsTexturingMode == u"Once")
return PresenterBitmapContainer::BitmapDescriptor::Once;
- else if (rsTexturingMode == "Repeat")
+ else if (rsTexturingMode == u"Repeat")
return PresenterBitmapContainer::BitmapDescriptor::Repeat;
- else if (rsTexturingMode == "Stretch")
+ else if (rsTexturingMode == u"Stretch")
return PresenterBitmapContainer::BitmapDescriptor::Stretch;
else
return PresenterBitmapContainer::BitmapDescriptor::Once;
diff --git a/sdext/source/presenter/PresenterBitmapContainer.hxx b/sdext/source/presenter/PresenterBitmapContainer.hxx
index c65c068d21a0..65f385b2b4e6 100644
--- a/sdext/source/presenter/PresenterBitmapContainer.hxx
+++ b/sdext/source/presenter/PresenterBitmapContainer.hxx
@@ -133,7 +133,7 @@ private:
const css::uno::Reference<css::rendering::XCanvas>& rxCanvas,
const std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor>& rpDefault);
static BitmapDescriptor::TexturingMode
- StringToTexturingMode (const OUString& rsTexturingMode);
+ StringToTexturingMode (std::u16string_view rsTexturingMode);
};
typedef PresenterBitmapContainer::BitmapDescriptor PresenterBitmapDescriptor;
diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx
index 66843fa45dc4..52c2d875d4ef 100644
--- a/sdext/source/presenter/PresenterTheme.cxx
+++ b/sdext/source/presenter/PresenterTheme.cxx
@@ -158,7 +158,7 @@ class ViewStyle
public:
ViewStyle();
- SharedBitmapDescriptor GetBitmap (const OUString& sBitmapName) const;
+ SharedBitmapDescriptor GetBitmap (std::u16string_view sBitmapName) const;
PresenterTheme::SharedFontDescriptor GetFont() const;
@@ -1003,9 +1003,9 @@ ViewStyle::ViewStyle()
{
}
-SharedBitmapDescriptor ViewStyle::GetBitmap (const OUString& rsBitmapName) const
+SharedBitmapDescriptor ViewStyle::GetBitmap (std::u16string_view rsBitmapName) const
{
- if (rsBitmapName == "Background")
+ if (rsBitmapName == u"Background")
return mpBackground;
else
return SharedBitmapDescriptor();