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 /i18npool/inc | |
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 'i18npool/inc')
-rw-r--r-- | i18npool/inc/indexentrysupplier_default.hxx | 3 | ||||
-rw-r--r-- | i18npool/inc/localedata.hxx | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/i18npool/inc/indexentrysupplier_default.hxx b/i18npool/inc/indexentrysupplier_default.hxx index 29fe3cdbf214..f45dd8f8b2d3 100644 --- a/i18npool/inc/indexentrysupplier_default.hxx +++ b/i18npool/inc/indexentrysupplier_default.hxx @@ -22,6 +22,7 @@ #include "indexentrysupplier_common.hxx" #include <memory> +#include <string_view> namespace i18npool { @@ -85,7 +86,7 @@ public: void init(const css::lang::Locale& rLocale, const OUString& algorithm); /// @throws css::uno::RuntimeException - void makeIndexKeys(const css::lang::Locale &rLocale, const OUString &algorithm); + void makeIndexKeys(const css::lang::Locale &rLocale, std::u16string_view algorithm); sal_Int16 getIndexWeight(const OUString& rIndexEntry); OUString getIndexDescription(const OUString& rIndexEntry); diff --git a/i18npool/inc/localedata.hxx b/i18npool/inc/localedata.hxx index 19933376776f..327e9c196bc7 100644 --- a/i18npool/inc/localedata.hxx +++ b/i18npool/inc/localedata.hxx @@ -31,6 +31,7 @@ #include <rtl/ref.hxx> #include <rtl/ustring.hxx> #include <vector> +#include <string_view> #include <memory> #include <osl/module.hxx> @@ -79,7 +80,7 @@ public: virtual css::uno::Sequence< css::i18n::FormatElement > SAL_CALL getAllFormats( const css::lang::Locale& rLocale ) override; virtual css::uno::Sequence< css::i18n::Implementation > SAL_CALL getCollatorImplementations( const css::lang::Locale& rLocale ) override; /// @throws css::uno::RuntimeException - OUString getCollatorRuleByAlgorithm( const css::lang::Locale& rLocale, const OUString& algorithm ); + OUString getCollatorRuleByAlgorithm( const css::lang::Locale& rLocale, std::u16string_view algorithm ); virtual css::uno::Sequence< OUString > SAL_CALL getTransliterations( const css::lang::Locale& rLocale ) override; virtual css::i18n::ForbiddenCharacters SAL_CALL getForbiddenCharacters( const css::lang::Locale& rLocale ) override; virtual css::uno::Sequence< OUString > SAL_CALL getReservedWord( const css::lang::Locale& rLocale ) override ; @@ -106,9 +107,10 @@ public: /// @throws css::uno::RuntimeException OUString getDefaultIndexAlgorithm( const css::lang::Locale& rLocale ); /// @throws css::uno::RuntimeException - OUString getIndexKeysByAlgorithm( const css::lang::Locale& rLocale, const OUString& algorithm ); + OUString getIndexKeysByAlgorithm( + const css::lang::Locale& rLocale, std::u16string_view algorithm ); /// @throws css::uno::RuntimeException - OUString getIndexModuleByAlgorithm( const css::lang::Locale& rLocale, const OUString& algorithm ); + OUString getIndexModuleByAlgorithm( const css::lang::Locale& rLocale, std::u16string_view algorithm ); /// @throws css::uno::RuntimeException css::uno::Sequence< css::i18n::UnicodeScript > getUnicodeScripts( const css::lang::Locale& rLocale ); /// @throws css::uno::RuntimeException @@ -116,7 +118,7 @@ public: /// @throws css::uno::RuntimeException bool hasPhonetic( const css::lang::Locale& rLocale ); /// @throws css::uno::RuntimeException - bool isPhonetic( const css::lang::Locale& rLocale, const OUString& algorithm ); + bool isPhonetic( const css::lang::Locale& rLocale, std::u16string_view algorithm ); /// @throws css::uno::RuntimeException OUString getHangingCharacters( const css::lang::Locale& rLocale ); @@ -133,7 +135,7 @@ private: /// @throws css::uno::RuntimeException oslGenericFunction getFunctionSymbol( const css::lang::Locale& rLocale, const char* pFunction ); sal_Unicode ** getIndexArray(const css::lang::Locale& rLocale, sal_Int16& indexCount); - sal_Unicode ** getIndexArrayForAlgorithm(const css::lang::Locale& rLocale, const OUString& rAlgorithm); + sal_Unicode ** getIndexArrayForAlgorithm(const css::lang::Locale& rLocale, std::u16string_view rAlgorithm); /// @throws css::uno::RuntimeException css::uno::Sequence< css::i18n::CalendarItem2 > & getCalendarItemByName(const OUString& name, |