diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-01-12 15:45:50 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-01-13 07:36:57 +0100 |
commit | 363a3be9bb17bd85fd52c1f22abdf649e7cd0d0b (patch) | |
tree | 3223ec3147f3d5f4034b5bc2cc2702302526558c /vcl/win | |
parent | 3fff050a343e7fb45c3c562772b22fb5e824352f (diff) |
loplugin:stringviewparam (clang-cl)
Change-Id: Ie66996f905fcb68ee413171c8727cb42dcb28dbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109178
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/dtrans/ImplHelper.cxx | 4 | ||||
-rw-r--r-- | vcl/win/dtrans/ImplHelper.hxx | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/vcl/win/dtrans/ImplHelper.cxx b/vcl/win/dtrans/ImplHelper.cxx index 0e38b9183d82..227876b19cb8 100644 --- a/vcl/win/dtrans/ImplHelper.cxx +++ b/vcl/win/dtrans/ImplHelper.cxx @@ -113,7 +113,7 @@ OUString getWinCPFromLocaleId( LCID lcid, LCTYPE lctype ) // to the given codepage, optional a prefix can be // given, e.g. "windows-" or "cp" -OUString getMimeCharsetFromWinCP( sal_uInt32 cp, const OUString& aPrefix ) +OUString getMimeCharsetFromWinCP( sal_uInt32 cp, std::u16string_view aPrefix ) { return aPrefix + cptostr( cp ); } @@ -122,7 +122,7 @@ OUString getMimeCharsetFromWinCP( sal_uInt32 cp, const OUString& aPrefix ) // to the given locale id and locale type, optional a // prefix can be given, e.g. "windows-" or "cp" -OUString getMimeCharsetFromLocaleId( LCID lcid, LCTYPE lctype, const OUString& aPrefix ) +OUString getMimeCharsetFromLocaleId( LCID lcid, LCTYPE lctype, std::u16string_view aPrefix ) { OUString charset = getWinCPFromLocaleId( lcid, lctype ); return aPrefix + charset; diff --git a/vcl/win/dtrans/ImplHelper.hxx b/vcl/win/dtrans/ImplHelper.hxx index ffc160602e7a..df6731ec7a30 100644 --- a/vcl/win/dtrans/ImplHelper.hxx +++ b/vcl/win/dtrans/ImplHelper.hxx @@ -19,6 +19,10 @@ #pragma once +#include <sal/config.h> + +#include <string_view> + #include <sal/types.h> #include <rtl/ustring.hxx> @@ -51,13 +55,13 @@ OUString getWinCPFromLocaleId(LCID lcid, LCTYPE lctype); // to the given codepage, optional a prefix can be // given, e.g. "windows-" or "cp" -OUString getMimeCharsetFromWinCP(sal_uInt32 cp, const OUString& aPrefix); +OUString getMimeCharsetFromWinCP(sal_uInt32 cp, std::u16string_view aPrefix); // returns a mime charset parameter value appropriate // to the given locale id and locale type, optional a // prefix can be given, e.g. "windows-" or "cp" -OUString getMimeCharsetFromLocaleId(LCID lcid, LCTYPE lctype, const OUString& aPrefix); +OUString getMimeCharsetFromLocaleId(LCID lcid, LCTYPE lctype, std::u16string_view aPrefix); // returns true, if a given codepage is an oem codepage |