summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
Diffstat (limited to 'sax')
-rw-r--r--sax/source/fastparser/fastparser.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 71b316378e01..2a4961737f9e 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -581,14 +581,8 @@ OUString lclGetErrorMessage( xmlParserCtxtPtr ctxt, std::u16string_view sSystemI
pMessage = error->message;
else
pMessage = "unknown error";
- OUStringBuffer aBuffer( 128 );
- aBuffer.append( "[" );
- aBuffer.append( sSystemId );
- aBuffer.append( " line " );
- aBuffer.append( nLine );
- aBuffer.append( "]: " );
- aBuffer.appendAscii( pMessage );
- return aBuffer.makeStringAndClear();
+ return OUString::Concat("[") + sSystemId + " line " + OUString::number(nLine) + "]: " +
+ OUString(pMessage, strlen(pMessage), RTL_TEXTENCODING_ASCII_US);
}
// throw an exception, but avoid callback if