From 2b4094195eb89d9bfd41908cbb32a8b964efd9fe Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 10 Dec 2023 21:11:32 +0300 Subject: Clean up SvStream API a bit Change-Id: Ic9847185e8f551eeb05715902374d7a9a9032f60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160546 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- basic/source/classes/image.cxx | 3 ++- basic/source/runtime/iosys.cxx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'basic') diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index ee490947029e..eafb129894ab 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -440,7 +440,8 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer ) // old readers will not read this data after having read legacy data, and will proceed // straight to the end of the record. So no version restriction here. r.WriteUInt32(nUnicodeDataMagicNumber); - write_uInt16s_FromOUString(r, std::u16string_view(pStrings.get(), nStringSize)); + r.WriteUnicodeOrByteText(std::u16string_view(pStrings.get(), nStringSize), + RTL_TEXTENCODING_UNICODE); SbiCloseRecord( r, nPos ); } diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index be056aaf61e8..3d03274c46c0 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -562,7 +562,7 @@ namespace void WriteLines(SvStream &rStream, const OString& rStr) { OString aStr(convertLineEnd(rStr, rStream.GetLineDelimiter()) ); - write_uInt8s_FromOString(rStream, aStr); + rStream.WriteBytes(aStr.getStr(), aStr.getLength()); endl( rStream ); } } -- cgit