diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-22 14:08:08 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-27 11:26:32 +0100 |
commit | 9013dc1650aa8400f63da5f584df9058b1740eb3 (patch) | |
tree | a1ba4f196070459d5d823d942e5a0a121b09ea3d /sd | |
parent | db97e00893c204226a2eab2d95c9837bce3cddb0 (diff) |
Simplify loplugin:stringviewparam comparison operator handling
In practice, it works fine to look at all of them, regardless of actual argument
types.
Change-Id: Ifc49cbcd6003c8837c1b3f81d432c59fb0657bf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108366
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/LayerTabBar.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/LayerTabBar.hxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/ToolBarManager.cxx | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx index 7b274dd7210f..bdf0a1f52893 100644 --- a/sd/source/ui/dlg/LayerTabBar.cxx +++ b/sd/source/ui/dlg/LayerTabBar.cxx @@ -122,7 +122,7 @@ bool LayerTabBar::IsLocalizedNameOfStandardLayer(std::u16string_view rName) || rName == SdResId(STR_LAYER_BCKGRNDOBJ) ); } -bool LayerTabBar::IsRealNameOfStandardLayer(const OUString& rName) +bool LayerTabBar::IsRealNameOfStandardLayer(std::u16string_view rName) { return ( rName == sUNO_LayerName_layout || rName == sUNO_LayerName_controls diff --git a/sd/source/ui/inc/LayerTabBar.hxx b/sd/source/ui/inc/LayerTabBar.hxx index a7fbefc4fb35..50e565166118 100644 --- a/sd/source/ui/inc/LayerTabBar.hxx +++ b/sd/source/ui/inc/LayerTabBar.hxx @@ -20,6 +20,10 @@ #ifndef INCLUDED_SD_SOURCE_UI_INC_LAYERTABBAR_HXX #define INCLUDED_SD_SOURCE_UI_INC_LAYERTABBAR_HXX +#include <sal/config.h> + +#include <string_view> + #include <svtools/tabbar.hxx> #include <vcl/transfer.hxx> #include <sddllapi.h> @@ -66,7 +70,7 @@ public: OUString GetLayerName(sal_uInt16 nPageId) const; // Used e.g. in DeleteActualLayer() to test whether deleting is allowed. - static bool IsRealNameOfStandardLayer(const OUString& rName); + static bool IsRealNameOfStandardLayer(std::u16string_view rName); // Used e.g. in validity test of user entered names static bool IsLocalizedNameOfStandardLayer(std::u16string_view rName); diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx index 4373284d7708..7f1986c35030 100644 --- a/sd/source/ui/view/ToolBarManager.cxx +++ b/sd/source/ui/view/ToolBarManager.cxx @@ -45,6 +45,7 @@ #include <map> #include <utility> #include <memory> +#include <string_view> #include <vector> using namespace ::com::sun::star; @@ -319,7 +320,7 @@ private: ToolBarRules maToolBarRules; static OUString GetToolBarResourceName (const OUString& rsBaseName); - bool CheckPlugInMode (const OUString& rsName) const; + bool CheckPlugInMode (std::u16string_view rsName) const; DECL_LINK(UpdateCallback, void *, void); DECL_LINK(EventMultiplexerCallback, sd::tools::EventMultiplexerEvent&, void); @@ -863,7 +864,7 @@ OUString ToolBarManager::Implementation::GetToolBarResourceName ( return "private:resource/toolbar/" + rsBaseName; } -bool ToolBarManager::Implementation::CheckPlugInMode (const OUString& rsName) const +bool ToolBarManager::Implementation::CheckPlugInMode (std::u16string_view rsName) const { bool bValid (false); |