fpspreadsheet: Fix failure of numformatparser to detect general number format (makes sample file t1s.xls in examples/fpschart usable again)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3126 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2014-06-02 08:07:56 +00:00
parent 3ec5921b38
commit b095079e91
2 changed files with 3 additions and 2 deletions

View File

@ -474,7 +474,7 @@ var
begin
FStatus := psOK;
AddSection;
if AFormatString = '' then
if (AFormatString = '') or (lowercase(AFormatString) = 'general') then
exit;
FStart := @AFormatString[1];

View File

@ -3234,7 +3234,8 @@ begin
fmt := lFormatData.FormatString;
end else
fmt := AFormatString;
nf := nfGeneral; // not used here.
nf := nfGeneral;
// Analyzes the format string and tries to convert it to fpSpreadsheet format.
parser := TsNumFormatParser.Create(Workbook, fmt, nf, cdToFPSpreadsheet);