fpspreadsheet: Fix fpspreadsheetchart broken in rev 3020. For the moment don't use the t1.xls in the fpschart folder - it uses a "shared formula" which does not load with the current biff machinery.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3125 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2014-06-01 23:06:19 +00:00
parent f9663739db
commit 3ec5921b38
3 changed files with 70 additions and 20 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@ -51,13 +51,14 @@
<Filename Value="mainform.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="FPSChartForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="mainform"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="10"/>
<Version Value="11"/>
<Target>
<Filename Value="fpschart"/>
</Target>
@ -67,7 +68,7 @@
</SearchPaths>
<Linking>
<Debugging>
<GenerateDebugInfo Value="True"/>
<DebugInfoType Value="dsStabs"/>
</Debugging>
<Options>
<Win32>

View File

@ -7,7 +7,7 @@ object FPSChartForm: TFPSChartForm
ClientHeight = 382
ClientWidth = 700
OnCreate = FormCreate
LCLVersion = '0.9.31'
LCLVersion = '1.3'
object MyChart: TChart
Left = 352
Height = 240
@ -15,10 +15,12 @@ object FPSChartForm: TFPSChartForm
Width = 336
AxisList = <
item
Minors = <>
Title.LabelFont.Orientation = 900
end
item
Alignment = calBottom
Minors = <>
end>
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
@ -38,8 +40,43 @@ object FPSChartForm: TFPSChartForm
Height = 240
Top = 136
Width = 328
FrozenCols = 0
FrozenRows = 0
ReadFormulas = False
ColCount = 27
ExtendedSelect = False
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goSmoothScroll]
RowCount = 101
TabOrder = 1
ColWidths = (
42
64
64
64
64
64
64
64
64
64
64
64
64
64
64
64
64
64
64
64
64
64
64
64
64
64
64
)
end
object btnCreateGraphic: TButton
Left = 464
@ -62,22 +99,22 @@ object FPSChartForm: TFPSChartForm
end
object editSourceFile: TFileNameEdit
Left = 152
Height = 25
Height = 23
Top = 48
Width = 136
DialogOptions = []
FilterIndex = 0
HideDirectories = False
ButtonWidth = 23
NumGlyphs = 0
NumGlyphs = 1
MaxLength = 0
TabOrder = 3
end
object Label2: TLabel
Left = 14
Height = 18
Height = 15
Top = 51
Width = 136
Width = 106
Caption = 'Source Spreadsheet:'
ParentColor = False
end
@ -92,18 +129,18 @@ object FPSChartForm: TFPSChartForm
end
object editXAxis: TLabeledEdit
Left = 64
Height = 25
Height = 23
Top = 80
Width = 80
EditLabel.AnchorSideLeft.Control = editXAxis
EditLabel.AnchorSideTop.Control = editXAxis
EditLabel.AnchorSideTop.Side = asrCenter
EditLabel.AnchorSideRight.Control = editXAxis
EditLabel.AnchorSideBottom.Control = editXAxis
EditLabel.Left = 18
EditLabel.Height = 18
EditLabel.Top = 83
EditLabel.Width = 43
EditLabel.AnchorSideBottom.Side = asrBottom
EditLabel.Left = 25
EditLabel.Height = 15
EditLabel.Top = 84
EditLabel.Width = 36
EditLabel.Caption = 'X-Axis:'
EditLabel.ParentColor = False
LabelPosition = lpLeft
@ -112,18 +149,18 @@ object FPSChartForm: TFPSChartForm
end
object EditYAxis: TLabeledEdit
Left = 208
Height = 25
Height = 23
Top = 80
Width = 80
EditLabel.AnchorSideLeft.Control = EditYAxis
EditLabel.AnchorSideTop.Control = EditYAxis
EditLabel.AnchorSideTop.Side = asrCenter
EditLabel.AnchorSideRight.Control = EditYAxis
EditLabel.AnchorSideBottom.Control = EditYAxis
EditLabel.Left = 164
EditLabel.Height = 18
EditLabel.Top = 83
EditLabel.Width = 41
EditLabel.AnchorSideBottom.Side = asrBottom
EditLabel.Left = 169
EditLabel.Height = 15
EditLabel.Top = 84
EditLabel.Width = 36
EditLabel.Caption = 'Y-Axis:'
EditLabel.ParentColor = False
LabelPosition = lpLeft

View File

@ -59,6 +59,7 @@ type
destructor Destroy; override;
procedure LoadPropertiesFromStrings(AXInterval, AYInterval, AXTitle, AYTitle, ATitle: string);
public
procedure LoadFromWorksheetGrid(const AValue: TsWorksheetGrid);
published
// property WorksheetGrid: TsWorksheetGrid read FWorksheetGrid write SetWorksheetGrid;
property PointsNumber: Integer read FPointsNumber write SetPointsNumber default 0;
@ -193,6 +194,17 @@ begin
inherited Destroy;
end;
procedure TsWorksheetChartSource.LoadFromWorksheetGrid(const AValue: TsWorksheetGrid);
begin
if AValue = nil then Exit;
FDataWorksheet := AValue.Worksheet;
// AValue.SaveToWorksheet(FDataWorksheet);
InvalidateCaches;
Notify;
end;
procedure TsWorksheetChartSource.LoadPropertiesFromStrings(AXInterval,
AYInterval, AXTitle, AYTitle, ATitle: string);
var