fpspreadsheet: Rearrange most of the demos into folders "read_write" and "visual"

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4019 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2015-03-13 00:08:44 +00:00
parent 1ded103b39
commit 380ac8247c
108 changed files with 82 additions and 119 deletions

View File

@ -1,5 +0,0 @@
mkdir oocreated
cp -f oocreated.ods oocreated/
cd oocreated
unzip oocreated.ods
cd ..

View File

@ -1,5 +0,0 @@
mkdir test
cp -f test.ods test/
cd test
unzip test.ods
cd ..

View File

@ -1,3 +0,0 @@
cd test
zip -r test.ods *
cd ..

View File

@ -49,8 +49,8 @@
<Filename Value="csvread"/> <Filename Value="csvread"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
<SyntaxOptions> <SyntaxOptions>

View File

@ -43,7 +43,6 @@
<Unit1> <Unit1>
<Filename Value="..\..\fpscsv.pas"/> <Filename Value="..\..\fpscsv.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="fpscsv"/>
</Unit1> </Unit1>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
@ -54,9 +53,8 @@
<Filename Value="csvwrite"/> <Filename Value="csvwrite"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
<SrcPath Value=".."/>
</SearchPaths> </SearchPaths>
<Linking> <Linking>
<Debugging> <Debugging>

View File

@ -0,0 +1,5 @@
This demo demonstrates how to use fpspreadsheet to read and write comma-separated
files (csv).
Please run the write demo before the read demo so the required spreadsheet file
is generated.

View File

@ -49,8 +49,8 @@
<Filename Value="excel2read"/> <Filename Value="excel2read"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
<SyntaxOptions> <SyntaxOptions>

View File

@ -49,8 +49,8 @@
<Filename Value="excel2write"/> <Filename Value="excel2write"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
<SyntaxOptions> <SyntaxOptions>

View File

@ -108,7 +108,7 @@ begin
MyWorksheet.WriteHorAlignment(5, 1, haCenter); MyWorksheet.WriteHorAlignment(5, 1, haCenter);
MyWorksheet.WriteHorAlignment(5, 2, haRight); MyWorksheet.WriteHorAlignment(5, 2, haRight);
// Red font, italic // Various font settings
MyWorksheet.WriteNumber(6, 0, 2014); MyWorksheet.WriteNumber(6, 0, 2014);
MyWorksheet.WriteFont(6, 0, 'Calibri', 15, [fssItalic], scRed); MyWorksheet.WriteFont(6, 0, 'Calibri', 15, [fssItalic], scRed);
MyWorksheet.WriteNumber(6, 1, 2015); MyWorksheet.WriteNumber(6, 1, 2015);

View File

@ -49,8 +49,8 @@
<Filename Value="excel5read"/> <Filename Value="excel5read"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
<SyntaxOptions> <SyntaxOptions>

View File

@ -49,8 +49,8 @@
<Filename Value="excel5write"/> <Filename Value="excel5write"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
<SyntaxOptions> <SyntaxOptions>

View File

@ -49,8 +49,8 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
<SyntaxOptions> <SyntaxOptions>

View File

@ -43,7 +43,6 @@
<Unit1> <Unit1>
<Filename Value="..\..\fpstypes.pas"/> <Filename Value="..\..\fpstypes.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="fpsTypes"/>
</Unit1> </Unit1>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
@ -54,8 +53,8 @@
<Filename Value="excel8write"/> <Filename Value="excel8write"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Linking> <Linking>
<Debugging> <Debugging>

View File

@ -49,8 +49,8 @@
<Filename Value="ooxmlread"/> <Filename Value="ooxmlread"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
<SyntaxOptions> <SyntaxOptions>

View File

@ -54,8 +54,5 @@ begin
// Finalization // Finalization
MyWorkbook.Free; MyWorkbook.Free;
WriteLn('Finished. Press [ENTER] to close...');
ReadLn;
end. end.

View File

@ -49,8 +49,8 @@
<Filename Value="ooxmlwrite"/> <Filename Value="ooxmlwrite"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
<SyntaxOptions> <SyntaxOptions>

View File

@ -49,7 +49,7 @@
<Filename Value="opendocread"/> <Filename Value="opendocread"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>

View File

