You've already forked lazarus-ccr
fpspreadsheet: Fix compilation issues when fpc version is changed: separate package units into different folders, incorporate code of fpsnumformatparser in unit fpsnumformat and code of fpsregfileformats in units fpsreaderwriter. Check and fix all demos.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5282 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -13,9 +13,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -57,7 +54,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<OtherUnitFiles Value="..\..\source\common;..\..\source\export"/>
|
||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -17,9 +17,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -56,7 +53,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<OtherUnitFiles Value="..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
</CompilerOptions>
|
||||
|
@ -17,9 +17,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -41,12 +38,10 @@
|
||||
<Unit0>
|
||||
<Filename Value="demo_formula_func.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="demo_formula_func"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="financemath.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="financemath"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
@ -58,7 +53,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<OtherUnitFiles Value="..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -17,9 +17,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -51,7 +48,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<OtherUnitFiles Value="..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -17,9 +17,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -36,15 +33,11 @@
|
||||
<PackageName Value="LazUtils"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Units Count="1">
|
||||
<Unit0>
|
||||
<Filename Value="demo_sorting.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="..\..\fpsexprparser.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
@ -55,7 +48,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<OtherUnitFiles Value="..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
</CompilerOptions>
|
||||
|
@ -17,9 +17,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -51,7 +48,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<OtherUnitFiles Value="..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -17,9 +17,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -51,7 +48,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<OtherUnitFiles Value="..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -17,9 +17,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -51,7 +48,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<OtherUnitFiles Value="..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
</CompilerOptions>
|
||||
|
@ -17,9 +17,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -42,7 +39,6 @@
|
||||
<Unit0>
|
||||
<Filename Value="demo_write_formatting.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="demo_write_formatting"/>
|
||||
</Unit0>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
@ -54,7 +50,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<OtherUnitFiles Value="..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -16,9 +16,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="2">
|
||||
<Item1 Name="Debug" Default="True"/>
|
||||
<Item2 Name="Release">
|
||||
@ -65,7 +62,6 @@
|
||||
<Unit0>
|
||||
<Filename Value="demo_write_formula.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="demo_write_formula"/>
|
||||
</Unit0>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
@ -76,7 +72,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="../.."/>
|
||||
<OtherUnitFiles Value="../../source/common"/>
|
||||
<UnitOutputDirectory Value="../lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="demo_write_headerfooter_images"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="demo_write_headerfooter_images"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<OtherUnitFiles Value="..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="demo_write_images"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="demo_write_images"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\.."/>
|
||||
<OtherUnitFiles Value="..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="csvread"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="csvread"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="csvwrite"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -53,7 +50,7 @@
|
||||
<Filename Value="csvwrite"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
|
@ -50,7 +50,7 @@ begin
|
||||
|
||||
// Write some string cells
|
||||
MyWorksheet.WriteText(1, 0, 'First');
|
||||
MyWorksheet.WriteFont (1, 0, 'Arial', 12, [fssBold, fssItalic, fssUnderline], scRed);
|
||||
MyWorksheet.WriteFont(1, 0, 'Arial', 12, [fssBold, fssItalic, fssUnderline], scRed);
|
||||
MyWorksheet.WriteText(1, 1, 'Second');
|
||||
MyWorksheet.WriteText(1, 2, 'Third');
|
||||
MyWorksheet.WriteText(1, 3, 'Fourth');
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="excel2read"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="excel2read"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="excel2write"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="excel2write"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="excel5read"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="excel5read"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="excel5write"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="excel5write"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -11,9 +11,6 @@
|
||||
<MainUnit Value="0"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="excel8write"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -53,7 +50,7 @@
|
||||
<Filename Value="excel8write"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="excelxmlwrite"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="excelxmlwrite"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="htmlread"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="htmlread"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="htmlread_http"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="htmlread_http"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="htmlwrite"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="htmlwrite"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="ooxmlread"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="ooxmlread"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="ooxmlwrite"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="ooxmlwrite"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="opendocread"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="opendocread"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="opendocwrite"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="opendocwrite"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -11,9 +11,6 @@
|
||||
<MainUnit Value="0"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -12,9 +12,6 @@
|
||||
<Title Value="wikitablewrite"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -49,7 +46,7 @@
|
||||
<Filename Value="wikitablewrite"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
@ -22,7 +22,6 @@
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\shared"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
@ -57,7 +56,7 @@
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="9">
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="demo_ctrls.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -69,59 +68,6 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="..\shared\scsvparamsform.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="CSVParamsForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="sCSVParamsForm"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="..\shared\sformatsettingsform.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="FormatSettingsForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="sFormatsettingsForm"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="..\shared\ssortparamsform.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<HasResources Value="True"/>
|
||||
<UnitName Value="sSortParamsForm"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="..\shared\scurrencyform.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="CurrencyForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="..\shared\shyperlinkform.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="HyperlinkForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="sHyperlinkForm"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="..\shared\snumformatform.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="NumFormatForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="sNumFormatForm"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="..\shared\ssearchform.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="SearchForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="sSearchForm"/>
|
||||
</Unit8>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
@ -132,7 +78,6 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\shared"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
|
@ -7,7 +7,7 @@ uses
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, main, sHyperlinkForm, sNumFormatForm, sSearchForm;
|
||||
Forms, main;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
|
@ -14,9 +14,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -55,7 +52,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common;..\..\..\source\visual"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
|
@ -48,7 +48,7 @@ implementation
|
||||
|
||||
uses
|
||||
fpcanvas, lazutf8,
|
||||
fpstypes, fpsutils, fpsRegFileFormats, fpspreadsheet;
|
||||
fpstypes, fpsutils, fpsReaderWriter, fpspreadsheet;
|
||||
|
||||
|
||||
{ TForm1 }
|
||||
|
@ -14,9 +14,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="2">
|
||||
<Item1 Name="Debug" Default="True"/>
|
||||
<Item2 Name="Release">
|
||||
@ -78,7 +75,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common;..\..\..\source\visual"/>
|
||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
|
@ -53,7 +53,7 @@ implementation
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
fpsUtils, fpsRegFileFormats;
|
||||
fpsUtils, fpsReaderWriter;
|
||||
|
||||
|
||||
{ TForm1 }
|
||||
|
@ -12,7 +12,6 @@
|
||||
<VersionInfo>
|
||||
<Language Value=""/>
|
||||
<CharSet Value=""/>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="3">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
@ -126,7 +125,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
<OtherUnitFiles Value="..\..\..\source\common;..\..\..\source\visual"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -218,7 +218,7 @@ implementation
|
||||
uses
|
||||
TypInfo, LazUtf8, LCLIntf, LCLType, LCLVersion, clipbrd, fpcanvas,
|
||||
SynHighlighterWikiTable,
|
||||
fpsutils, fpsRegFileFormats;
|
||||
fpsutils, fpsReaderWriter;
|
||||
|
||||
const
|
||||
DROPDOWN_COUNT = 24;
|
||||
|
@ -48,7 +48,7 @@ implementation
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
fpsRegFileFormats;
|
||||
fpsReaderWriter;
|
||||
|
||||
const
|
||||
MOUSEWHEEL_FACTOR = 1.05;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,572 +0,0 @@
|
||||
{@@ ----------------------------------------------------------------------------
|
||||
Unit fpsRegFileFormats implements registration of the file formats supported
|
||||
by fpspreadsheet.
|
||||
|
||||
AUTHORS: Felipe Monteiro de Carvalho, Reinier Olislagers, Werner Pamler
|
||||
|
||||
LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus
|
||||
distribution, for details about the license.
|
||||
|
||||
USAGE: Each unit implementing a new spreadsheet format must register the
|
||||
reader/writer and some specific data by calling "RegisterSpreadFormat".
|
||||
-------------------------------------------------------------------------------}
|
||||
unit fpsRegFileFormats;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, fpstypes, fpsReaderWriter; //fpspreadsheet;
|
||||
|
||||
type
|
||||
TsSpreadFileAccess = (faRead, faWrite);
|
||||
|
||||
function RegisterSpreadFormat(
|
||||
AFormat: TsSpreadsheetFormat;
|
||||
AReaderClass: TsSpreadReaderClass;
|
||||
AWriterClass: TsSpreadWriterClass;
|
||||
AFormatName, ATechnicalName: String;
|
||||
const AFileExtensions: array of String): TsSpreadFormatID;
|
||||
|
||||
function GetFileFormatFilter(AListSeparator, AExtSeparator: Char;
|
||||
AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
|
||||
AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
|
||||
|
||||
function GetSpreadFormats(AFileAccess: TsSpreadFileAccess;
|
||||
const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
|
||||
function GetSpreadFormatsFromFileName(AFileAccess: TsSpreadFileAccess; AFileName: TFileName;
|
||||
APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
|
||||
|
||||
function GetSpreadFormatExt(AFormatID: TsSpreadFormatID): String;
|
||||
function GetSpreadFormatName(AFormatID: TsSpreadFormatID): String;
|
||||
function GetSpreadTechnicalName(AFormatID: TsSpreadFormatID): String;
|
||||
|
||||
function GetSpreadReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
|
||||
function GetSpreadWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
fpsStrings;
|
||||
|
||||
type
|
||||
TsSpreadFormatData = class
|
||||
private
|
||||
FFormatID: TsSpreadFormatID; // Format identifier
|
||||
FName: String; // Text to be used in FileDialog filter
|
||||
FTechnicalName: String; // Text to be used e.g. in Titlebar
|
||||
FFileExtensions: array of String; // File extensions used by this format
|
||||
FReaderClass: TsSpreadReaderClass; // Class for reading these files
|
||||
FWriterClass: TsSpreadWriterClass; // Class for writing these files
|
||||
function GetFileExtension(AIndex: Integer): String;
|
||||
function GetFileExtensionCount: Integer;
|
||||
public
|
||||
constructor Create(AFormatID: TsSpreadFormatID; AReaderClass: TsSpreadReaderClass;
|
||||
AWriterClass: TsSpreadWriterClass; AFormatName, ATechnicalName: String;
|
||||
const AExtensions: Array of String);
|
||||
// ACanReadFromClipboard, ACanWriteToClipboard: Boolean);
|
||||
function GetFileFilterMask(ASeparator: Char): String;
|
||||
|
||||
// property CanReadFromClipboard: boolean read FCanReadClipboard;
|
||||
// property CanWriteToClipboard: boolean read FCanWriteClipboard;
|
||||
property FormatID: TsSpreadFormatID read FFormatID;
|
||||
property FormatName: String read FName;
|
||||
property FileExtension[AIndex: Integer]: String read GetFileExtension;
|
||||
property FileExtensionCount: Integer read GetFileExtensionCount;
|
||||
property ReaderClass: TsSpreadReaderClass read FReaderClass;
|
||||
property TechnicalName: String read FTechnicalName;
|
||||
property WriterClass: TsSpreadWriterClass read FWriterClass;
|
||||
end;
|
||||
|
||||
{ TsSpreadFormatRegistry }
|
||||
|
||||
TsSpreadFormatRegistry = class
|
||||
private
|
||||
FList: TFPList;
|
||||
FCachedData: TsSpreadFormatData;
|
||||
FCachedFormatID: TsSpreadFormatID;
|
||||
function GetDefaultExt(AFormatID: TsSpreadFormatID): String;
|
||||
function GetFormatName(AFormatID: TsSpreadFormatID): String;
|
||||
function GetReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
|
||||
function GetTechnicalName(AFormatID: TsSpreadFormatID): String;
|
||||
function GetWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
|
||||
protected
|
||||
function Add(AData: TsSpreadFormatData): Integer;
|
||||
function FindFormatID(AFormatID: TsSpreadFormatID): TsSpreadFormatData;
|
||||
function IndexOf(AFormatID: TsSpreadFormatID): Integer;
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
function GetAllSpreadFilesMask(AExtSeparator: Char;
|
||||
AFileAccess: TsSpreadFileAccess): String;
|
||||
function GetAllExcelFilesMask(AExtSeparator: Char): String;
|
||||
function GetFileFilter(AListSeparator, AExtSeparator: Char;
|
||||
AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
|
||||
AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
|
||||
function GetFormatArray(AFileAccess: TsSpreadFileAccess;
|
||||
const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
|
||||
function GetFormatArrayFromFileName(AFileAccess: TsSpreadFileAccess;
|
||||
const AFileName: String; APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
|
||||
|
||||
property DefaultExt[AFormatID: TsSpreadFormatID]: String read GetDefaultExt;
|
||||
property FormatName[AFormatID: TsSpreadFormatID]: String read GetFormatName;
|
||||
property ReaderClass[AFormatID: TsSpreadFormatID]: TsSpreadReaderClass read GetReaderClass;
|
||||
property TechnicalName[AFormatID: TsSpreadFormatID]: String read GetTechnicalName;
|
||||
property WriterClass[AFormatID: TsSpreadFormatID]: TsSpreadWriterClass read GetWriterClass;
|
||||
end;
|
||||
|
||||
var
|
||||
SpreadFormatRegistry: TsSpreadFormatRegistry;
|
||||
|
||||
{==============================================================================}
|
||||
{ TsSpreadFormatData }
|
||||
{==============================================================================}
|
||||
|
||||
constructor TsSpreadFormatData.Create(AFormatID: TsSpreadFormatID;
|
||||
AReaderClass: TsSpreadReaderClass; AWriterClass: TsSpreadWriterClass;
|
||||
AFormatName, ATechnicalName: String; const AExtensions: array of String);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
FFormatID := AFormatID;
|
||||
FReaderClass := AReaderClass;
|
||||
FWriterClass := AWriterClass;
|
||||
FName := AFormatName;
|
||||
FTechnicalName := ATechnicalName;
|
||||
SetLength(FFileExtensions, Length(AExtensions));
|
||||
for i:=0 to High(FFileExtensions) do FFileExtensions[i] := AExtensions[i];
|
||||
end;
|
||||
|
||||
function TsSpreadFormatData.GetFileExtension(AIndex: Integer): String;
|
||||
begin
|
||||
Result := FFileExtensions[AIndex];
|
||||
end;
|
||||
|
||||
function TsSpreadFormatData.GetFileExtensionCount: Integer;
|
||||
begin
|
||||
Result := Length(FFileExtensions);
|
||||
end;
|
||||
|
||||
function TsSpreadFormatData.GetFileFilterMask(ASeparator: Char): String;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
Result := '*' + FFileExtensions[0];
|
||||
for i:= 1 to High(FFileExtensions) do
|
||||
Result := Result + ASeparator + '*' + FFileExtensions[i];
|
||||
end;
|
||||
|
||||
|
||||
{==============================================================================}
|
||||
{ TsSpreadFormatRegistry }
|
||||
{==============================================================================}
|
||||
|
||||
constructor TsSpreadFormatRegistry.Create;
|
||||
begin
|
||||
inherited;
|
||||
FList := TFPList.Create;
|
||||
FCachedFormatID := sfidUnknown;
|
||||
FCachedData := nil;
|
||||
end;
|
||||
|
||||
destructor TsSpreadFormatRegistry.Destroy;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
for i := FList.Count-1 downto 0 do TObject(FList[i]).Free;
|
||||
FList.Free;
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.Add(AData: TsSpreadFormatData): Integer;
|
||||
begin
|
||||
Result := FList.Add(AData);
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.FindFormatID(AFormatID: TsSpreadFormatID): TsSpreadFormatData;
|
||||
var
|
||||
idx: Integer;
|
||||
begin
|
||||
if AFormatID <> FCachedFormatID then
|
||||
begin
|
||||
idx := IndexOf(AFormatID);
|
||||
if idx = -1 then
|
||||
begin
|
||||
FCachedData := nil;
|
||||
FCachedFormatID := sfidUnknown;
|
||||
end else
|
||||
begin
|
||||
FCachedData := TsSpreadFormatData(FList[idx]);
|
||||
FCachedFormatID := AFormatID;
|
||||
end;
|
||||
end;
|
||||
Result := FCachedData;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetDefaultExt(AFormatID: TsSpreadFormatID): String;
|
||||
var
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
data := FindFormatID(AFormatID);
|
||||
if data <> nil then
|
||||
Result := data.FileExtension[0] else
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetAllSpreadFilesMask(AExtSeparator: Char;
|
||||
AFileAccess: TsSpreadFileAccess): String;
|
||||
var
|
||||
L: TStrings;
|
||||
data: TsSpreadFormatData;
|
||||
ext: String;
|
||||
i, j: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
L := TStringList.Create;
|
||||
try
|
||||
for i:=0 to FList.Count-1 do
|
||||
begin
|
||||
data := TsSpreadFormatData(FList[i]);
|
||||
case AFileAccess of
|
||||
faRead : if data.ReaderClass = nil then continue;
|
||||
faWrite : if data.WriterClass = nil then continue;
|
||||
end;
|
||||
for j:=0 to data.FileExtensionCount-1 do
|
||||
begin
|
||||
ext := data.FileExtension[j];
|
||||
if L.IndexOf(ext) = -1 then
|
||||
L.Add(ext);
|
||||
end;
|
||||
end;
|
||||
if L.Count > 0 then
|
||||
begin
|
||||
Result := '*' + L[0];
|
||||
for i := 1 to L.Count-1 do
|
||||
Result := Result + AExtSeparator + '*' + L[i];
|
||||
end;
|
||||
finally
|
||||
L.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetAllExcelFilesMask(AExtSeparator: Char): String;
|
||||
var
|
||||
j: Integer;
|
||||
L: TStrings;
|
||||
data: TsSpreadFormatData;
|
||||
ext: String;
|
||||
begin
|
||||
L := TStringList.Create;
|
||||
try
|
||||
// good old BIFF...
|
||||
if (IndexOf(ord(sfExcel8)) <> -1) or
|
||||
(IndexOf(ord(sfExcel5)) <> -1) or
|
||||
(IndexOf(ord(sfExcel2)) <> -1) then L.Add('*.xls');
|
||||
|
||||
// Excel 2007+
|
||||
j := IndexOf(ord(sfOOXML));
|
||||
if j <> -1 then
|
||||
begin
|
||||
data := TsSpreadFormatData(FList[j]);
|
||||
for j:=0 to data.FileExtensionCount-1 do
|
||||
begin
|
||||
ext := data.FileExtension[j];
|
||||
if L.IndexOf(ext) = -1 then
|
||||
L.Add('*' + ext);
|
||||
end;
|
||||
end;
|
||||
|
||||
L.Delimiter := AExtSeparator;
|
||||
L.StrictDelimiter := true;
|
||||
Result := L.DelimitedText;
|
||||
finally
|
||||
L.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetFileFilter(AListSeparator, AExtSeparator: Char;
|
||||
AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
|
||||
AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
|
||||
var
|
||||
i, idx: Integer;
|
||||
L: TStrings;
|
||||
s: String;
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
// Bring the formats listed in APriorityFormats to the top
|
||||
if Length(APriorityFormats) > 0 then
|
||||
for i := High(APriorityFormats) downto Low(APriorityFormats) do
|
||||
begin
|
||||
idx := IndexOf(APriorityFormats[i]);
|
||||
data := TsSpreadFormatData(FList[idx]);
|
||||
FList.Delete(idx);
|
||||
FList.Insert(0, data);
|
||||
end;
|
||||
|
||||
L := TStringList.Create;
|
||||
try
|
||||
L.Delimiter := AListSeparator;
|
||||
L.StrictDelimiter := true;
|
||||
if AllSpreadFormats then
|
||||
begin
|
||||
s := GetAllSpreadFilesMask(AExtSeparator, AFileAccess);
|
||||
if s <> '' then
|
||||
begin
|
||||
L.Add(rsAllSpreadsheetFiles);
|
||||
L.Add(GetAllSpreadFilesMask(AExtSeparator, AFileAccess));
|
||||
end;
|
||||
end;
|
||||
if AllExcelFormats then
|
||||
begin
|
||||
s := GetAllExcelFilesMask(AExtSeparator);
|
||||
if s <> '' then
|
||||
begin
|
||||
L.Add(Format('%s (%s)', [rsAllExcelFiles, s]));
|
||||
L.Add(s);
|
||||
end;
|
||||
end;
|
||||
for i:=0 to FList.Count-1 do
|
||||
begin
|
||||
data := TsSpreadFormatData(FList[i]);
|
||||
case AFileAccess of
|
||||
faRead : if data.ReaderClass = nil then Continue;
|
||||
faWrite : if data.WriterClass = nil then Continue;
|
||||
end;
|
||||
s := data.GetFileFilterMask(AExtSeparator);
|
||||
L.Add(Format('%s %s (%s)', [data.FormatName, rsFiles, s]));
|
||||
L.Add(s);
|
||||
end;
|
||||
Result := L.DelimitedText;
|
||||
finally
|
||||
L.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetFormatArray(AFileAccess: TsSpreadFileAccess;
|
||||
const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
|
||||
var
|
||||
i, n, idx: Integer;
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
// Rearrange the formats such the one noted in APriorityFormats are at the top
|
||||
if Length(APriorityFormats) > 0 then
|
||||
for i := High(APriorityFormats) downto Low(APriorityFormats) do
|
||||
begin
|
||||
idx := IndexOf(APriorityFormats[i]);
|
||||
data := TsSpreadFormatData(FList[idx]);
|
||||
FList.Delete(idx);
|
||||
FList.Insert(0, data);
|
||||
end;
|
||||
|
||||
SetLength(Result, FList.Count);
|
||||
n := 0;
|
||||
for i := 0 to FList.Count-1 do
|
||||
begin
|
||||
data := TsSpreadFormatData(FList[i]);
|
||||
case AFileAccess of
|
||||
faRead : if data.ReaderClass = nil then Continue;
|
||||
faWrite : if data.WriterClass = nil then Continue;
|
||||
end;
|
||||
Result[n] := data.FormatID;
|
||||
inc(n);
|
||||
end;
|
||||
SetLength(Result, n);
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetFormatArrayFromFileName(
|
||||
AFileAccess: TsSpreadFileAccess; const AFileName: String;
|
||||
APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
|
||||
var
|
||||
idx: Integer;
|
||||
i, j, n: Integer;
|
||||
ext: String;
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
ext := Lowercase(ExtractFileExt(AFileName));
|
||||
|
||||
if APriorityFormat <> sfidUnknown then
|
||||
begin
|
||||
// Bring the priority format to the top
|
||||
idx := IndexOf(APriorityFormat);
|
||||
FList.Exchange(0, idx);
|
||||
end;
|
||||
|
||||
SetLength(Result, FList.Count);
|
||||
n := 0;
|
||||
for i := 0 to FList.Count - 1 do
|
||||
begin
|
||||
data := TsSpreadFormatData(FList[i]);
|
||||
case AFileAccess of
|
||||
faRead : if data.ReaderClass = nil then Continue;
|
||||
faWrite : if data.WriterClass = nil then Continue;
|
||||
end;
|
||||
for j:=0 to data.FileExtensionCount-1 do
|
||||
if Lowercase(data.FileExtension[j]) = ext then
|
||||
begin
|
||||
Result[n] := data.FormatID;
|
||||
inc(n);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
SetLength(Result, n);
|
||||
|
||||
if APriorityFormat <> sfidUnknown then
|
||||
// Restore original order
|
||||
FList.Exchange(idx, 0);
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetFormatName(AFormatID: TsSpreadFormatID): String;
|
||||
var
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
data := FindFormatID(AFormatID);
|
||||
if data <> nil then
|
||||
Result := data.FormatName else
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
|
||||
var
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
data := FindFormatID(AFormatID);
|
||||
if data <> nil then
|
||||
Result := data.ReaderClass else
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetTechnicalName(AFormatID: TsSpreadFormatID): String;
|
||||
var
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
data := FindFormatID(AFormatID);
|
||||
if data <> nil then
|
||||
Result := data.TechnicalName else
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
|
||||
var
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
data := FindFormatID(AFormatID);
|
||||
if data <> nil then
|
||||
Result := data.WriterClass else
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.IndexOf(AFormatID: TsSpreadFormatID): Integer;
|
||||
begin
|
||||
for Result := 0 to FList.Count - 1 do
|
||||
if TsSpreadFormatData(FList[Result]).FormatID = AFormatID then
|
||||
exit;
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
|
||||
{==============================================================================}
|
||||
{ Public utility functions }
|
||||
{==============================================================================}
|
||||
|
||||
{@@ ----------------------------------------------------------------------------
|
||||
Registers a new reader/writer pair for a given spreadsheet file format
|
||||
|
||||
AFormat identifies the file format, see sfXXXX declarations in built-in
|
||||
fpstypes.
|
||||
|
||||
The system is open to user-defined formats. In this case, AFormat must have
|
||||
the value "sfUser". The format identifier is calculated as a negative number,
|
||||
stored in the TsSpreadFormatData class and returned as function result.
|
||||
This value is needed when calling fpspreadsheet's ReadFromXXXX and WriteToXXXX
|
||||
methods to specify the file format.
|
||||
-------------------------------------------------------------------------------}
|
||||
function RegisterSpreadFormat(AFormat: TsSpreadsheetFormat;
|
||||
AReaderClass: TsSpreadReaderClass; AWriterClass: TsSpreadWriterClass;
|
||||
AFormatName, ATechnicalName: String; const AFileExtensions: array of String): TsSpreadFormatID;
|
||||
var
|
||||
fmt: TsSpreadFormatData;
|
||||
n: Integer;
|
||||
begin
|
||||
if AFormat <> sfUser then begin
|
||||
n := SpreadFormatRegistry.IndexOf(ord(AFormat));
|
||||
if n >= 0 then
|
||||
raise Exception.Create('[RegisterSpreadFormat] Spreadsheet format is already registered.');
|
||||
end;
|
||||
|
||||
if Length(AFileExtensions) = 0 then
|
||||
raise Exception.Create('[RegisterSpreadFormat] File extensions needed for registering a file format.');
|
||||
|
||||
if (AFormatName = '') or (ATechnicalName = '') then
|
||||
raise Exception.Create('[RegisterSpreadFormat] File format name is not specified.');
|
||||
|
||||
fmt := TsSpreadFormatData.Create(ord(AFormat), AReaderClass, AWriterClass,
|
||||
AFormatName, ATechnicalName, AFileExtensions);
|
||||
n := SpreadFormatRegistry.Add(fmt);
|
||||
if (AFormat = sfUser) then
|
||||
begin
|
||||
if (n <= ord(sfUser)) then n := n + ord(sfUser) + 1;
|
||||
fmt.FFormatID := -n;
|
||||
end;
|
||||
Result := fmt.FormatID;
|
||||
end;
|
||||
|
||||
function GetFileFormatFilter(AListSeparator, AExtSeparator: Char;
|
||||
AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
|
||||
AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.GetFileFilter(AListSeparator, AExtSeparator,
|
||||
AFileAccess, APriorityFormats, AllSpreadFormats, AllExcelFormats);
|
||||
end;
|
||||
|
||||
function GetSpreadFormats(AFileAccess: TsSpreadFileAccess;
|
||||
const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.GetFormatArray(AFileAccess, APriorityFormats);
|
||||
end;
|
||||
|
||||
function GetSpreadFormatsFromFileName(
|
||||
AFileAccess: TsSpreadFileAccess; AFileName: TFileName;
|
||||
APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.GetFormatArrayFromFileName(
|
||||
AFileAccess, AFileName, APriorityFormat);
|
||||
end;
|
||||
|
||||
function GetSpreadFormatExt(AFormatID: TsSpreadFormatID): String;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.DefaultExt[AFormatID];
|
||||
end;
|
||||
|
||||
function GetSpreadFormatName(AFormatID: TsSpreadFormatID): String;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.FormatName[AFormatID];
|
||||
end;
|
||||
|
||||
function GetSpreadTechnicalName(AFormatID: TsSpreadFormatID): String;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.TechnicalName[AFormatID];
|
||||
end;
|
||||
|
||||
function GetSpreadReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.ReaderClass[AFormatID];
|
||||
end;
|
||||
|
||||
function GetSpreadWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.WriterClass[AFormatID];
|
||||
end;
|
||||
|
||||
|
||||
initialization
|
||||
SpreadFormatRegistry := TsSpreadFormatRegistry.Create;
|
||||
|
||||
finalization
|
||||
SpreadFormatRegistry.Free;
|
||||
|
||||
end.
|
||||
|
@ -1,22 +0,0 @@
|
||||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit laz_fpspreadsheet;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
fpolestorage, fpsallformats, xlscommon, fpsStreams, fpspreadsheet,
|
||||
fpsxmlcommon, xlsbiff2, xlsbiff5, xlsbiff8, xlsxooxml, fpsopendocument,
|
||||
fpsutils, fpszipper, uvirtuallayer_types, uvirtuallayer, uvirtuallayer_ole,
|
||||
uvirtuallayer_ole_helpers, uvirtuallayer_ole_types, uvirtuallayer_stream,
|
||||
fpolebasic, wikitable, fpsNumFormatParser, fpsfunc, fpsRPN, fpsStrings,
|
||||
fpscsv, fpsCsvDocument, fpspatches, fpsTypes, xlsEscher, fpsReaderWriter,
|
||||
fpsNumFormat, fpsclasses, fpsHeaderFooterParser, fpsPalette, fpsHTML,
|
||||
fpsHTMLUtils, fpsCell, fpsSearch, xlsxml, xlsconst, fpsCurrency,
|
||||
fpsRegFileFormats, fpsImages;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
@ -1,25 +0,0 @@
|
||||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit laz_fpspreadsheet_visual;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
fpspreadsheetctrls, fpspreadsheetgrid, fpspreadsheetchart, fpsActions,
|
||||
fpsvisualutils, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterUnit('fpspreadsheetctrls', @fpspreadsheetctrls.Register);
|
||||
RegisterUnit('fpspreadsheetgrid', @fpspreadsheetgrid.Register);
|
||||
RegisterUnit('fpspreadsheetchart', @fpspreadsheetchart.Register);
|
||||
RegisterUnit('fpsActions', @fpsActions.Register);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPackage('laz_fpspreadsheet_visual', @Register);
|
||||
end.
|
@ -1,22 +0,0 @@
|
||||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit laz_fpspreadsheetexport_visual;
|
||||
|
||||
{$warn 5023 off : no warning about unused units}
|
||||
interface
|
||||
|
||||
uses
|
||||
fpsexport, fpsexportreg, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterUnit('fpsexportreg', @fpsexportreg.Register);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPackage('laz_fpspreadsheetexport_visual', @Register);
|
||||
end.
|
@ -1,42 +0,0 @@
|
||||
fpspreadsheet
|
||||
=============
|
||||
The fpSpreadsheet library offers a convenient way to generate and read
|
||||
spreadsheet documents in various formats:
|
||||
- Excel 2.x .xls
|
||||
- Excel 5.0/Excel 95 .xls
|
||||
- Excel 8.0 (Excel 97-XP) .xls
|
||||
- Microsoft OOXML .xlsx
|
||||
- LibreOffice/OpenOffice OpenDocument .ods
|
||||
- wikimedia wikitable formats
|
||||
|
||||
The library is written in a very flexible manner, capable of being extended to
|
||||
support any number of formats easily.
|
||||
|
||||
Installation
|
||||
============
|
||||
If you only need non-GUI components: in Lazarus:
|
||||
- Package/Open Package File
|
||||
- select laz_fpspreadsheet.lpk
|
||||
- click Compile.
|
||||
Now the package is known to Lazarus (and should e.g. show up in Package/Package Links).
|
||||
Add it to your project like you add other packages.
|
||||
|
||||
If you also want GUI components (grid and chart):
|
||||
- Package/Open Package File
|
||||
- seleect laz_fpspreadsheet_visual.lpk
|
||||
- click Compile
|
||||
- then click Use, Install and follow the prompts to rebuild Lazarus with the new package.
|
||||
Drop needed grid/chart components on your forms as usual
|
||||
|
||||
License
|
||||
=======
|
||||
LGPL with static linking exception. This is the same license as is used in the Lazarus Component Library.
|
||||
|
||||
More information
|
||||
================
|
||||
FPSpreadsheet documentation in fpspreadsheet.chm (open e.g. with Lazarus lhelp)
|
||||
|
||||
The fpspreadsheet article on the Lazarus wiki with lots of example:
|
||||
http://wiki.lazarus.freepascal.org/FPSpreadsheet
|
||||
|
||||
The demo programs in the examples folder
|
0
components/fpspreadsheet/fpsallformats.pas → components/fpspreadsheet/source/common/fpsallformats.pas
Executable file → Normal file
0
components/fpspreadsheet/fpsallformats.pas → components/fpspreadsheet/source/common/fpsallformats.pas
Executable file → Normal file
@ -93,7 +93,7 @@ implementation
|
||||
|
||||
uses
|
||||
DateUtils, LConvEncoding, Math,
|
||||
fpsRegFileFormats, fpsUtils, fpsNumFormat;
|
||||
fpsUtils, fpsNumFormat;
|
||||
|
||||
function LineEndingAsString(ALineEnding: TsCSVLineEnding): String;
|
||||
begin
|
@ -142,7 +142,7 @@ implementation
|
||||
|
||||
uses
|
||||
LConvEncoding, LazUTF8, URIParser, StrUtils, Math,
|
||||
fpsRegFileFormats, fpsUtils, fpsXMLCommon, fpsNumFormat;
|
||||
fpsUtils, fpsXMLCommon, fpsNumFormat;
|
||||
|
||||
const
|
||||
MIN_FONTSIZE = 6;
|
@ -51,7 +51,7 @@ procedure RichTextToHTML(AWorkbook: TsWorkbook; AFont: TsFont;
|
||||
implementation
|
||||
|
||||
uses
|
||||
math, lazUtf8, fasthtmlparser, //StrUtils, //Strings,
|
||||
math, lazUtf8, fasthtmlparser,
|
||||
fpsUtils, fpsClasses;
|
||||
|
||||
const
|
File diff suppressed because it is too large
Load Diff
10
components/fpspreadsheet/fpsopendocument.pas → components/fpspreadsheet/source/common/fpsopendocument.pas
Executable file → Normal file
10
components/fpspreadsheet/fpsopendocument.pas → components/fpspreadsheet/source/common/fpsopendocument.pas
Executable file → Normal file
@ -26,7 +26,7 @@ unit fpsopendocument;
|
||||
{$mode objfpc}{$H+}
|
||||
{$endif}
|
||||
|
||||
{$I fps.inc}
|
||||
{$I ..\fps.inc}
|
||||
|
||||
{.$define FPSPREADDEBUG} //used to be XLSDEBUG
|
||||
|
||||
@ -42,7 +42,7 @@ uses
|
||||
fpszipper,
|
||||
{$ENDIF}
|
||||
fpstypes, fpspreadsheet, fpsReaderWriter, fpsutils, fpsHeaderFooterParser,
|
||||
fpsNumFormat, fpsNumFormatParser, fpsxmlcommon, fpsPagelayout;
|
||||
fpsNumFormat, fpsxmlcommon, fpsPagelayout;
|
||||
|
||||
type
|
||||
TDateModeODS=(
|
||||
@ -286,7 +286,7 @@ uses
|
||||
fpsPatches,
|
||||
{$ENDIF}
|
||||
fpsStrings, fpsStreams, fpsClasses, fpsExprParser,
|
||||
fpsRegFileFormats, fpsImages;
|
||||
fpsImages;
|
||||
|
||||
const
|
||||
{ OpenDocument general XML constants }
|
||||
@ -5510,8 +5510,8 @@ begin
|
||||
headerRows := false;
|
||||
firstRepeatedPrintRow := ASheet.PageLayout.RepeatedRows.FirstIndex;
|
||||
lastRepeatedPrintRow := ASheet.PageLayout.RepeatedRows.LastIndex;
|
||||
if (firstRepeatedPrintRow <> UNASSIGNED_ROW_COL_INDEX) and
|
||||
(lastRepeatedPrintRow = UNASSIGNED_ROW_COL_INDEX)
|
||||
if (firstRepeatedPrintRow <> Integer(UNASSIGNED_ROW_COL_INDEX)) and
|
||||
(lastRepeatedPrintRow = Integer(UNASSIGNED_ROW_COL_INDEX))
|
||||
then
|
||||
lastRepeatedPrintRow := firstRepeatedPrintRow;
|
||||
|
@ -8,7 +8,7 @@
|
||||
unit fpspatches;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
{$I fps.inc}
|
||||
{$I ..\fps.inc}
|
||||
|
||||
interface
|
||||
|
||||
@ -29,6 +29,27 @@ uses
|
||||
Flags: TReplaceFlags; ALanguage: string=''): String;
|
||||
function UTF8LowerCase(const AInStr: string; ALanguage: string=''): string;
|
||||
function UTF8UpperCase(const AInStr: string; ALanguage: string=''): string;
|
||||
|
||||
// implemented in LazFileUtils (Laz 1.2)
|
||||
procedure ForcePathDelims(var FileName: String);
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF FPS_PTRINT}
|
||||
type
|
||||
{$IFDEF CPU64}
|
||||
PtrInt = Int64;
|
||||
{$ENDIF}
|
||||
{$IFDEF CPU32}
|
||||
PtrInt = Longint;
|
||||
{$ENDIF}
|
||||
{$IFDEF CPU16}
|
||||
{$IF DEFINED(FPC_X86_DATA_FAR) OR DEFINED(FPC_X86_DATA_HUGE)}
|
||||
PtrInt = Longint;
|
||||
{$ELSE}
|
||||
PtrInt = Integer;
|
||||
{$ENDIF}
|
||||
{$ENDIF CPU16}
|
||||
IntPtr = PtrInt;
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
@ -1693,6 +1714,21 @@ begin
|
||||
// Final correction of the buffer size
|
||||
SetLength(Result,OutCounter);
|
||||
end;
|
||||
|
||||
procedure ForcePathDelims(var FileName: string);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
for i:=1 to Length(FileName) do
|
||||
{$IFDEF Windows}
|
||||
if Filename[i]='/' then
|
||||
Filename[i]:='\';
|
||||
{$ELSE}
|
||||
if Filename[i]='\' then
|
||||
Filename[i]:='/';
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
end.
|
25
components/fpspreadsheet/fpspreadsheet.pas → components/fpspreadsheet/source/common/fpspreadsheet.pas
Executable file → Normal file
25
components/fpspreadsheet/fpspreadsheet.pas → components/fpspreadsheet/source/common/fpspreadsheet.pas
Executable file → Normal file
@ -1,16 +1,5 @@
|
||||
{**
|
||||
Unit: fpspreadsheet
|
||||
|
||||
implements **spreadsheet documents** and their properties and methods.
|
||||
|
||||
AUTHORS: Felipe Monteiro de Carvalho, Reinier Olislagers, Werner Pamler
|
||||
|
||||
LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus
|
||||
distribution, for details about the license.
|
||||
}
|
||||
|
||||
{@@ ----------------------------------------------------------------------------
|
||||
Unit fpspreadsheet implements <b>spreadsheet documents</b> and their
|
||||
Unit fpspreadsheet implements spreadsheet documents and their
|
||||
properties and methods.
|
||||
|
||||
AUTHORS: Felipe Monteiro de Carvalho, Reinier Olislagers, Werner Pamler
|
||||
@ -25,7 +14,7 @@ unit fpspreadsheet;
|
||||
// {$mode objpas}{$H+}
|
||||
{$endif}
|
||||
|
||||
{$include fps.inc}
|
||||
{$include ..\fps.inc}
|
||||
|
||||
interface
|
||||
|
||||
@ -866,9 +855,8 @@ implementation
|
||||
|
||||
uses
|
||||
Math, StrUtils, DateUtils, TypInfo, lazutf8, lazFileUtils, URIParser,
|
||||
fpsStrings, uvirtuallayer_ole,
|
||||
fpsUtils, fpsHTMLUtils, fpsRegFileFormats, fpsReaderWriter,
|
||||
fpsCurrency, fpsExprParser, fpsNumFormatParser;
|
||||
uvirtuallayer_ole, {%H-}fpsPatches, fpsStrings, fpsUtils, fpsHTMLUtils,
|
||||
fpsReaderWriter, fpsCurrency, fpsExprParser;
|
||||
|
||||
(*
|
||||
const
|
||||
@ -4268,10 +4256,8 @@ end;
|
||||
procedure TsWorksheet.WriteText(ACell: PCell; AText: String;
|
||||
ARichTextParams: TsRichTextParams = nil);
|
||||
var
|
||||
r, c: Cardinal;
|
||||
i: Integer;
|
||||
hyperlink: TsHyperlink;
|
||||
fmt: TsCellFormat;
|
||||
begin
|
||||
if ACell = nil then
|
||||
exit;
|
||||
@ -4287,8 +4273,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
fmt := Workbook.GetCellFormat(ACell^.FormatIndex);
|
||||
|
||||
if (AText = '') then
|
||||
begin
|
||||
{ Initially, the cell was destroyed here if AText = '' and the cell is not
|
||||
@ -7658,7 +7642,6 @@ end;
|
||||
-------------------------------------------------------------------------------}
|
||||
procedure TsWorkbook.GetLastRowColIndex(out ALastRow, ALastCol: Cardinal);
|
||||
var
|
||||
i: Integer;
|
||||
sheet: TsWorksheet;
|
||||
begin
|
||||
ALastRow := 0;
|
@ -2,12 +2,15 @@
|
||||
|
||||
{@@ ----------------------------------------------------------------------------
|
||||
Unit fpsReaderWriter implements basic reading/writing support
|
||||
for fpspreadsheet.
|
||||
for fpspreadsheet, as well as registration of the file formats supported.
|
||||
|
||||
AUTHORS: Felipe Monteiro de Carvalho, Reinier Olislagers, Werner Pamler
|
||||
|
||||
LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus
|
||||
distribution, for details about the license.
|
||||
|
||||
USAGE: Each unit implementing a new spreadsheet format must register the
|
||||
reader/writer and some specific data by calling "RegisterSpreadFormat".
|
||||
-------------------------------------------------------------------------------}
|
||||
|
||||
unit fpsReaderWriter;
|
||||
@ -181,6 +184,33 @@ type
|
||||
end;
|
||||
|
||||
|
||||
type
|
||||
TsSpreadFileAccess = (faRead, faWrite);
|
||||
|
||||
function RegisterSpreadFormat(
|
||||
AFormat: TsSpreadsheetFormat;
|
||||
AReaderClass: TsSpreadReaderClass;
|
||||
AWriterClass: TsSpreadWriterClass;
|
||||
AFormatName, ATechnicalName: String;
|
||||
const AFileExtensions: array of String): TsSpreadFormatID;
|
||||
|
||||
function GetFileFormatFilter(AListSeparator, AExtSeparator: Char;
|
||||
AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
|
||||
AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
|
||||
|
||||
function GetSpreadFormats(AFileAccess: TsSpreadFileAccess;
|
||||
const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
|
||||
function GetSpreadFormatsFromFileName(AFileAccess: TsSpreadFileAccess; AFileName: TFileName;
|
||||
APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
|
||||
|
||||
function GetSpreadFormatExt(AFormatID: TsSpreadFormatID): String;
|
||||
function GetSpreadFormatName(AFormatID: TsSpreadFormatID): String;
|
||||
function GetSpreadTechnicalName(AFormatID: TsSpreadFormatID): String;
|
||||
|
||||
function GetSpreadReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
|
||||
function GetSpreadWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
@ -331,7 +361,7 @@ begin
|
||||
// If the count of columns is equal to the max colcount of the file format
|
||||
// then it is likely that dummy columns have been added -> delete all empty
|
||||
// columns (starting at the right) until the first non-empty column is found
|
||||
if AWorksheet.Cols.Count = FLimitations.MaxColCount then
|
||||
if AWorksheet.Cols.Count = SizeInt(FLimitations.MaxColCount) then
|
||||
begin
|
||||
c := AWorksheet.Cols.Count - 1;
|
||||
lCol := PCol(AWorksheet.Cols[c]);
|
||||
@ -781,5 +811,522 @@ begin
|
||||
raise Exception.Create(rsUnsupportedWriteFormat);
|
||||
end;
|
||||
|
||||
type
|
||||
TsSpreadFormatData = class
|
||||
private
|
||||
FFormatID: TsSpreadFormatID; // Format identifier
|
||||
FName: String; // Text to be used in FileDialog filter
|
||||
FTechnicalName: String; // Text to be used e.g. in Titlebar
|
||||
FFileExtensions: array of String; // File extensions used by this format
|
||||
FReaderClass: TsSpreadReaderClass; // Class for reading these files
|
||||
FWriterClass: TsSpreadWriterClass; // Class for writing these files
|
||||
function GetFileExtension(AIndex: Integer): String;
|
||||
function GetFileExtensionCount: Integer;
|
||||
public
|
||||
constructor Create(AFormatID: TsSpreadFormatID; AReaderClass: TsSpreadReaderClass;
|
||||
AWriterClass: TsSpreadWriterClass; AFormatName, ATechnicalName: String;
|
||||
const AExtensions: Array of String);
|
||||
// ACanReadFromClipboard, ACanWriteToClipboard: Boolean);
|
||||
function GetFileFilterMask(ASeparator: Char): String;
|
||||
|
||||
// property CanReadFromClipboard: boolean read FCanReadClipboard;
|
||||
// property CanWriteToClipboard: boolean read FCanWriteClipboard;
|
||||
property FormatID: TsSpreadFormatID read FFormatID;
|
||||
property FormatName: String read FName;
|
||||
property FileExtension[AIndex: Integer]: String read GetFileExtension;
|
||||
property FileExtensionCount: Integer read GetFileExtensionCount;
|
||||
property ReaderClass: TsSpreadReaderClass read FReaderClass;
|
||||
property TechnicalName: String read FTechnicalName;
|
||||
property WriterClass: TsSpreadWriterClass read FWriterClass;
|
||||
end;
|
||||
|
||||
{ TsSpreadFormatRegistry }
|
||||
|
||||
TsSpreadFormatRegistry = class
|
||||
private
|
||||
FList: TFPList;
|
||||
FCachedData: TsSpreadFormatData;
|
||||
FCachedFormatID: TsSpreadFormatID;
|
||||
function GetDefaultExt(AFormatID: TsSpreadFormatID): String;
|
||||
function GetFormatName(AFormatID: TsSpreadFormatID): String;
|
||||
function GetReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
|
||||
function GetTechnicalName(AFormatID: TsSpreadFormatID): String;
|
||||
function GetWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
|
||||
protected
|
||||
function Add(AData: TsSpreadFormatData): Integer;
|
||||
function FindFormatID(AFormatID: TsSpreadFormatID): TsSpreadFormatData;
|
||||
function IndexOf(AFormatID: TsSpreadFormatID): Integer;
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
function GetAllSpreadFilesMask(AExtSeparator: Char;
|
||||
AFileAccess: TsSpreadFileAccess): String;
|
||||
function GetAllExcelFilesMask(AExtSeparator: Char): String;
|
||||
function GetFileFilter(AListSeparator, AExtSeparator: Char;
|
||||
AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
|
||||
AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
|
||||
function GetFormatArray(AFileAccess: TsSpreadFileAccess;
|
||||
const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
|
||||
function GetFormatArrayFromFileName(AFileAccess: TsSpreadFileAccess;
|
||||
const AFileName: String; APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
|
||||
|
||||
property DefaultExt[AFormatID: TsSpreadFormatID]: String read GetDefaultExt;
|
||||
property FormatName[AFormatID: TsSpreadFormatID]: String read GetFormatName;
|
||||
property ReaderClass[AFormatID: TsSpreadFormatID]: TsSpreadReaderClass read GetReaderClass;
|
||||
property TechnicalName[AFormatID: TsSpreadFormatID]: String read GetTechnicalName;
|
||||
property WriterClass[AFormatID: TsSpreadFormatID]: TsSpreadWriterClass read GetWriterClass;
|
||||
end;
|
||||
|
||||
var
|
||||
SpreadFormatRegistry: TsSpreadFormatRegistry;
|
||||
|
||||
{==============================================================================}
|
||||
{ TsSpreadFormatData }
|
||||
{==============================================================================}
|
||||
|
||||
constructor TsSpreadFormatData.Create(AFormatID: TsSpreadFormatID;
|
||||
AReaderClass: TsSpreadReaderClass; AWriterClass: TsSpreadWriterClass;
|
||||
AFormatName, ATechnicalName: String; const AExtensions: array of String);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
FFormatID := AFormatID;
|
||||
FReaderClass := AReaderClass;
|
||||
FWriterClass := AWriterClass;
|
||||
FName := AFormatName;
|
||||
FTechnicalName := ATechnicalName;
|
||||
SetLength(FFileExtensions, Length(AExtensions));
|
||||
for i:=0 to High(FFileExtensions) do FFileExtensions[i] := AExtensions[i];
|
||||
end;
|
||||
|
||||
function TsSpreadFormatData.GetFileExtension(AIndex: Integer): String;
|
||||
begin
|
||||
Result := FFileExtensions[AIndex];
|
||||
end;
|
||||
|
||||
function TsSpreadFormatData.GetFileExtensionCount: Integer;
|
||||
begin
|
||||
Result := Length(FFileExtensions);
|
||||
end;
|
||||
|
||||
function TsSpreadFormatData.GetFileFilterMask(ASeparator: Char): String;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
Result := '*' + FFileExtensions[0];
|
||||
for i:= 1 to High(FFileExtensions) do
|
||||
Result := Result + ASeparator + '*' + FFileExtensions[i];
|
||||
end;
|
||||
|
||||
|
||||
{==============================================================================}
|
||||
{ TsSpreadFormatRegistry }
|
||||
{==============================================================================}
|
||||
|
||||
constructor TsSpreadFormatRegistry.Create;
|
||||
begin
|
||||
inherited;
|
||||
FList := TFPList.Create;
|
||||
FCachedFormatID := sfidUnknown;
|
||||
FCachedData := nil;
|
||||
end;
|
||||
|
||||
destructor TsSpreadFormatRegistry.Destroy;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
for i := FList.Count-1 downto 0 do TObject(FList[i]).Free;
|
||||
FList.Free;
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.Add(AData: TsSpreadFormatData): Integer;
|
||||
begin
|
||||
Result := FList.Add(AData);
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.FindFormatID(AFormatID: TsSpreadFormatID): TsSpreadFormatData;
|
||||
var
|
||||
idx: Integer;
|
||||
begin
|
||||
if AFormatID <> FCachedFormatID then
|
||||
begin
|
||||
idx := IndexOf(AFormatID);
|
||||
if idx = -1 then
|
||||
begin
|
||||
FCachedData := nil;
|
||||
FCachedFormatID := sfidUnknown;
|
||||
end else
|
||||
begin
|
||||
FCachedData := TsSpreadFormatData(FList[idx]);
|
||||
FCachedFormatID := AFormatID;
|
||||
end;
|
||||
end;
|
||||
Result := FCachedData;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetDefaultExt(AFormatID: TsSpreadFormatID): String;
|
||||
var
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
data := FindFormatID(AFormatID);
|
||||
if data <> nil then
|
||||
Result := data.FileExtension[0] else
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetAllSpreadFilesMask(AExtSeparator: Char;
|
||||
AFileAccess: TsSpreadFileAccess): String;
|
||||
var
|
||||
L: TStrings;
|
||||
data: TsSpreadFormatData;
|
||||
ext: String;
|
||||
i, j: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
L := TStringList.Create;
|
||||
try
|
||||
for i:=0 to FList.Count-1 do
|
||||
begin
|
||||
data := TsSpreadFormatData(FList[i]);
|
||||
case AFileAccess of
|
||||
faRead : if data.ReaderClass = nil then continue;
|
||||
faWrite : if data.WriterClass = nil then continue;
|
||||
end;
|
||||
for j:=0 to data.FileExtensionCount-1 do
|
||||
begin
|
||||
ext := data.FileExtension[j];
|
||||
if L.IndexOf(ext) = -1 then
|
||||
L.Add(ext);
|
||||
end;
|
||||
end;
|
||||
if L.Count > 0 then
|
||||
begin
|
||||
Result := '*' + L[0];
|
||||
for i := 1 to L.Count-1 do
|
||||
Result := Result + AExtSeparator + '*' + L[i];
|
||||
end;
|
||||
finally
|
||||
L.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetAllExcelFilesMask(AExtSeparator: Char): String;
|
||||
var
|
||||
j: Integer;
|
||||
L: TStrings;
|
||||
data: TsSpreadFormatData;
|
||||
ext: String;
|
||||
begin
|
||||
L := TStringList.Create;
|
||||
try
|
||||
// good old BIFF...
|
||||
if (IndexOf(ord(sfExcel8)) <> -1) or
|
||||
(IndexOf(ord(sfExcel5)) <> -1) or
|
||||
(IndexOf(ord(sfExcel2)) <> -1) then L.Add('*.xls');
|
||||
|
||||
// Excel 2007+
|
||||
j := IndexOf(ord(sfOOXML));
|
||||
if j <> -1 then
|
||||
begin
|
||||
data := TsSpreadFormatData(FList[j]);
|
||||
for j:=0 to data.FileExtensionCount-1 do
|
||||
begin
|
||||
ext := data.FileExtension[j];
|
||||
if L.IndexOf(ext) = -1 then
|
||||
L.Add('*' + ext);
|
||||
end;
|
||||
end;
|
||||
|
||||
L.Delimiter := AExtSeparator;
|
||||
L.StrictDelimiter := true;
|
||||
Result := L.DelimitedText;
|
||||
finally
|
||||
L.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetFileFilter(AListSeparator, AExtSeparator: Char;
|
||||
AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
|
||||
AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
|
||||
var
|
||||
i, idx: Integer;
|
||||
L: TStrings;
|
||||
s: String;
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
// Bring the formats listed in APriorityFormats to the top
|
||||
if Length(APriorityFormats) > 0 then
|
||||
for i := High(APriorityFormats) downto Low(APriorityFormats) do
|
||||
begin
|
||||
idx := IndexOf(APriorityFormats[i]);
|
||||
data := TsSpreadFormatData(FList[idx]);
|
||||
FList.Delete(idx);
|
||||
FList.Insert(0, data);
|
||||
end;
|
||||
|
||||
L := TStringList.Create;
|
||||
try
|
||||
L.Delimiter := AListSeparator;
|
||||
L.StrictDelimiter := true;
|
||||
if AllSpreadFormats then
|
||||
begin
|
||||
s := GetAllSpreadFilesMask(AExtSeparator, AFileAccess);
|
||||
if s <> '' then
|
||||
begin
|
||||
L.Add(rsAllSpreadsheetFiles);
|
||||
L.Add(GetAllSpreadFilesMask(AExtSeparator, AFileAccess));
|
||||
end;
|
||||
end;
|
||||
if AllExcelFormats then
|
||||
begin
|
||||
s := GetAllExcelFilesMask(AExtSeparator);
|
||||
if s <> '' then
|
||||
begin
|
||||
L.Add(Format('%s (%s)', [rsAllExcelFiles, s]));
|
||||
L.Add(s);
|
||||
end;
|
||||
end;
|
||||
for i:=0 to FList.Count-1 do
|
||||
begin
|
||||
data := TsSpreadFormatData(FList[i]);
|
||||
case AFileAccess of
|
||||
faRead : if data.ReaderClass = nil then Continue;
|
||||
faWrite : if data.WriterClass = nil then Continue;
|
||||
end;
|
||||
s := data.GetFileFilterMask(AExtSeparator);
|
||||
L.Add(Format('%s %s (%s)', [data.FormatName, rsFiles, s]));
|
||||
L.Add(s);
|
||||
end;
|
||||
Result := L.DelimitedText;
|
||||
finally
|
||||
L.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetFormatArray(AFileAccess: TsSpreadFileAccess;
|
||||
const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
|
||||
var
|
||||
i, n, idx: Integer;
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
// Rearrange the formats such the one noted in APriorityFormats are at the top
|
||||
if Length(APriorityFormats) > 0 then
|
||||
for i := High(APriorityFormats) downto Low(APriorityFormats) do
|
||||
begin
|
||||
idx := IndexOf(APriorityFormats[i]);
|
||||
data := TsSpreadFormatData(FList[idx]);
|
||||
FList.Delete(idx);
|
||||
FList.Insert(0, data);
|
||||
end;
|
||||
|
||||
SetLength(Result, FList.Count);
|
||||
n := 0;
|
||||
for i := 0 to FList.Count-1 do
|
||||
begin
|
||||
data := TsSpreadFormatData(FList[i]);
|
||||
case AFileAccess of
|
||||
faRead : if data.ReaderClass = nil then Continue;
|
||||
faWrite : if data.WriterClass = nil then Continue;
|
||||
end;
|
||||
Result[n] := data.FormatID;
|
||||
inc(n);
|
||||
end;
|
||||
SetLength(Result, n);
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetFormatArrayFromFileName(
|
||||
AFileAccess: TsSpreadFileAccess; const AFileName: String;
|
||||
APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
|
||||
var
|
||||
idx: Integer;
|
||||
i, j, n: Integer;
|
||||
ext: String;
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
ext := Lowercase(ExtractFileExt(AFileName));
|
||||
|
||||
if APriorityFormat <> sfidUnknown then
|
||||
begin
|
||||
// Bring the priority format to the top
|
||||
idx := IndexOf(APriorityFormat);
|
||||
FList.Exchange(0, idx);
|
||||
end;
|
||||
|
||||
SetLength(Result, FList.Count);
|
||||
n := 0;
|
||||
for i := 0 to FList.Count - 1 do
|
||||
begin
|
||||
data := TsSpreadFormatData(FList[i]);
|
||||
case AFileAccess of
|
||||
faRead : if data.ReaderClass = nil then Continue;
|
||||
faWrite : if data.WriterClass = nil then Continue;
|
||||
end;
|
||||
for j:=0 to data.FileExtensionCount-1 do
|
||||
if Lowercase(data.FileExtension[j]) = ext then
|
||||
begin
|
||||
Result[n] := data.FormatID;
|
||||
inc(n);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
SetLength(Result, n);
|
||||
|
||||
if APriorityFormat <> sfidUnknown then
|
||||
// Restore original order
|
||||
FList.Exchange(idx, 0);
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetFormatName(AFormatID: TsSpreadFormatID): String;
|
||||
var
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
data := FindFormatID(AFormatID);
|
||||
if data <> nil then
|
||||
Result := data.FormatName else
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
|
||||
var
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
data := FindFormatID(AFormatID);
|
||||
if data <> nil then
|
||||
Result := data.ReaderClass else
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetTechnicalName(AFormatID: TsSpreadFormatID): String;
|
||||
var
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
data := FindFormatID(AFormatID);
|
||||
if data <> nil then
|
||||
Result := data.TechnicalName else
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.GetWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
|
||||
var
|
||||
data: TsSpreadFormatData;
|
||||
begin
|
||||
data := FindFormatID(AFormatID);
|
||||
if data <> nil then
|
||||
Result := data.WriterClass else
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
function TsSpreadFormatRegistry.IndexOf(AFormatID: TsSpreadFormatID): Integer;
|
||||
begin
|
||||
for Result := 0 to FList.Count - 1 do
|
||||
if TsSpreadFormatData(FList[Result]).FormatID = AFormatID then
|
||||
exit;
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
|
||||
{==============================================================================}
|
||||
{ Public utility functions }
|
||||
{==============================================================================}
|
||||
|
||||
{@@ ----------------------------------------------------------------------------
|
||||
Registers a new reader/writer pair for a given spreadsheet file format
|
||||
|
||||
AFormat identifies the file format, see sfXXXX declarations in built-in
|
||||
fpstypes.
|
||||
|
||||
The system is open to user-defined formats. In this case, AFormat must have
|
||||
the value "sfUser". The format identifier is calculated as a negative number,
|
||||
stored in the TsSpreadFormatData class and returned as function result.
|
||||
This value is needed when calling fpspreadsheet's ReadFromXXXX and WriteToXXXX
|
||||
methods to specify the file format.
|
||||
-------------------------------------------------------------------------------}
|
||||
function RegisterSpreadFormat(AFormat: TsSpreadsheetFormat;
|
||||
AReaderClass: TsSpreadReaderClass; AWriterClass: TsSpreadWriterClass;
|
||||
AFormatName, ATechnicalName: String; const AFileExtensions: array of String): TsSpreadFormatID;
|
||||
var
|
||||
fmt: TsSpreadFormatData;
|
||||
n: Integer;
|
||||
begin
|
||||
if AFormat <> sfUser then begin
|
||||
n := SpreadFormatRegistry.IndexOf(ord(AFormat));
|
||||
if n >= 0 then
|
||||
raise Exception.Create('[RegisterSpreadFormat] Spreadsheet format is already registered.');
|
||||
end;
|
||||
|
||||
if Length(AFileExtensions) = 0 then
|
||||
raise Exception.Create('[RegisterSpreadFormat] File extensions needed for registering a file format.');
|
||||
|
||||
if (AFormatName = '') or (ATechnicalName = '') then
|
||||
raise Exception.Create('[RegisterSpreadFormat] File format name is not specified.');
|
||||
|
||||
fmt := TsSpreadFormatData.Create(ord(AFormat), AReaderClass, AWriterClass,
|
||||
AFormatName, ATechnicalName, AFileExtensions);
|
||||
n := SpreadFormatRegistry.Add(fmt);
|
||||
if (AFormat = sfUser) then
|
||||
begin
|
||||
if (n <= ord(sfUser)) then n := n + ord(sfUser) + 1;
|
||||
fmt.FFormatID := -n;
|
||||
end;
|
||||
Result := fmt.FormatID;
|
||||
end;
|
||||
|
||||
function GetFileFormatFilter(AListSeparator, AExtSeparator: Char;
|
||||
AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
|
||||
AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.GetFileFilter(AListSeparator, AExtSeparator,
|
||||
AFileAccess, APriorityFormats, AllSpreadFormats, AllExcelFormats);
|
||||
end;
|
||||
|
||||
function GetSpreadFormats(AFileAccess: TsSpreadFileAccess;
|
||||
const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.GetFormatArray(AFileAccess, APriorityFormats);
|
||||
end;
|
||||
|
||||
function GetSpreadFormatsFromFileName(
|
||||
AFileAccess: TsSpreadFileAccess; AFileName: TFileName;
|
||||
APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.GetFormatArrayFromFileName(
|
||||
AFileAccess, AFileName, APriorityFormat);
|
||||
end;
|
||||
|
||||
function GetSpreadFormatExt(AFormatID: TsSpreadFormatID): String;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.DefaultExt[AFormatID];
|
||||
end;
|
||||
|
||||
function GetSpreadFormatName(AFormatID: TsSpreadFormatID): String;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.FormatName[AFormatID];
|
||||
end;
|
||||
|
||||
function GetSpreadTechnicalName(AFormatID: TsSpreadFormatID): String;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.TechnicalName[AFormatID];
|
||||
end;
|
||||
|
||||
function GetSpreadReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.ReaderClass[AFormatID];
|
||||
end;
|
||||
|
||||
function GetSpreadWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
|
||||
begin
|
||||
Result := SpreadFormatRegistry.WriterClass[AFormatID];
|
||||
end;
|
||||
|
||||
|
||||
initialization
|
||||
SpreadFormatRegistry := TsSpreadFormatRegistry.Create;
|
||||
|
||||
finalization
|
||||
SpreadFormatRegistry.Free;
|
||||
|
||||
|
||||
end.
|
@ -61,7 +61,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
lazutf8;
|
||||
lazutf8, {%H-}fpsPatches;
|
||||
|
||||
constructor TsSearchEngine.Create(AWorkbook: TsWorkbook);
|
||||
begin
|
@ -207,7 +207,7 @@ var
|
||||
implementation
|
||||
|
||||
uses
|
||||
Math, lazutf8, lazfileutils, fpsStrings, fpsRegFileFormats;
|
||||
Math, lazutf8, lazfileutils, fpsStrings, fpsReaderWriter;
|
||||
|
||||
const
|
||||
INT_NUM_LETTERS = 26;
|
@ -110,7 +110,7 @@ var
|
||||
implementation
|
||||
|
||||
uses
|
||||
fpsStrings, fpsXMLCommon, fpsRegFileFormats;
|
||||
fpsStrings, fpsXMLCommon;
|
||||
|
||||
|
||||
{ TWikiTableTokenizer }
|
6
components/fpspreadsheet/xlsbiff2.pas → components/fpspreadsheet/source/common/xlsbiff2.pas
Executable file → Normal file
6
components/fpspreadsheet/xlsbiff2.pas → components/fpspreadsheet/source/common/xlsbiff2.pas
Executable file → Normal file
@ -168,7 +168,7 @@ implementation
|
||||
|
||||
uses
|
||||
Math,
|
||||
fpsStrings, fpsRegFileFormats, fpsPalette, fpsNumFormat;
|
||||
fpsStrings, fpsReaderWriter, fpsPalette, fpsNumFormat;
|
||||
|
||||
const
|
||||
{ Excel record IDs }
|
||||
@ -370,7 +370,7 @@ end;
|
||||
procedure TsSpreadBIFF2Reader.ReadColumnDefault(AStream: TStream);
|
||||
var
|
||||
c, col1, col2: Word;
|
||||
attr1, attr2, attr3: Byte;
|
||||
attr2, attr3: Byte;
|
||||
fmt: TsCellFormat;
|
||||
fmtIndex: Integer;
|
||||
fontIndex: Integer;
|
||||
@ -386,7 +386,7 @@ begin
|
||||
col2 := WordLEToN(AStream.ReadWord) - 1;
|
||||
|
||||
{ Attributes }
|
||||
attr1 := AStream.ReadByte;
|
||||
{attr1 := }AStream.ReadByte; // Avoid compiler warning of unused attr1
|
||||
attr2 := AStream.ReadByte;
|
||||
attr3 := AStream.ReadByte;
|
||||
|
2
components/fpspreadsheet/xlsbiff5.pas → components/fpspreadsheet/source/common/xlsbiff5.pas
Executable file → Normal file
2
components/fpspreadsheet/xlsbiff5.pas → components/fpspreadsheet/source/common/xlsbiff5.pas
Executable file → Normal file
@ -217,7 +217,7 @@ implementation
|
||||
|
||||
uses
|
||||
Math,
|
||||
fpsStrings, fpsRegFileFormats, fpsStreams, fpsPalette, fpsNumFormat, xlsconst;
|
||||
fpsStrings, fpsReaderWriter, fpsStreams, fpsPalette, fpsNumFormat, xlsconst;
|
||||
|
||||
const
|
||||
{ Excel record IDs }
|
7
components/fpspreadsheet/xlsbiff8.pas → components/fpspreadsheet/source/common/xlsbiff8.pas
Executable file → Normal file
7
components/fpspreadsheet/xlsbiff8.pas → components/fpspreadsheet/source/common/xlsbiff8.pas
Executable file → Normal file
@ -279,7 +279,7 @@ implementation
|
||||
|
||||
uses
|
||||
Math, lconvencoding, LazFileUtils, URIParser,
|
||||
fpsStrings, fpsStreams, fpsRegFileFormats, fpsPalette,
|
||||
fpsStrings, {%H-}fpsPatches, fpsStreams, fpsReaderWriter, fpsPalette,
|
||||
fpsNumFormat, fpsExprParser, xlsEscher;
|
||||
|
||||
const
|
||||
@ -1941,7 +1941,10 @@ begin
|
||||
AStream.ReadBuffer(wideStr[1], size);
|
||||
// The buffer can be larger than the space occupied by the wideStr.
|
||||
// --> Find true string length and convert wide string to utf-8.
|
||||
len := StrLen(PWideChar(widestr));
|
||||
|
||||
// len := StrLen(PWideChar(widestr)); // wp: working fine except for Laz1.0
|
||||
len := Length(widestr); // Is this ok?
|
||||
|
||||
SetLength(widestr, len);
|
||||
link := UTF8Encode(widestr);
|
||||
end else
|
@ -11,7 +11,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, DateUtils, lconvencoding,
|
||||
fpsTypes, fpSpreadsheet, fpsUtils, fpsNumFormatParser, fpsPalette,
|
||||
fpsTypes, fpSpreadsheet, fpsUtils, fpsNumFormat, fpsPalette,
|
||||
fpsReaderWriter, fpsrpn;
|
||||
|
||||
const
|
||||
@ -633,8 +633,7 @@ implementation
|
||||
|
||||
uses
|
||||
AVL_Tree, Math, Variants,
|
||||
{%H-}fpspatches, fpsStrings, fpsClasses, fpsNumFormat, xlsConst,
|
||||
//fpsrpn,
|
||||
{%H-}fpspatches, fpsStrings, fpsClasses, xlsConst,
|
||||
fpsExprParser, fpsPageLayout;
|
||||
|
||||
const
|
||||
@ -2119,8 +2118,6 @@ var
|
||||
hasFormat: Boolean;
|
||||
flags: DWord;
|
||||
xf: Word;
|
||||
idx: Integer;
|
||||
fmt: PsCellFormat;
|
||||
begin
|
||||
rowrec.RowIndex := 0; // to silence the compiler...
|
||||
AStream.ReadBuffer(rowrec, SizeOf(TRowRecord));
|
||||
@ -4397,7 +4394,7 @@ begin
|
||||
dw := dw or $00000040; // Row height and font height do not match
|
||||
if ARow^.FormatIndex > 0 then begin
|
||||
dw := dw or $00000080; // Row has custom format
|
||||
dw := dw or (FindXFIndex(ARow^.FormatIndex) shl 16); // xf index
|
||||
dw := dw or DWord(FindXFIndex(ARow^.FormatIndex) shl 16); // xf index
|
||||
end;
|
||||
|
||||
{ Write out }
|
@ -90,7 +90,7 @@ implementation
|
||||
|
||||
uses
|
||||
StrUtils, Math,
|
||||
fpsStrings, fpsRegFileFormats, fpsUtils, fpsNumFormat, fpsXmlCommon, fpsHTMLUtils;
|
||||
fpsStrings, fpsUtils, fpsNumFormat, fpsXmlCommon, fpsHTMLUtils;
|
||||
|
||||
const
|
||||
FMT_OFFSET = 61;
|
9
components/fpspreadsheet/xlsxooxml.pas → components/fpspreadsheet/source/common/xlsxooxml.pas
Executable file → Normal file
9
components/fpspreadsheet/xlsxooxml.pas → components/fpspreadsheet/source/common/xlsxooxml.pas
Executable file → Normal file
@ -227,8 +227,7 @@ implementation
|
||||
uses
|
||||
variants, strutils, math, lazutf8, LazFileUtils, uriparser,
|
||||
{%H-}fpsPatches,
|
||||
fpsStrings, fpsStreams, fpsNumFormatParser, fpsClasses, fpsImages,
|
||||
fpsRegFileFormats;
|
||||
fpsStrings, fpsStreams, fpsClasses, fpsImages;
|
||||
|
||||
const
|
||||
{ OOXML general XML constants }
|
||||
@ -1139,7 +1138,8 @@ begin
|
||||
L.DelimitedText := GetNodeValue(node);
|
||||
for j:=0 to L.Count-1 do
|
||||
begin
|
||||
s := ReplaceStr(L[j], '''', '');
|
||||
//s := ReplaceStr(L[j], '''', ''); // wp: replaced by next line because of Laz 1.0
|
||||
s := StringReplace(L[j], '''', '', [rfReplaceAll]);
|
||||
p := pos(':', s);
|
||||
if p = 0 then
|
||||
begin
|
||||
@ -1163,7 +1163,8 @@ begin
|
||||
L.DelimitedText := GetNodeValue(node);
|
||||
for j:=0 to L.Count-1 do
|
||||
begin
|
||||
s := ReplaceStr(L[j], '''', '');
|
||||
//s := ReplaceStr(L[j], '''', ''); // wp: replaced by next line due to Laz 1.0
|
||||
s := StringReplace(L[j], '''', '', [rfReplaceAll]);
|
||||
p := pos('!', s);
|
||||
if p > 0 then s := Copy(s, p+1, MaxInt);
|
||||
p := pos(':', s);
|
@ -37,3 +37,8 @@
|
||||
the package with older versions activate the define FPS_NO_GRID_MULTISELECT }
|
||||
{.$DEFINE FPS_NO_GRID_MULTISELECT}
|
||||
|
||||
{ In order to provide safe casting of integers to pointers new version of FPC
|
||||
provide the types PtrInt and IntPtr.
|
||||
This is not yet available in fpc 2.6.0 }
|
||||
{.$DEFINE FPS_PTRINT}
|
||||
|
3
components/fpspreadsheet/source/install.txt
Normal file
3
components/fpspreadsheet/source/install.txt
Normal file
@ -0,0 +1,3 @@
|
||||
(1) Open laz_fpspreadsheet.lpk --> compile
|
||||
(2) Open laz_fpspreadsheet_visual.lpk --> Usage --> Install
|
||||
(3) Open laz_fpspreadsheetexport_visual.lpk --> Usage --> Install
|
@ -9,7 +9,8 @@
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
<OtherUnitFiles Value="common"/>
|
||||
<UnitOutputDirectory Value="common\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
@ -18,10 +19,11 @@
|
||||
</Parsing>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<IgnoredMessages idx5028="True" idx4055="True" idx2005="True"/>
|
||||
<IgnoredMessages idx2005="True" idx4055="True" idx5028="True"/>
|
||||
</CompilerMessages>
|
||||
<CustomOptions Value="$(IDEBuildOptions)
|
||||
-dDisableWrapperFunctions"/>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Description Value="laz_fpspreadsheet is a non-visual component that allows you to use the fpspreadsheet package to read/write spreadsheet files in .xls (BIFF/Excel), .ods OpenDocument (LibreOffice/OpenOffice) and .xlsx Open XML (Excel) formats.
|
||||
@ -31,189 +33,229 @@ This package is all you need if you don't want graphical components (like grids
|
||||
<Version Major="1" Minor="7"/>
|
||||
<Files Count="45">
|
||||
<Item1>
|
||||
<Filename Value="fpolestorage.pas"/>
|
||||
<UnitName Value="fpolestorage"/>
|
||||
<Filename Value="fps.inc"/>
|
||||
<Type Value="Include"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="fpsallformats.pas"/>
|
||||
<UnitName Value="fpsallformats"/>
|
||||
<Filename Value="common\fpolebasic.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpolebasic"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Filename Value="xlscommon.pas"/>
|
||||
<UnitName Value="xlscommon"/>
|
||||
<Filename Value="common\fpolestorage.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpolestorage"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<Filename Value="fpsstreams.pas"/>
|
||||
<UnitName Value="fpsStreams"/>
|
||||
<Filename Value="common\fpsallformats.pas"/>
|
||||
<UnitName Value="fpsallformats"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<Filename Value="fpspreadsheet.pas"/>
|
||||
<UnitName Value="fpspreadsheet"/>
|
||||
<Filename Value="common\fpscell.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsCell"/>
|
||||
</Item5>
|
||||
<Item6>
|
||||
<Filename Value="fpsxmlcommon.pas"/>
|
||||
<UnitName Value="fpsxmlcommon"/>
|
||||
<Filename Value="common\fpsclasses.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsclasses"/>
|
||||
</Item6>
|
||||
<Item7>
|
||||
<Filename Value="xlsbiff2.pas"/>
|
||||
<UnitName Value="xlsbiff2"/>
|
||||
<Filename Value="common\fpscsv.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpscsv"/>
|
||||
</Item7>
|
||||
<Item8>
|
||||
<Filename Value="xlsbiff5.pas"/>
|
||||
<UnitName Value="xlsbiff5"/>
|
||||
<Filename Value="common\fpscsvdocument.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsCsvDocument"/>
|
||||
</Item8>
|
||||
<Item9>
|
||||
<Filename Value="xlsbiff8.pas"/>
|
||||
<UnitName Value="xlsbiff8"/>
|
||||
<Filename Value="common\fpscurrency.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsCurrency"/>
|
||||
</Item9>
|
||||
<Item10>
|
||||
<Filename Value="xlsxooxml.pas"/>
|
||||
<UnitName Value="xlsxooxml"/>
|
||||
<Filename Value="common\fpsexprparser.pas"/>
|
||||
<UnitName Value="fpsExprParser"/>
|
||||
</Item10>
|
||||
<Item11>
|
||||
<Filename Value="fpsopendocument.pas"/>
|
||||
<UnitName Value="fpsopendocument"/>
|
||||
<Filename Value="common\fpsfunc.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsfunc"/>
|
||||
</Item11>
|
||||
<Item12>
|
||||
<Filename Value="fpsutils.pas"/>
|
||||
<UnitName Value="fpsutils"/>
|
||||
<Filename Value="common\fpsheaderfooterparser.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsHeaderFooterParser"/>
|
||||
</Item12>
|
||||
<Item13>
|
||||
<Filename Value="fpszipper.pp"/>
|
||||
<UnitName Value="fpszipper"/>
|
||||
<Filename Value="common\fpshtml.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsHTML"/>
|
||||
</Item13>
|
||||
<Item14>
|
||||
<Filename Value="uvirtuallayer_types.pas"/>
|
||||
<UnitName Value="uvirtuallayer_types"/>
|
||||
<Filename Value="common\fpshtmlutils.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsHTMLUtils"/>
|
||||
</Item14>
|
||||
<Item15>
|
||||
<Filename Value="uvirtuallayer.pas"/>
|
||||
<UnitName Value="uvirtuallayer"/>
|
||||
<Filename Value="common\fpsimages.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsImages"/>
|
||||
</Item15>
|
||||
<Item16>
|
||||
<Filename Value="uvirtuallayer_ole.pas"/>
|
||||
<UnitName Value="uvirtuallayer_ole"/>
|
||||
<Filename Value="common\fpsnumformat.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsNumFormat"/>
|
||||
</Item16>
|
||||
<Item17>
|
||||
<Filename Value="uvirtuallayer_ole_helpers.pas"/>
|
||||
<UnitName Value="uvirtuallayer_ole_helpers"/>
|
||||
<Filename Value="common\fpsopendocument.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsopendocument"/>
|
||||
</Item17>
|
||||
<Item18>
|
||||
<Filename Value="uvirtuallayer_ole_types.pas"/>
|
||||
<UnitName Value="uvirtuallayer_ole_types"/>
|
||||
<Filename Value="common\fpspagelayout.pas"/>
|
||||
<UnitName Value="fpsPageLayout"/>
|
||||
</Item18>
|
||||
<Item19>
|
||||
<Filename Value="uvirtuallayer_stream.pas"/>
|
||||
<UnitName Value="uvirtuallayer_stream"/>
|
||||
<Filename Value="common\fpspalette.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsPalette"/>
|
||||
</Item19>
|
||||
<Item20>
|
||||
<Filename Value="fpolebasic.pas"/>
|
||||
<UnitName Value="fpolebasic"/>
|
||||
<Filename Value="common\fpspatches.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpspatches"/>
|
||||
</Item20>
|
||||
<Item21>
|
||||
<Filename Value="wikitable.pas"/>
|
||||
<UnitName Value="wikitable"/>
|
||||
<Filename Value="common\fpspreadsheet.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpspreadsheet"/>
|
||||
</Item21>
|
||||
<Item22>
|
||||
<Filename Value="fpsnumformatparser.pas"/>
|
||||
<UnitName Value="fpsNumFormatParser"/>
|
||||
<Filename Value="common\fpsreaderwriter.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsReaderWriter"/>
|
||||
</Item22>
|
||||
<Item23>
|
||||
<Filename Value="fpsfunc.pas"/>
|
||||
<UnitName Value="fpsfunc"/>
|
||||
<Filename Value="common\fpsrpn.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsRPN"/>
|
||||
</Item23>
|
||||
<Item24>
|
||||
<Filename Value="fpsrpn.pas"/>
|
||||
<UnitName Value="fpsRPN"/>
|
||||
<Filename Value="common\fpsstreams.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsStreams"/>
|
||||
</Item24>
|
||||
<Item25>
|
||||
<Filename Value="fpsstrings.pas"/>
|
||||
<Filename Value="common\fpsstrings.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsStrings"/>
|
||||
</Item25>
|
||||
<Item26>
|
||||
<Filename Value="fpscsv.pas"/>
|
||||
<UnitName Value="fpscsv"/>
|
||||
<Filename Value="common\fpstypes.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsTypes"/>
|
||||
</Item26>
|
||||
<Item27>
|
||||
<Filename Value="fpscsvdocument.pas"/>
|
||||
<UnitName Value="fpsCsvDocument"/>
|
||||
<Filename Value="common\fpsutils.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsutils"/>
|
||||
</Item27>
|
||||
<Item28>
|
||||
<Filename Value="fpspatches.pas"/>
|
||||
<UnitName Value="fpspatches"/>
|
||||
<Filename Value="common\fpsxmlcommon.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpsxmlcommon"/>
|
||||
</Item28>
|
||||
<Item29>
|
||||
<Filename Value="fpstypes.pas"/>
|
||||
<UnitName Value="fpsTypes"/>
|
||||
<Filename Value="common\fpszipper.pp"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="fpszipper"/>
|
||||
</Item29>
|
||||
<Item30>
|
||||
<Filename Value="xlsescher.pas"/>
|
||||
<UnitName Value="xlsEscher"/>
|
||||
<Filename Value="common\uvirtuallayer.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="uvirtuallayer"/>
|
||||
</Item30>
|
||||
<Item31>
|
||||
<Filename Value="fpsreaderwriter.pas"/>
|
||||
<UnitName Value="fpsReaderWriter"/>
|
||||
<Filename Value="common\uvirtuallayer_ole.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="uvirtuallayer_ole"/>
|
||||
</Item31>
|
||||
<Item32>
|
||||
<Filename Value="fpsnumformat.pas"/>
|
||||
<UnitName Value="fpsNumFormat"/>
|
||||
<Filename Value="common\uvirtuallayer_ole_helpers.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="uvirtuallayer_ole_helpers"/>
|
||||
</Item32>
|
||||
<Item33>
|
||||
<Filename Value="fpsclasses.pas"/>
|
||||
<UnitName Value="fpsclasses"/>
|
||||
<Filename Value="common\uvirtuallayer_ole_types.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="uvirtuallayer_ole_types"/>
|
||||
</Item33>
|
||||
<Item34>
|
||||
<Filename Value="fpsheaderfooterparser.pas"/>
|
||||
<UnitName Value="fpsHeaderFooterParser"/>
|
||||
<Filename Value="common\uvirtuallayer_stream.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="uvirtuallayer_stream"/>
|
||||
</Item34>
|
||||
<Item35>
|
||||
<Filename Value="fpspalette.pas"/>
|
||||
<UnitName Value="fpsPalette"/>
|
||||
<Filename Value="common\uvirtuallayer_types.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="uvirtuallayer_types"/>
|
||||
</Item35>
|
||||
<Item36>
|
||||
<Filename Value="fpshtml.pas"/>
|
||||
<UnitName Value="fpsHTML"/>
|
||||
<Filename Value="common\wikitable.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="wikitable"/>
|
||||
</Item36>
|
||||
<Item37>
|
||||
<Filename Value="fpshtmlutils.pas"/>
|
||||
<UnitName Value="fpsHTMLUtils"/>
|
||||
<Filename Value="common\xlsbiff2.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="xlsbiff2"/>
|
||||
</Item37>
|
||||
<Item38>
|
||||
<Filename Value="fpscell.pas"/>
|
||||
<UnitName Value="fpsCell"/>
|
||||
<Filename Value="common\xlsbiff5.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="xlsbiff5"/>
|
||||
</Item38>
|
||||
<Item39>
|
||||
<Filename Value="fpssearch.pas"/>
|
||||
<UnitName Value="fpsSearch"/>
|
||||
<Filename Value="common\xlsbiff8.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="xlsbiff8"/>
|
||||
</Item39>
|
||||
<Item40>
|
||||
<Filename Value="xlsxml.pas"/>
|
||||
<UnitName Value="xlsxml"/>
|
||||
<Filename Value="common\xlscommon.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="xlscommon"/>
|
||||
</Item40>
|
||||
<Item41>
|
||||
<Filename Value="xlsconst.pas"/>
|
||||
<Filename Value="common\xlsconst.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="xlsconst"/>
|
||||
</Item41>
|
||||
<Item42>
|
||||
<Filename Value="fps.inc"/>
|
||||
<Type Value="Include"/>
|
||||
<Filename Value="common\xlsescher.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="xlsEscher"/>
|
||||
</Item42>
|
||||
<Item43>
|
||||
<Filename Value="fpscurrency.pas"/>
|
||||
<UnitName Value="fpsCurrency"/>
|
||||
<Filename Value="common\xlsxml.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="xlsxml"/>
|
||||
</Item43>
|
||||
<Item44>
|
||||
<Filename Value="fpsregfileformats.pas"/>
|
||||
<UnitName Value="fpsRegFileFormats"/>
|
||||
<Filename Value="common\xlsxooxml.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="xlsxooxml"/>
|
||||
</Item44>
|
||||
<Item45>
|
||||
<Filename Value="fpsimages.pas"/>
|
||||
<UnitName Value="fpsImages"/>
|
||||
<Filename Value="common\fpssearch.pas"/>
|
||||
<UnitName Value="fpsSearch"/>
|
||||
</Item45>
|
||||
</Files>
|
||||
<i18n>
|
||||
<EnableI18N Value="True"/>
|
||||
<OutDir Value="languages"/>
|
||||
<OutDir Value="..\languages"/>
|
||||
<EnableI18NForLFM Value="True"/>
|
||||
</i18n>
|
||||
<RequiredPkgs Count="2">
|
@ -9,8 +9,8 @@
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="."/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
<OtherUnitFiles Value="visual"/>
|
||||
<UnitOutputDirectory Value="visual\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Other>
|
||||
<CustomOptions Value="$(IDEBuildOptions)"/>
|
||||
@ -23,38 +23,37 @@ It provides graphical components like a grid and chart."/>
|
||||
<Version Major="1" Minor="7"/>
|
||||
<Files Count="5">
|
||||
<Item1>
|
||||
<Filename Value="fpspreadsheetctrls.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="fpspreadsheetctrls"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="fpspreadsheetgrid.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="fpspreadsheetgrid"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Filename Value="fpspreadsheetchart.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="fpspreadsheetchart"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<Filename Value="fpsactions.pas"/>
|
||||
<Filename Value="visual\fpsactions.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="fpsActions"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="visual\fpspreadsheetchart.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="fpspreadsheetchart"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Filename Value="visual\fpspreadsheetctrls.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="fpspreadsheetctrls"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<Filename Value="visual\fpspreadsheetgrid.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="fpspreadsheetgrid"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<Filename Value="fpsvisualutils.pas"/>
|
||||
<Filename Value="visual\fpsvisualutils.pas"/>
|
||||
<UnitName Value="fpsvisualutils"/>
|
||||
</Item5>
|
||||
</Files>
|
||||
<RequiredPkgs Count="4">
|
||||
<Item1>
|
||||
<PackageName Value="tachartlazaruspkg"/>
|
||||
<PackageName Value="laz_fpspreadsheet"/>
|
||||
<MinVersion Major="1" Minor="7" Valid="True"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="laz_fpspreadsheet"/>
|
||||
<MaxVersion Major="1" Minor="5"/>
|
||||
<MinVersion Major="1" Minor="5"/>
|
||||
<PackageName Value="tachartlazaruspkg"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCL"/>
|
@ -9,8 +9,8 @@
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="."/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
<OtherUnitFiles Value="export"/>
|
||||
<UnitOutputDirectory Value="export\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
@ -28,11 +28,11 @@ It provides a graphical export component on the Data Export tab."/>
|
||||
<Version Major="1" Minor="7"/>
|
||||
<Files Count="2">
|
||||
<Item1>
|
||||
<Filename Value="fpsexport.pas"/>
|
||||
<Filename Value="export\fpsexport.pas"/>
|
||||
<UnitName Value="fpsexport"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="fpsexportreg.pas"/>
|
||||
<Filename Value="export\fpsexportreg.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="fpsexportreg"/>
|
||||
</Item2>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user