Changeset 170 for trunk/Packages/Common
- Timestamp:
- Jul 2, 2023, 11:07:39 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Table.pas
r169 r170 9 9 TTableFormat = (tfExcel, tfPlain, tfCsv, tfHtml, tfListView, tfMediaWiki, 10 10 tfXml, tfJson); 11 TTableFormats = set of TTableFormat; 11 12 12 13 { TRow } … … 42 43 procedure GetOutputListView(ListView: TListView); 43 44 function GetOutput(OutputFormat: TTableFormat): string; 44 procedure SetInputTabs(Text: string);45 procedure SetInputPlain(Text: string);46 45 procedure SetInputCsv(Text: string); 47 procedure SetInputXml(Text: string);48 procedure SetInputHtml(Text: string);49 46 procedure SetInputMediaWiki(Text: string); 50 47 procedure SetInputJson(Text: string); 51 48 procedure SetInput(OutputFormat: TTableFormat; Text: string); 49 function GetInputFormats: TTableFormats; 52 50 constructor Create; 53 51 destructor Destroy; override; … … 303 301 else raise Exception.Create(SUnsupportedFormat); 304 302 end; 305 end;306 307 procedure TTable.SetInputTabs(Text: string);308 begin309 310 end;311 312 procedure TTable.SetInputPlain(Text: string);313 begin314 315 303 end; 316 304 … … 339 327 FreeAndNil(Lines); 340 328 end; 341 end;342 343 procedure TTable.SetInputXml(Text: string);344 begin345 346 end;347 348 procedure TTable.SetInputHtml(Text: string);349 begin350 351 329 end; 352 330 … … 482 460 begin 483 461 case OutputFormat of 484 tfExcel: SetInputTabs(Text);485 tfPlain: SetInputPlain(Text);486 462 tfCsv: SetInputCsv(Text); 487 tfHtml: SetInputHtml(Text);488 463 tfMediaWiki: SetInputMediaWiki(Text); 489 tfXml: SetInputXml(Text);490 464 tfJson: SetInputJson(Text); 491 465 else raise Exception.Create(SUnsupportedFormat); 492 466 end; 467 end; 468 469 function TTable.GetInputFormats: TTableFormats; 470 begin 471 Result := [tfCsv, tfJson, tfMediaWiki]; 493 472 end; 494 473
Note:
See TracChangeset
for help on using the changeset viewer.