summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-03 16:03:32 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-05-03 18:56:43 +0200
commit19e4ab8754240e019deae26b861745b91f4044e6 (patch)
treef1bee198f4b12c9e4d1949c120785ce5216c0198 /vcl
parentab387593b9a9f5b23df55c12679118dddc8e181a (diff)
loplugin:stringviewparam
Change-Id: I32ded64d7e9a86a6226dfbc4a3b9262bc7572ad2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133761 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/win/salframe.h6
-rw-r--r--vcl/win/window/keynames.cxx5
2 files changed, 8 insertions, 3 deletions
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index 0cce466b3173..e3d8b685a229 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -20,6 +20,10 @@
#ifndef INCLUDED_VCL_INC_WIN_SALFRAME_H
#define INCLUDED_VCL_INC_WIN_SALFRAME_H
+#include <sal/config.h>
+
+#include <string_view>
+
#include <vcl/sysdata.hxx>
#include <salframe.hxx>
#include <svsys.h>
@@ -147,7 +151,7 @@ bool UseDarkMode();
// get foreign key names
namespace vcl_sal {
OUString getKeysReplacementName(
- OUString const & pLang,
+ std::u16string_view pLang,
LONG nSymbol );
}
diff --git a/vcl/win/window/keynames.cxx b/vcl/win/window/keynames.cxx
index d1dac8f08c5c..8f0996445cb6 100644
--- a/vcl/win/window/keynames.cxx
+++ b/vcl/win/window/keynames.cxx
@@ -18,6 +18,7 @@
*/
#include <string.h>
+#include <o3tl/string_view.hxx>
#include <rtl/ustring.hxx>
#include <sal/macros.h>
@@ -201,11 +202,11 @@ namespace vcl_sal {
};
// translate keycodes, used within the displayed menu shortcuts
- OUString getKeysReplacementName( OUString const & pLang, LONG nSymbol )
+ OUString getKeysReplacementName( std::u16string_view pLang, LONG nSymbol )
{
for( unsigned int n = 0; n < SAL_N_ELEMENTS(aKeyboards); n++ )
{
- if( pLang.equalsAscii( aKeyboards[n].pLangName ) )
+ if( o3tl::equalsAscii( pLang, aKeyboards[n].pLangName ) )
{
const struct KeysNameReplacement* pRepl = aKeyboards[n].pReplacements;
for( int m = aKeyboards[n].nReplacements ; m ; )