You've already forked lazarus-ccr
fpspreadsheet: Fixes a bug in the last fix
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1655 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -13,7 +13,6 @@
|
|||||||
<Title Value="test_write_formatting"/>
|
<Title Value="test_write_formatting"/>
|
||||||
<ResourceType Value="res"/>
|
<ResourceType Value="res"/>
|
||||||
<UseXPManifest Value="True"/>
|
<UseXPManifest Value="True"/>
|
||||||
<Icon Value="0"/>
|
|
||||||
</General>
|
</General>
|
||||||
<i18n>
|
<i18n>
|
||||||
<EnableI18N LFM="False"/>
|
<EnableI18N LFM="False"/>
|
||||||
|
@ -170,8 +170,8 @@ begin
|
|||||||
WriteSecondWorksheet();
|
WriteSecondWorksheet();
|
||||||
|
|
||||||
// Save the spreadsheet to a file
|
// Save the spreadsheet to a file
|
||||||
//MyWorkbook.WriteToFile(MyDir + 'test3.xls', sfExcel8, False);
|
MyWorkbook.WriteToFile(MyDir + 'test3.xls', sfExcel8, False);
|
||||||
MyWorkbook.WriteToFile(MyDir + 'test3.odt', sfOpenDocument, False);
|
// MyWorkbook.WriteToFile(MyDir + 'test3.odt', sfOpenDocument, False);
|
||||||
MyWorkbook.Free;
|
MyWorkbook.Free;
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -14,7 +14,15 @@
|
|||||||
<UseAnsiStrings Value="False"/>
|
<UseAnsiStrings Value="False"/>
|
||||||
</SyntaxOptions>
|
</SyntaxOptions>
|
||||||
</Parsing>
|
</Parsing>
|
||||||
|
<Linking>
|
||||||
|
<Debugging>
|
||||||
|
<GenerateDebugInfo Value="True"/>
|
||||||
|
</Debugging>
|
||||||
|
</Linking>
|
||||||
<Other>
|
<Other>
|
||||||
|
<CompilerMessages>
|
||||||
|
<UseMsgFile Value="True"/>
|
||||||
|
</CompilerMessages>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
|
@ -71,7 +71,8 @@ type
|
|||||||
|
|
||||||
TsSpreadBIFFWriter = class(TsCustomSpreadWriter)
|
TsSpreadBIFFWriter = class(TsCustomSpreadWriter)
|
||||||
protected
|
protected
|
||||||
FLastRow, FLastCol: Integer;
|
FLastRow: Integer;
|
||||||
|
FLastCol: Word;
|
||||||
function FPSColorToEXCELPallete(AColor: TsColor): Word;
|
function FPSColorToEXCELPallete(AColor: TsColor): Word;
|
||||||
procedure GetLastRowCallback(ACell: PCell; AStream: TStream);
|
procedure GetLastRowCallback(ACell: PCell; AStream: TStream);
|
||||||
function GetLastRowIndex(AWorksheet: TsWorksheet): Integer;
|
function GetLastRowIndex(AWorksheet: TsWorksheet): Integer;
|
||||||
@ -115,6 +116,7 @@ function TsSpreadBIFFWriter.GetLastRowIndex(AWorksheet: TsWorksheet): Integer;
|
|||||||
begin
|
begin
|
||||||
FLastRow := 0;
|
FLastRow := 0;
|
||||||
IterateThroughCells(nil, AWorksheet.Cells, GetLastRowCallback);
|
IterateThroughCells(nil, AWorksheet.Cells, GetLastRowCallback);
|
||||||
|
Result := FLastRow;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TsSpreadBIFFWriter.GetLastColCallback(ACell: PCell; AStream: TStream);
|
procedure TsSpreadBIFFWriter.GetLastColCallback(ACell: PCell; AStream: TStream);
|
||||||
@ -126,6 +128,7 @@ function TsSpreadBIFFWriter.GetLastColIndex(AWorksheet: TsWorksheet): Word;
|
|||||||
begin
|
begin
|
||||||
FLastCol := 0;
|
FLastCol := 0;
|
||||||
IterateThroughCells(nil, AWorksheet.Cells, GetLastColCallback);
|
IterateThroughCells(nil, AWorksheet.Cells, GetLastColCallback);
|
||||||
|
Result := FLastCol;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Reference in New Issue
Block a user