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"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
|
@ -170,8 +170,8 @@ begin
|
||||
WriteSecondWorksheet();
|
||||
|
||||
// Save the spreadsheet to a file
|
||||
//MyWorkbook.WriteToFile(MyDir + 'test3.xls', sfExcel8, False);
|
||||
MyWorkbook.WriteToFile(MyDir + 'test3.odt', sfOpenDocument, False);
|
||||
MyWorkbook.WriteToFile(MyDir + 'test3.xls', sfExcel8, False);
|
||||
// MyWorkbook.WriteToFile(MyDir + 'test3.odt', sfOpenDocument, False);
|
||||
MyWorkbook.Free;
|
||||
end.
|
||||
|
||||
|
@ -14,7 +14,15 @@
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<GenerateDebugInfo Value="True"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<UseMsgFile Value="True"/>
|
||||
</CompilerMessages>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
|
@ -71,7 +71,8 @@ type
|
||||
|
||||
TsSpreadBIFFWriter = class(TsCustomSpreadWriter)
|
||||
protected
|
||||
FLastRow, FLastCol: Integer;
|
||||
FLastRow: Integer;
|
||||
FLastCol: Word;
|
||||
function FPSColorToEXCELPallete(AColor: TsColor): Word;
|
||||
procedure GetLastRowCallback(ACell: PCell; AStream: TStream);
|
||||
function GetLastRowIndex(AWorksheet: TsWorksheet): Integer;
|
||||
@ -115,6 +116,7 @@ function TsSpreadBIFFWriter.GetLastRowIndex(AWorksheet: TsWorksheet): Integer;
|
||||
begin
|
||||
FLastRow := 0;
|
||||
IterateThroughCells(nil, AWorksheet.Cells, GetLastRowCallback);
|
||||
Result := FLastRow;
|
||||
end;
|
||||
|
||||
procedure TsSpreadBIFFWriter.GetLastColCallback(ACell: PCell; AStream: TStream);
|
||||
@ -126,6 +128,7 @@ function TsSpreadBIFFWriter.GetLastColIndex(AWorksheet: TsWorksheet): Word;
|
||||
begin
|
||||
FLastCol := 0;
|
||||
IterateThroughCells(nil, AWorksheet.Cells, GetLastColCallback);
|
||||
Result := FLastCol;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user