diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-12 12:43:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-13 08:38:53 +0200 |
commit | fdfd517a6f75e394ddcb1e195decbfed33ba56b9 (patch) | |
tree | e3bff14e5531affcd908415b4e85d7ceac4aa1fd /desktop | |
parent | e568c9dca8b93b96a8a130a8fb6f1bba1a33d6ea (diff) |
loplugin:stringviewparam whitelist some more functions
for which we have o3tl:: equivalents
Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/registry/dp_registry.cxx | 4 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx index 17b9b774a17d..9932dc6f6b64 100644 --- a/desktop/source/deployment/registry/dp_registry.cxx +++ b/desktop/source/deployment/registry/dp_registry.cxx @@ -72,8 +72,8 @@ class PackageRegistryImpl : private cppu::BaseMutex, public t_helper } }; struct ci_string_equals { - bool operator () ( OUString const & str1, std::u16string_view str2 ) const{ - return str1.equalsIgnoreAsciiCase( str2 ); + bool operator () ( std::u16string_view str1, std::u16string_view str2 ) const{ + return o3tl::equalsIgnoreAsciiCase( str1, str2 ); } }; typedef std::unordered_map< diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 017a5838c93b..33b763b3a1cb 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1181,19 +1181,19 @@ rtl::Reference<LOKClipboard> forceSetClipboardForCurrentView(LibreOfficeKitDocum #endif -const vcl::Font* FindFont(const OUString& rFontName) +const vcl::Font* FindFont(std::u16string_view rFontName) { SfxObjectShell* pDocSh = SfxObjectShell::Current(); const SvxFontListItem* pFonts = static_cast<const SvxFontListItem*>(pDocSh->GetItem(SID_ATTR_CHAR_FONTLIST)); const FontList* pList = pFonts ? pFonts->GetFontList() : nullptr; - if (pList && !rFontName.isEmpty()) + if (pList && !rFontName.empty()) if (sal_Handle hMetric = pList->GetFirstFontMetric(rFontName)) return &FontList::GetFontMetric(hMetric); return nullptr; } -vcl::Font FindFont_FallbackToDefault(const OUString& rFontName) +vcl::Font FindFont_FallbackToDefault(std::u16string_view rFontName) { if (auto pFound = FindFont(rFontName)) return *pFound; |