summaryrefslogtreecommitdiff
path: root/ucb/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-11-12 23:31:49 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-11-15 17:16:59 +0100
commit87b4bf1ea44235ca64ec7b2b2ba41b91da6ed384 (patch)
treea55ef2a0d1069c99efa7d5b23af3e343e99c170e /ucb/source
parentf9c6a153c95c4acc6ba02e660c6ca51166b4c79a (diff)
Extend loplugin:stringviewparen: subView
Change-Id: Iee4833b148a5e17e09f84bdfbc8692aa5a956618 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105777 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'ucb/source')
-rw-r--r--ucb/source/ucp/file/filglob.cxx4
-rw-r--r--ucb/source/ucp/file/filglob.hxx6
2 files changed, 7 insertions, 3 deletions
diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx
index 4c5ea1249e87..2ff92af3acb8 100644
--- a/ucb/source/ucp/file/filglob.cxx
+++ b/ucb/source/ucp/file/filglob.cxx
@@ -174,11 +174,11 @@ namespace fileaccess {
OUString newName(
const OUString& aNewPrefix,
const OUString& aOldPrefix,
- const OUString& old_Name )
+ std::u16string_view old_Name )
{
sal_Int32 srcL = aOldPrefix.getLength();
- return aNewPrefix + old_Name.subView( srcL );
+ return aNewPrefix + old_Name.substr( srcL );
}
diff --git a/ucb/source/ucp/file/filglob.hxx b/ucb/source/ucp/file/filglob.hxx
index d1e9a4a01fac..ce3a32fea9f5 100644
--- a/ucb/source/ucp/file/filglob.hxx
+++ b/ucb/source/ucp/file/filglob.hxx
@@ -19,6 +19,10 @@
#ifndef INCLUDED_UCB_SOURCE_UCP_FILE_FILGLOB_HXX
#define INCLUDED_UCB_SOURCE_UCP_FILE_FILGLOB_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <rtl/ustring.hxx>
#include <osl/file.hxx>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
@@ -44,7 +48,7 @@ namespace fileaccess {
// Changes the prefix in name
extern OUString newName( const OUString& aNewPrefix,
const OUString& aOldPrefix,
- const OUString& old_Name );
+ std::u16string_view old_Name );
// returns the last part of the given url as title
extern OUString getTitle( const OUString& aPath );