fpicker/source/win32/VistaFilePickerImpl.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 020cf33af4de4f9a0b3a9b920d0b1035959df440
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Apr 14 23:02:27 2022 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Fri Apr 15 09:37:48 2022 +0200

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

diff --git a/fpicker/source/win32/VistaFilePickerImpl.cxx 
b/fpicker/source/win32/VistaFilePickerImpl.cxx
index 76da82108cde..81732ce5cc97 100644
--- a/fpicker/source/win32/VistaFilePickerImpl.cxx
+++ b/fpicker/source/win32/VistaFilePickerImpl.cxx
@@ -36,6 +36,7 @@
 #include <osl/file.hxx>
 #include <rtl/process.h>
 #include <o3tl/char16_t2wchar_t.hxx>
+#include <o3tl/string_view.hxx>
 #include "WinImplHelper.hxx"
 
 #include <shlguid.h>
@@ -224,7 +225,7 @@ bailout:
 static OUString lcl_AdjustFilterName(const OUString& sName)
 {
     const sal_Int32 idx = sName.indexOf("(.");
-    return (idx > 0) ? sName.copy(0, idx).trim() : sName;
+    return (idx > 0) ? OUString(o3tl::trim(sName.subView(0, idx))) : sName;
 }
 
 // rvStrings holds the OUStrings, pointers to which data are stored in 
returned COMDLG_FILTERSPEC

Reply via email to