diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-10 11:51:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-10 17:59:45 +0100 |
commit | 17950f4d204e9947f125ebc0aac1156eba6501f2 (patch) | |
tree | 1b51bdc13a1006aeb29a6dff658ba1b3f1028708 /sc | |
parent | 952b3b227e02ae4eedce3138fcb39613bf12486d (diff) |
use less SvStream::Flush()
Flush() turns into a sync() on the device, which is pretty slow.
Most of the time all we actually want to do is to flush the internal
buffers from the SvStream.
So expose the FlushBuffer method and use that where possible.
And also means we don't need the mbDontFlushOnClose flag on SvStream
any more.
Change-Id: Ibe089b88b325f0fdc565200a97ce72cd26b7fcfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128214
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/autoform.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xechart.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xestream.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 07f8b5134569..55676816bc15 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -923,7 +923,7 @@ bool ScAutoFormat::Save() } } - rStream.Flush(); + rStream.FlushBuffer(); aMedium.Commit(); } diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index 089f578b3e10..78fe80cadc6f 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -714,7 +714,7 @@ void XclExpChEscherFormat::WriteBody( XclExpStream& rStrm ) // write Escher property container via temporary memory stream SvMemoryStream aMemStrm; maData.mxEscherSet->Commit( aMemStrm ); - aMemStrm.Flush(); + aMemStrm.FlushBuffer(); aMemStrm.Seek( STREAM_SEEK_TO_BEGIN ); rStrm.CopyFromStream( aMemStrm ); } diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 17395145bbab..f8337b327930 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -104,7 +104,7 @@ XclExpStream::XclExpStream( SvStream& rOutStrm, const XclExpRoot& rRoot, sal_uIn XclExpStream::~XclExpStream() { - mrStrm.Flush(); + mrStrm.FlushBuffer(); } void XclExpStream::StartRecord( sal_uInt16 nRecId, std::size_t nRecSize ) |