summaryrefslogtreecommitdiff
path: root/svl/source/misc/urihelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svl/source/misc/urihelper.cxx')
-rw-r--r--svl/source/misc/urihelper.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index a424653679e8..dc60dee5f73f 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -18,6 +18,8 @@
*/
#include <memory>
+#include <string_view>
+
#include <sal/config.h>
#include <unicode/idna.h>
@@ -783,11 +785,11 @@ OUString URIHelper::resolveIdnaHost(OUString const & url) {
return url;
}
OUStringBuffer buf(uri->getScheme());
- buf.append("://").appendCopy(auth, 0, hostStart);
+ buf.append("://").append(std::u16string_view(auth).substr(0, hostStart));
buf.append(
reinterpret_cast<sal_Unicode const *>(ascii.getBuffer()),
ascii.length());
- buf.appendCopy(auth, hostEnd).append(uri->getPath());
+ buf.append(std::u16string_view(auth).substr(hostEnd)).append(uri->getPath());
if (uri->hasQuery()) {
buf.append('?').append(uri->getQuery());
}