summaryrefslogtreecommitdiff
path: root/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'stoc/source/uriproc/ExternalUriReferenceTranslator.cxx')
-rw-r--r--stoc/source/uriproc/ExternalUriReferenceTranslator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx
index f7b99bf9a8e7..9e21c5aef79f 100644
--- a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx
+++ b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx
@@ -92,7 +92,7 @@ OUString Translator::translateToInternal(
return externalUriReference;
}
sal_Int32 i = RTL_CONSTASCII_LENGTH("file:");
- OUStringBuffer buf;
+ OUStringBuffer buf(128);
buf.append(std::u16string_view(externalUriReference).substr(0, i));
// Some environments (e.g., Java) produce illegal file URLs without an
// authority part; treat them as having an empty authority part:
@@ -140,7 +140,7 @@ OUString Translator::translateToExternal(
return internalUriReference;
}
sal_Int32 i = RTL_CONSTASCII_LENGTH("file://");
- OUStringBuffer buf;
+ OUStringBuffer buf(128);
buf.append(std::u16string_view(internalUriReference).substr(0, i));
rtl_TextEncoding encoding = osl_getThreadTextEncoding();
for (bool path = true;;) {