mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 20:40:20 +02:00
* Added DetectBOM to TCSVDocument
This commit is contained in:
parent
e5ac07db13
commit
cb03124cc5
@ -56,8 +56,12 @@ type
|
||||
{$ENDIF}
|
||||
|
||||
// Random access to CSV document. Reads entire document into memory.
|
||||
|
||||
{ TCSVDocument }
|
||||
|
||||
TCSVDocument = class(TCSVHandler)
|
||||
private
|
||||
FDetectBOM: Boolean;
|
||||
FRows: TFPObjectList;
|
||||
FParser: TCSVParser;
|
||||
FBuilder: TCSVBuilder;
|
||||
@ -130,6 +134,9 @@ type
|
||||
// Remove empty cells at end of rows from entire document
|
||||
procedure RemoveTrailingEmptyCells;
|
||||
|
||||
// Detect bom
|
||||
Property DetectBOM : Boolean Read FDetectBOM Write FDetectBOM;
|
||||
|
||||
// Properties
|
||||
|
||||
// Cell data at column ACol, row ARow.
|
||||
@ -428,6 +435,7 @@ begin
|
||||
FreeAndNil(FParser);
|
||||
FParser:=TCSVParser.Create;
|
||||
FParser.AssignCSVProperties(Self);
|
||||
FParser.DetectBOM:=Self.DetectBOM;
|
||||
with FParser do
|
||||
begin
|
||||
SetSource(AStream);
|
||||
|
Loading…
Reference in New Issue
Block a user