fpspreadsheet: Fix duplicate unit issues for examples requiring installed visual package

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4022 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2015-03-13 17:49:33 +00:00
parent 31bd092955
commit f94692451c
9 changed files with 24 additions and 29 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -92,7 +92,7 @@
<PackageName Value="LCL"/> <PackageName Value="LCL"/>
</Item2> </Item2>
</RequiredPackages> </RequiredPackages>
<Units Count="8"> <Units Count="7">
<Unit0> <Unit0>
<Filename Value="spready.lpr"/> <Filename Value="spready.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -110,33 +110,28 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
<Filename Value="..\..\fpscurrency.pas"/>
<IsPartOfProject Value="True"/>
</Unit3>
<Unit4>
<Filename Value="..\shared\scsvparamsform.pas"/> <Filename Value="..\shared\scsvparamsform.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<UnitName Value="scsvparamsform"/> </Unit3>
</Unit4> <Unit4>
<Unit5>
<Filename Value="..\shared\sfcurrencyform.pas"/> <Filename Value="..\shared\sfcurrencyform.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<UnitName Value="sfcurrencyform"/> </Unit4>
</Unit5> <Unit5>
<Unit6>
<Filename Value="..\shared\sformatsettingsform.pas"/> <Filename Value="..\shared\sformatsettingsform.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<UnitName Value="sformatsettingsform"/> </Unit5>
</Unit6> <Unit6>
<Unit7>
<Filename Value="..\shared\ssortparamsform.pas"/> <Filename Value="..\shared\ssortparamsform.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ComponentName Value="SortParamsForm"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<UnitName Value="ssortparamsform"/> <ResourceBaseClass Value="Form"/>
</Unit7> <UnitName Value="sSortParamsForm"/>
</Unit6>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
@ -148,7 +143,7 @@
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="..\shared"/> <OtherUnitFiles Value="..\shared"/>
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Linking> <Linking>
<Options> <Options>

View File

@ -4,7 +4,7 @@ program spready;
uses uses
Interfaces, // this includes the LCL widgetset Interfaces, // this includes the LCL widgetset
Forms, mainform, sCtrls, fpsCurrency, Forms, mainform, sCtrls,
scsvparamsform, sfcurrencyform, sformatsettingsform, ssortparamsform; scsvparamsform, sfcurrencyform, sformatsettingsform, ssortparamsform;
{$R *.res} {$R *.res}

View File

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

View File

@ -1470,7 +1470,6 @@ var
childnode: TDOMNode; childnode: TDOMNode;
subnode: TDOMNode; subnode: TDOMNode;
nodeName: String; nodeName: String;
s: String;
cell: PCell; cell: PCell;
hyperlink: string; hyperlink: string;
@ -4182,7 +4181,6 @@ var
fmt: TsCellFormat; fmt: TsCellFormat;
hyperlink: PsHyperlink; hyperlink: PsHyperlink;
u: TUri; u: TUri;
i: Integer;
begin begin
Unused(ARow, ACol); Unused(ARow, ACol);

View File

@ -1274,6 +1274,11 @@ begin
for cell in FCells do for cell in FCells do
begin begin
if HasFormula(cell) then begin if HasFormula(cell) then begin
if (cell^.Row = ARow) and (cell^.Col = ACol) then
begin
Result := true;
exit;
end;
rpnFormula := BuildRPNFormula(cell); rpnFormula := BuildRPNFormula(cell);
for i := 0 to Length(rpnFormula)-1 do for i := 0 to Length(rpnFormula)-1 do
begin begin
@ -1601,13 +1606,10 @@ end;
@param ACol Column index of the cell which has been changed @param ACol Column index of the cell which has been changed
-------------------------------------------------------------------------------} -------------------------------------------------------------------------------}
procedure TsWorksheet.ChangedCell(ARow, ACol: Cardinal); procedure TsWorksheet.ChangedCell(ARow, ACol: Cardinal);
var
cell: PCell;
begin begin
if (FWorkbook.FCalculationLock = 0) and (boAutoCalc in FWorkbook.Options) then if (FWorkbook.FCalculationLock = 0) and (boAutoCalc in FWorkbook.Options) then
begin begin
cell := FindCell(ARow, ACol); if CellUsedInFormula(ARow, ACol) then
if HasFormula(cell) or CellUsedInFormula(ARow, ACol) then
CalcFormulas; CalcFormulas;
end; end;
if Assigned(FOnChangeCell) then if Assigned(FOnChangeCell) then