vcl/inc/win/salframe.h      |    6 +++++-
 vcl/win/window/keynames.cxx |    5 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 19e4ab8754240e019deae26b861745b91f4044e6
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue May 3 16:03:32 2022 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Tue May 3 18:56:43 2022 +0200

    loplugin:stringviewparam
    
    Change-Id: I32ded64d7e9a86a6226dfbc4a3b9262bc7572ad2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133761
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

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 ; )

Reply via email to