From 17950f4d204e9947f125ebc0aac1156eba6501f2 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 10 Jan 2022 11:51:40 +0200 Subject: 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 --- sw/source/core/doc/tblafmt.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source/core/doc') diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 6385794aa620..c92cadd49f50 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -1150,7 +1150,7 @@ bool SwTableAutoFormatTable::Save( SvStream& rStream ) const bRet = rFormat.Save(rStream, AUTOFORMAT_FILE_VERSION); } } - rStream.Flush(); + rStream.FlushBuffer(); return bRet; } -- cgit v1.2.3