From 1f90b032a6d8f2fce49334190e321b81832e3466 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 28 Nov 2012 22:55:26 +0200 Subject: OUString::replace() does not modify in-place Change-Id: I6fa7c64bdd3c7af4b9495831da063ecd917057de --- oox/source/helper/binaryoutputstream.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'oox') diff --git a/oox/source/helper/binaryoutputstream.cxx b/oox/source/helper/binaryoutputstream.cxx index 88900f1050f1..3cf66a45760a 100644 --- a/oox/source/helper/binaryoutputstream.cxx +++ b/oox/source/helper/binaryoutputstream.cxx @@ -110,7 +110,7 @@ BinaryOutputStream::writeCharArrayUC( const OUString& rString, rtl_TextEncoding { OString sBuf( OUStringToOString( rString, eTextEnc ) ); if( !bAllowNulChars ) - sBuf.replace( '\0', '?' ); + sBuf = sBuf.replace( '\0', '?' ); writeMemory( static_cast< const void* >( sBuf.getStr() ), sBuf.getLength() ); } @@ -119,7 +119,7 @@ BinaryOutputStream::writeUnicodeArray( const ::rtl::OUString& rString, bool bAll { OUString sBuf( rString ); if( !bAllowNulChars ) - sBuf.replace( '\0', '?' ); + sBuf = sBuf.replace( '\0', '?' ); #ifdef OSL_BIGENDIAN // need a non-const buffer for swapping byte order sal_Unicode notConst[sBuf.getLength()]; -- cgit