From 75b3b0004be9b6a44346daa02a7d9379d8e9d068 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Mon, 16 Jan 2023 18:51:24 +0000 Subject: [PATCH] fpspreadsheet: Call Flush() at the end of TsWorksheetDataset.CopyFromDataset to make sure that the output file is written. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8687 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/source/dataset/fpsdataset.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/fpspreadsheet/source/dataset/fpsdataset.pas b/components/fpspreadsheet/source/dataset/fpsdataset.pas index 278eab5c9..a2b9f81e6 100644 --- a/components/fpspreadsheet/source/dataset/fpsdataset.pas +++ b/components/fpspreadsheet/source/dataset/fpsdataset.pas @@ -432,7 +432,7 @@ begin with PsBlobData(buffer)^ do Write(Data[0], Length(Data)); // Writes the data into the stream Position := 0; - SaveToFile('test.txt'); +// SaveToFile('test.txt'); end; Position := 0; end; @@ -718,7 +718,7 @@ var stream: TMemoryStream; bm: TBookmark; codepageStr: String; - s: RawByteString; + s: RawByteString = ''; sUTF8: UTF8String; begin if Active then @@ -816,6 +816,7 @@ begin end; inc(FAutoIncValue); FModified := true; + Flush; finally stream.Free; ADataset.GotoBookmark(bm);