From 391cd0a64784c18a5c90471c0b7c842bcd2d097c Mon Sep 17 00:00:00 2001 From: bigchimp Date: Fri, 24 Oct 2014 13:21:34 +0000 Subject: [PATCH] * fpspreadsheet: csv writer: get rid of multiple quoting (let csvdocument handle quoting) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3686 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/fpscsv.pas | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/fpspreadsheet/fpscsv.pas b/components/fpspreadsheet/fpscsv.pas index b83fef146..0215d2640 100644 --- a/components/fpspreadsheet/fpscsv.pas +++ b/components/fpspreadsheet/fpscsv.pas @@ -312,7 +312,7 @@ begin ACurrencySymbol := ''; end; -{ Checks if text is quoted; strips starting and ending quotes } +{ Checks if text is quoted; strips any starting and ending quotes } function TsCSVReader.IsQuotedText(var AText: String): Boolean; begin if (Length(AText) > 1) and (CSVParams.QuoteChar <> #0) and @@ -579,8 +579,7 @@ begin if ACell = nil then exit; s := ACell^.UTF8StringValue; - if CSVParams.QuoteChar <> #0 then - s := CSVParams.QuoteChar + s + CSVParams.QuoteChar; + // No need to quote; csvdocument will do that for us... FCSVBuilder.AppendCell(s); // AppendToStream(AStream, s); end;