From 9013dc1650aa8400f63da5f584df9058b1740eb3 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 22 Dec 2020 14:08:08 +0100 Subject: 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 --- include/comphelper/graphicmimetype.hxx | 6 +++++- include/sfx2/XmlIdRegistry.hxx | 2 +- include/sfx2/mailmodelapi.hxx | 3 ++- include/xmloff/SettingsExportHelper.hxx | 6 +++++- 4 files changed, 13 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/comphelper/graphicmimetype.hxx b/include/comphelper/graphicmimetype.hxx index 53ffd49888e4..94a3cd3cd093 100644 --- a/include/comphelper/graphicmimetype.hxx +++ b/include/comphelper/graphicmimetype.hxx @@ -10,6 +10,10 @@ #ifndef INCLUDED_COMPHELPER_GMH_HXX #define INCLUDED_COMPHELPER_GMH_HXX +#include + +#include + #include #include #include @@ -30,7 +34,7 @@ namespace comphelper class COMPHELPER_DLLPUBLIC GraphicMimeTypeHelper { public: - static OUString GetMimeTypeForExtension(const OString& rExt); + static OUString GetMimeTypeForExtension(std::string_view rExt); static OUString GetMimeTypeForXGraphic(const css::uno::Reference& xGraphic); static OUString diff --git a/include/sfx2/XmlIdRegistry.hxx b/include/sfx2/XmlIdRegistry.hxx index 9e08bf4bba06..a2b4b2129760 100644 --- a/include/sfx2/XmlIdRegistry.hxx +++ b/include/sfx2/XmlIdRegistry.hxx @@ -41,7 +41,7 @@ namespace sfx2 { /** is i_rIdref a valid NCName ? */ bool SFX2_DLLPUBLIC isValidNCName(std::u16string_view i_rIdref); -bool SFX2_DLLPUBLIC isValidXmlId(OUString const & i_rStreamName, +bool SFX2_DLLPUBLIC isValidXmlId(std::u16string_view i_rStreamName, std::u16string_view i_rIdref); // XML ID handling --------------------------------------------------- diff --git a/include/sfx2/mailmodelapi.hxx b/include/sfx2/mailmodelapi.hxx index 8ee361cd7908..f701b98972ae 100644 --- a/include/sfx2/mailmodelapi.hxx +++ b/include/sfx2/mailmodelapi.hxx @@ -23,6 +23,7 @@ #include #include #include +#include #include namespace com::sun::star::beans { struct PropertyValue; } @@ -59,7 +60,7 @@ private: static SaveResult ShowFilterOptionsDialog( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR, const css::uno::Reference< css::frame::XModel >& xModel, const OUString& rFilterName, - const OUString& rType, + std::u16string_view rType, bool bModified, sal_Int32& rNumArgs, css::uno::Sequence< css::beans::PropertyValue >& rArgs ); diff --git a/include/xmloff/SettingsExportHelper.hxx b/include/xmloff/SettingsExportHelper.hxx index 784c8dd67075..0ee9f3ea4ee3 100644 --- a/include/xmloff/SettingsExportHelper.hxx +++ b/include/xmloff/SettingsExportHelper.hxx @@ -20,6 +20,10 @@ #ifndef INCLUDED_XMLOFF_SETTINGSEXPORTHELPER_HXX #define INCLUDED_XMLOFF_SETTINGSEXPORTHELPER_HXX +#include + +#include + #include #include @@ -47,7 +51,7 @@ class XMLOFF_DLLPUBLIC XMLSettingsExportHelper css::uno::Reference< css::util::XStringSubstitution > mxStringSubstitution; - void ManipulateSetting( css::uno::Any& rAny, const OUString& rName ) const; + void ManipulateSetting( css::uno::Any& rAny, std::u16string_view rName ) const; void CallTypeFunction(const css::uno::Any& rAny, const OUString& rName) const; -- cgit