diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-11-28 22:55:26 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-11-28 22:55:26 +0200 |
commit | 1f90b032a6d8f2fce49334190e321b81832e3466 (patch) | |
tree | 6342e4d817c2f6f7ad77d78f0164543c003b6de2 /oox/source/helper | |
parent | 064ef013dc4498b6a546b153d22c5711bc29bde3 (diff) |
OUString::replace() does not modify in-place
Change-Id: I6fa7c64bdd3c7af4b9495831da063ecd917057de
Diffstat (limited to 'oox/source/helper')
-rw-r--r-- | oox/source/helper/binaryoutputstream.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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()]; |