You've already forked lazarus-ccr
fpspreadsheet: Rename test_* projects in folder examples/other to demo_*. Remove dependence on laz_fpspreadsheet package for easier testing, use unit directory for compiled files. Add readme.txt for this folder.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3366 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="test_formula_func"/>
|
||||
<Title Value="demo_formula_func"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
<ResourceType Value="res"/>
|
||||
</General>
|
||||
@ -26,8 +26,13 @@
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="demo_formula_func"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
@ -39,6 +44,9 @@
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
</BuildModes>
|
||||
@ -53,14 +61,14 @@
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="laz_fpspreadsheet"/>
|
||||
<PackageName Value="LazUtils"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="test_formula_func.pas"/>
|
||||
<Filename Value="demo_formula_func.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="test_formula_func"/>
|
||||
<UnitName Value="demo_formula_func"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="financemath.pas"/>
|
||||
@ -71,14 +79,27 @@
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="demo_formula_func"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="0"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
@ -13,9 +13,8 @@
|
||||
Open/LibreOffice and compare).
|
||||
}
|
||||
|
||||
program test_formula_func;
|
||||
program demo_formula_func;
|
||||
|
||||
//{$mode objfpc}{$H+}
|
||||
{$mode delphi}{$H+}
|
||||
|
||||
uses
|
||||
@ -25,7 +24,7 @@ uses
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
Classes, SysUtils,
|
||||
math, laz_fpspreadsheet, fpspreadsheet, xlsbiff8, fpsfunc, financemath;
|
||||
math, fpspreadsheet, xlsbiff8, fpsfunc, financemath;
|
||||
|
||||
|
||||
{------------------------------------------------------------------------------}
|
@ -10,7 +10,7 @@
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="test_recursive_calc"/>
|
||||
<Title Value="demo_recursive_calc"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
<ResourceType Value="res"/>
|
||||
</General>
|
||||
@ -26,8 +26,13 @@
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="demo_recursive_calc"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
@ -39,6 +44,9 @@
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
</BuildModes>
|
||||
@ -52,28 +60,41 @@
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="laz_fpspreadsheet"/>
|
||||
<PackageName Value="LazUtils"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="1">
|
||||
<Unit0>
|
||||
<Filename Value="test_recursive_calc.pas"/>
|
||||
<Filename Value="demo_recursive_calc.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="test_recursive_calc"/>
|
||||
<UnitName Value="demo_recursive_calc"/>
|
||||
</Unit0>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="demo_recursive_calc"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="0"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
@ -4,7 +4,7 @@
|
||||
Therefore calculation has to be done recursively until the independent third
|
||||
cell is found. }
|
||||
|
||||
program test_recursive_calc;
|
||||
program demo_recursive_calc;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
@ -15,7 +15,7 @@ uses
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
Classes,
|
||||
math, laz_fpspreadsheet, fpspreadsheet, fpsfunc;
|
||||
math, fpspreadsheet, fpsfunc, xlsbiff8;
|
||||
|
||||
var
|
||||
workbook: TsWorkbook;
|
@ -10,7 +10,7 @@
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="test_virtualmode"/>
|
||||
<Title Value="demo_virtualmode_write"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
<ResourceType Value="res"/>
|
||||
</General>
|
||||
@ -26,8 +26,13 @@
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="demo_virtualmode_write"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
@ -44,6 +49,9 @@
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
</BuildModes>
|
||||
@ -57,12 +65,12 @@
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="laz_fpspreadsheet"/>
|
||||
<PackageName Value="LazUtils"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="1">
|
||||
<Unit0>
|
||||
<Filename Value="test_virtualmode.lpr"/>
|
||||
<Filename Value="demo_virtualmode_write.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
</Units>
|
||||
@ -70,8 +78,13 @@
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="demo_virtualmode_write"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Optimizations>
|
||||
@ -80,9 +93,12 @@
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<UseHeaptrc Value="True"/>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
@ -1,4 +1,4 @@
|
||||
program test_virtualmode;
|
||||
program demo_virtualmode_write;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
@ -10,7 +10,7 @@ uses
|
||||
{$ENDIF}
|
||||
Classes, SysUtils,
|
||||
lazutf8,
|
||||
variants, laz_fpspreadsheet, fpspreadsheet, xlsbiff2, xlsbiff5, xlsbiff8, xlsxooxml;
|
||||
variants, fpspreadsheet, xlsbiff2, xlsbiff5, xlsbiff8, xlsxooxml;
|
||||
|
||||
type
|
||||
TDataProvider = class
|
@ -27,10 +27,11 @@
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="test_write_formatting"/>
|
||||
<Filename Value="demo_write_formatting"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
@ -43,6 +44,9 @@
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
</BuildModes>
|
||||
@ -58,14 +62,14 @@
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="laz_fpspreadsheet"/>
|
||||
<PackageName Value="LazUtils"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="1">
|
||||
<Unit0>
|
||||
<Filename Value="test_write_formatting.pas"/>
|
||||
<Filename Value="demo_write_formatting.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="test_write_formatting"/>
|
||||
<UnitName Value="demo_write_formatting"/>
|
||||
</Unit0>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
@ -77,6 +81,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
@ -84,5 +89,13 @@
|
||||
<OptimizationLevel Value="0"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
@ -7,13 +7,12 @@ Adds formatting to the file
|
||||
|
||||
AUTHORS: Felipe Monteiro de Carvalho
|
||||
}
|
||||
program test_write_formatting;
|
||||
program demo_write_formatting;
|
||||
|
||||
{$mode delphi}{$H+}
|
||||
|
||||
uses
|
||||
Classes, SysUtils, fpspreadsheet, xlsbiff8, fpsopendocument,
|
||||
laz_fpspreadsheet;
|
||||
Classes, SysUtils, fpspreadsheet, xlsbiff8, fpsopendocument;
|
||||
|
||||
var
|
||||
MyWorkbook: TsWorkbook;
|
||||
@ -161,6 +160,9 @@ end;
|
||||
|
||||
const
|
||||
TestFile='test3.odt';
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
writeln('Starting program.');
|
||||
MyDir := ExtractFilePath(ParamStr(0));
|
@ -9,7 +9,7 @@
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="test_write_formula"/>
|
||||
<Title Value="demo_write_formula"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
</General>
|
||||
@ -25,10 +25,11 @@
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="test_write_formula"/>
|
||||
<Filename Value="demo_write_formula"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="../.."/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
@ -41,6 +42,9 @@
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
</BuildModes>
|
||||
@ -57,12 +61,12 @@
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="laz_fpspreadsheet"/>
|
||||
<PackageName Value="LazUtils"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="1">
|
||||
<Unit0>
|
||||
<Filename Value="test_write_formula.pas"/>
|
||||
<Filename Value="demo_write_formula.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
</Units>
|
||||
@ -70,10 +74,11 @@
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="test_write_formula"/>
|
||||
<Filename Value="demo_write_formula"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="../.."/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
@ -81,6 +86,14 @@
|
||||
<OptimizationLevel Value="0"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
@ -5,14 +5,13 @@ Demonstrates how to write a formula using the fpspreadsheet library
|
||||
|
||||
AUTHORS: Felipe Monteiro de Carvalho
|
||||
}
|
||||
program test_write_formula;
|
||||
program demo_write_formula;
|
||||
|
||||
{$mode delphi}{$H+}
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
fpspreadsheet, xlsbiff5, xlsbiff8, fpsopendocument,
|
||||
laz_fpspreadsheet;
|
||||
fpspreadsheet, xlsbiff5, xlsbiff8, fpsopendocument;
|
||||
|
||||
var
|
||||
MyWorkbook: TsWorkbook;
|
||||
@ -86,6 +85,9 @@ end;
|
||||
|
||||
const
|
||||
TestFile='test_formula.xls';
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
writeln('Starting program.');
|
||||
MyDir := ExtractFilePath(ParamStr(0));
|
17
components/fpspreadsheet/examples/other/readme.txt
Normal file
17
components/fpspreadsheet/examples/other/readme.txt
Normal file
@ -0,0 +1,17 @@
|
||||
This folder contains various demo applications:
|
||||
|
||||
- demo_formula_func: shows how a user-provided function can be registered in
|
||||
fpspreadsheet for usage in rpn formulas. The example covers some financial
|
||||
functions.
|
||||
|
||||
- demo_recursive_calc: demonstrates recursive calculation of formulas. All
|
||||
formulas in this demo depend on the result of the formula in the next cell,
|
||||
except for the last cell. When the formula in the first cell is calculated
|
||||
recursive calculation of the other cells is requested.
|
||||
|
||||
- demo_virtualmode_writing: demonstrates how the virtual mode of the workbook
|
||||
can be used to create huge spreadsheet files.
|
||||
|
||||
- demo_write_formatting: shows some simple cell formatting
|
||||
|
||||
- demo_write_formula: shows some rpn formulas
|
Reference in New Issue
Block a user