diff options
-rw-r--r-- | compilerplugins/clang/stringviewparam.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/file/filglob.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/file/filglob.hxx | 6 | ||||
-rw-r--r-- | vcl/source/image/ImplImageTree.cxx | 5 |
4 files changed, 11 insertions, 6 deletions
diff --git a/compilerplugins/clang/stringviewparam.cxx b/compilerplugins/clang/stringviewparam.cxx index a8df3c5f128d..c0c720f06df5 100644 --- a/compilerplugins/clang/stringviewparam.cxx +++ b/compilerplugins/clang/stringviewparam.cxx @@ -131,7 +131,7 @@ DeclRefExpr const* relevantCXXMemberCallExpr(CXXMemberCallExpr const* expr) else if (auto const i = d->getIdentifier()) { auto const n = i->getName(); - if (n == "isEmpty") + if (n == "isEmpty" || n == "subView") { good = true; } 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 ); diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index 4d2906d9b779..7dc365baf4b7 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -23,6 +23,7 @@ #include <sal/log.hxx> #include <deque> +#include <string_view> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/io/XInputStream.hpp> @@ -98,9 +99,9 @@ OUString convertLcTo32Path(OUString const & rPath) return aResult; } -OUString createPath(OUString const & name, sal_Int32 pos, OUString const & locale) +OUString createPath(std::u16string_view name, sal_Int32 pos, OUString const & locale) { - return name.subView(0, pos + 1) + locale + name.subView(pos); + return name.substr(0, pos + 1) + locale + name.substr(pos); } OUString getIconCacheUrl(OUString const & sVariant, ImageRequestParameters const & rParameters) |