fpspreadsheet: Split chart writing code off of ods writer.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8996 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-10-29 12:10:50 +00:00
parent 49849cc193
commit b8bff13140
6 changed files with 1511 additions and 1409 deletions

View File

@ -83,7 +83,7 @@ begin
ch.Background.Style := fsSolidFill;
ch.Border.Style := clsSolid;
ch.PlotArea.Background.Style := fsSolidFill;
ch.RotatedAxes := true;
//ch.RotatedAxes := true;
ch.StackMode := csmStackedPercentage;
//ch.Interpolation := ciCubicSpline;

View File

@ -33,7 +33,7 @@
This package is all you need if you don't want graphical components (such as grids and charts)."/>
<License Value="LGPL with static linking exception. This is the same license as is used in the LCL (Lazarus Component Library)."/>
<Version Major="1" Minor="17"/>
<Files Count="58">
<Files Count="59">
<Item1>
<Filename Value="source\fps.inc"/>
<Type Value="Include"/>
@ -305,6 +305,10 @@ This package is all you need if you don&apos;t want graphical components (such a
<Filename Value="source\common\fpspreadsheet_chart.inc"/>
<Type Value="Binary"/>
</Item58>
<Item59>
<Filename Value="source\common\fpsopendocumentchart.pas"/>
<UnitName Value="fpsopendocumentchart"/>
</Item59>
</Files>
<CompatibilityMode Value="True"/>
<i18n>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -197,6 +197,19 @@ type
property NumFormatList: TStringList read FNumFormatList;
end;
{@@ Helper class for the spreadsheet writer to keep processing of charts
out of the main writer unit. }
TsBasicSpreadChartWriter = class
protected
FWriter: TsBasicSpreadWriter;
public
constructor Create(AWriter: TsBasicSpreadWriter); virtual;
procedure CreateStreams; virtual; abstract;
procedure DestroyStreams; virtual; abstract;
procedure ResetStreams; virtual; abstract;
procedure WriteCharts; virtual; abstract;
property Writer: TsBasicSpreadWriter read FWriter;
end;
type
TsSpreadFileAccess = (faRead, faWrite);
@ -912,6 +925,21 @@ begin
raise Exception.Create(rsUnsupportedWriteFormat);
end;
{------------------------------------------------------------------------------}
{ TsBasicSpreadChartWriter }
{------------------------------------------------------------------------------}
{@@ Constructor of the ChartWriter. It gets the main writer as parameter. }
constructor TsBasicSpreadChartWriter.Create(AWriter: TsBasicSpreadWriter);
begin
FWriter := AWriter;
end;
{------------------------------------------------------------------------------}
{ TsSpreadFormatRegistry }
{------------------------------------------------------------------------------}
type
TsSpreadFormatData = class
private

View File

@ -18,6 +18,9 @@ uses
{$ENDIF}
fpstypes, fpsreaderwriter;
const
XML_HEADER = '<?xml version="1.0" encoding="utf-8" ?>';
type
TsSpreadXMLReader = class(TsCustomSpreadReader)
protected