fpspreadsheet: Fix biff2 reader interpreting "general" number format as nfCustom.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4163 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2015-05-30 13:32:54 +00:00
parent 3793c9bd95
commit 75b30afd0a
2 changed files with 10 additions and 1 deletions

View File

@ -301,6 +301,14 @@ begin
section := @FSections[ASection]; section := @FSections[ASection];
section^.Kind := []; section^.Kind := [];
if (ASection = 0) and (Length(FSections) = 1) and (Length(section^.Elements) = 1)
and (section^.Elements[0].Token = nftGeneral)
then begin
section^.NumFormat := nfGeneral;
exit;
end;
i := 0; i := 0;
isMonthMinute := false; isMonthMinute := false;

View File

@ -934,7 +934,8 @@ begin
nf := Workbook.GetNumberFormat(fmt.NumberFormatIndex); nf := Workbook.GetNumberFormat(fmt.NumberFormatIndex);
fmt.NumberFormat := nf.NumFormat; fmt.NumberFormat := nf.NumFormat;
fmt.NumberFormatStr := nf.NumFormatStr; fmt.NumberFormatStr := nf.NumFormatStr;
Include(fmt.UsedFormattingFields, uffNumberFormat); if fmt.NumberFormat <> nfGeneral then
Include(fmt.UsedFormattingFields, uffNumberFormat);
end; end;
// Horizontal alignment // Horizontal alignment