summaryrefslogtreecommitdiff
path: root/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx')
-rw-r--r--stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx
index af7b25c57264..7fdc07b922e7 100644
--- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx
+++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx
@@ -40,6 +40,7 @@
#include <sal/types.h>
#include <exception>
+#include <string_view>
namespace {
@@ -284,7 +285,7 @@ void SAL_CALL UrlReference::setName(OUString const & name)
OUStringBuffer newPath;
newPath.append(encodeNameOrParamFragment(name));
- newPath.appendCopy(m_base.m_path, i);
+ newPath.append(std::u16string_view(m_base.m_path).substr(i));
m_base.m_path = newPath.makeStringAndClear();
}
@@ -315,7 +316,7 @@ void UrlReference::setParameter(OUString const & key, OUString const & value)
}
OUStringBuffer newPath;
- newPath.appendCopy(m_base.m_path, 0, i);
+ newPath.append(std::u16string_view(m_base.m_path).substr(0, i));
if (!bExistent) {
newPath.append( m_base.m_path.indexOf('?') < 0 ? '?' : '&' );
newPath.append(encodeNameOrParamFragment(key));
@@ -325,7 +326,7 @@ void UrlReference::setParameter(OUString const & key, OUString const & value)
if (bExistent) {
/*oldValue = */
parsePart(m_base.m_path, false, &i); // skip key
- newPath.appendCopy(m_base.m_path, i);
+ newPath.append(std::u16string_view(m_base.m_path).substr(i));
}
m_base.m_path = newPath.makeStringAndClear();