From bc83057bd8d0506b3544a90445712b520c3a7f16 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Mon, 13 Nov 2017 17:29:24 +0000 Subject: [PATCH] fpspreadsheet: (Hopefully) fix missing last character of cell text copied to clipboard as CF_TEXT (see http://forum.lazarus.freepascal.org/index.php/topic,38925.0.html) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6069 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/source/common/fpspreadsheet.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/fpspreadsheet/source/common/fpspreadsheet.pas b/components/fpspreadsheet/source/common/fpspreadsheet.pas index 0ec7f6cee..4085d00d8 100644 --- a/components/fpspreadsheet/source/common/fpspreadsheet.pas +++ b/components/fpspreadsheet/source/common/fpspreadsheet.pas @@ -9499,6 +9499,9 @@ begin // indicate that this should be the special clipboard version of the stream. clipbook.WriteToStream(AStream, AFormat, AParams + [spClipboard]); + if AFormat = sfCSV then + AStream.WriteByte(0); + // The calling routine which copies the stream to the clipboard requires // the stream to be at its beginning. AStream.Position := 0;