@ -49,8 +49,8 @@
<Filename Value="opendocwrite"/> <Filename Value="opendocwrite"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
<SyntaxOptions> <SyntaxOptions>

View File

@ -49,8 +49,8 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
<SyntaxOptions> <SyntaxOptions>

View File

@ -49,8 +49,8 @@
<Filename Value="wikitablewrite"/> <Filename Value="wikitablewrite"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
<SyntaxOptions> <SyntaxOptions>

View File

@ -1,21 +0,0 @@
program spready;
{$mode objfpc}{$H+}
uses
Interfaces, // this includes the LCL widgetset
Forms, mainform, laz_fpspreadsheet_visual, sCSVParamsForm, sCtrls,
sFormatSettingsForm, sSortParamsForm, sfCurrencyForm, fpsCurrency;
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TMainFrm, MainFrm);
MainFrm.BeforeRun;
Application.CreateForm(TFormatSettingsForm, FormatSettingsForm);
Application.CreateForm(TSortParamsForm, SortParamsForm);
Application.CreateForm(TCurrencyForm, CurrencyForm);
Application.Run;
end.

View File

@ -0,0 +1,2 @@
The fpschart demo shows usage of the TsWorksheetChartSource component for
creating charts from spreadsheet data.

View File

@ -85,7 +85,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<CodeGeneration> <CodeGeneration>
<SmartLinkUnit Value="True"/> <SmartLinkUnit Value="True"/>

View File

@ -66,7 +66,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="../../lib/$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="../../../lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Linking> <Linking>
<Options> <Options>

View File

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

View File

@ -81,15 +81,12 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<CodeGeneration> <CodeGeneration>
<SmartLinkUnit Value="True"/> <SmartLinkUnit Value="True"/>
</CodeGeneration> </CodeGeneration>
<Linking> <Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
<Options> <Options>
<Win32> <Win32>
<GraphicApplication Value="True"/> <GraphicApplication Value="True"/>

View File

@ -56,8 +56,8 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Linking> <Linking>
<Options> <Options>

View File

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

View File

@ -60,7 +60,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
<SyntaxOptions> <SyntaxOptions>

View File

@ -1,7 +1,7 @@
object Form1: TForm1 object Form1: TForm1
Left = 344 Left = 375
Height = 649 Height = 649
Top = 127 Top = 185
Width = 894 Width = 894
Caption = 'fpsGrid' Caption = 'fpsGrid'
ClientHeight = 649 ClientHeight = 649

View File

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

View File

@ -83,8 +83,8 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="..\.."/> <OtherUnitFiles Value="..\..\.."/>
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<CodeGeneration> <CodeGeneration>
<SmartLinkUnit Value="True"/> <SmartLinkUnit Value="True"/>

View File

@ -1250,10 +1250,6 @@ begin
if (ACell=nil) or (Length(ACell^.FormulaValue)=0) if (ACell=nil) or (Length(ACell^.FormulaValue)=0)
then Strings.Add('FormulaValue=') then Strings.Add('FormulaValue=')
else Strings.Add(Format('FormulaValue="%s"', [ACell^.FormulaValue])); else Strings.Add(Format('FormulaValue="%s"', [ACell^.FormulaValue]));
if (ACell=nil) or (ACell^.SharedFormulaBase=nil)
then Strings.Add('SharedFormulaBase=')
else Strings.Add(Format('SharedFormulaBase=%s', [GetCellString(
ACell^.SharedFormulaBase^.Row, ACell^.SharedFormulaBase^.Col)]));
end end
else else
if InspectorPageControl.ActivePage = PgSheet then if InspectorPageControl.ActivePage = PgSheet then
@ -1349,7 +1345,7 @@ begin
begin begin
r := GetWorksheetRow(Row); r := GetWorksheetRow(Row);
c := GetWorksheetCol(Col); c := GetWorksheetCol(Col);
cell := Worksheet.FindCell(row, col); cell := Worksheet.FindCell(r, c);
hasCmnt := Worksheet.HasComment(cell); hasCmnt := Worksheet.HasComment(cell);
end; end;
AcCommentAdd.Enabled := not hasCmnt; AcCommentAdd.Enabled := not hasCmnt;

View File

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Some files were not shown because too many files have changed in this diff Show More