From 241bee7e4be6a205fae0d3f5508e084462c7ca55 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 10 Oct 2019 11:54:27 +0200 Subject: convert WriteCharPtr..getStr to WriteOString and improve the WriteOString method, we can avoid the strlen here, we already have the length One change in behaviour to be noted - if the string contains trailing zero bytes, which ARE INCLUDED IN THE STRING LENGTH, i.e. I'm not talking about the normal terminating zero, then this patch changes behaviour because we will now write those zeros to the stream. Change-Id: I4668b9b9eb877f820b1dc70d6cd10ba2623bc0a2 Reviewed-on: https://gerrit.libreoffice.org/80597 Tested-by: Jenkins Reviewed-by: Noel Grandin --- tools/source/inet/inetstrm.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx index c23289923af4..a26212fa1761 100644 --- a/tools/source/inet/inetstrm.cxx +++ b/tools/source/inet/inetstrm.cxx @@ -42,9 +42,9 @@ int INetMIMEMessageStream::GetHeaderLine(sal_Char* pData, sal_uInt32 nSize) if (aHeader.GetValue().getLength()) { // NYI: Folding long lines. - maMsgBuffer.WriteCharPtr( aHeader.GetName().getStr() ); + maMsgBuffer.WriteOString( aHeader.GetName() ); maMsgBuffer.WriteCharPtr( ": " ); - maMsgBuffer.WriteCharPtr( aHeader.GetValue().getStr() ); + maMsgBuffer.WriteOString( aHeader.GetValue() ); maMsgBuffer.WriteCharPtr( "\r\n" ); } } -- cgit