summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-04-14 23:02:27 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-04-15 09:37:48 +0200
commit020cf33af4de4f9a0b3a9b920d0b1035959df440 (patch)
tree4ab356142d15e102e311753bc0d367ddedccf9dc /fpicker
parent6a9f342addf8b1c766163575c7b63e7fcc1f714e (diff)
loplugin:stringview
Change-Id: I4e03bb0674dff734c41f4206b1849ede3c6949ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133055 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/win32/VistaFilePickerImpl.cxx3
1 files changed, 2 insertions, 1 deletions
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