From c97ddabb78b17fa8fb568fc7511aab82f0da63c4 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 29 Apr 2023 14:26:11 +0200 Subject: [PATCH] Simplify a bit Change-Id: I201dc0c1b9438b53656802c20c181654ee758a5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151127 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sw/source/filter/ascii/wrtasc.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx index d06299ce2b0f..97f21d398bb8 100644 --- a/sw/source/filter/ascii/wrtasc.cxx +++ b/sw/source/filter/ascii/wrtasc.cxx @@ -170,17 +170,13 @@ ErrCode SwASCWriter::WriteStream() case RTL_TEXTENCODING_UCS2: #ifdef OSL_LITENDIAN Strm().SetEndian(SvStreamEndian::LITTLE); - if( bIncludeBOM ) - { - Strm().WriteUChar( 0xFF ).WriteUChar( 0xFE ); - } #else Strm().SetEndian(SvStreamEndian::BIG); +#endif if( bIncludeBOM ) { - Strm().WriteUChar( 0xFE ).WriteUChar( 0xFF ); + Strm().StartWritingUnicodeText(); } -#endif break; }