You've already forked lazarus-ccr
fpspreadsheet: Add format string to number format error messages.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7036 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -36,6 +36,8 @@ var
|
||||
s: String;
|
||||
|
||||
begin
|
||||
WriteLn('Creating a demo file in Excel2003/XML format...');
|
||||
|
||||
MyDir := ExtractFilePath(ParamStr(0));
|
||||
|
||||
// Create the spreadsheet
|
||||
@ -394,5 +396,13 @@ begin
|
||||
// Save the spreadsheet to a file
|
||||
MyWorkbook.WriteToFile(MyDir + 'test.xml', sfExcelXML, true);
|
||||
MyWorkbook.Free;
|
||||
|
||||
WriteLn('Done.');
|
||||
WriteLn('File saved as "' + MyDir + 'text.xml"');
|
||||
{$IFDEF WINDOWS}
|
||||
WriteLn;
|
||||
WriteLn('Press ENTER to quit.');
|
||||
ReadLn;
|
||||
{$ENDIF}
|
||||
end.
|
||||
|
||||
|
@ -5595,10 +5595,10 @@ begin
|
||||
try
|
||||
// Format string ok?
|
||||
if parser.Status <> psOK then
|
||||
raise EFPSpreadsheet.Create(rsNoValidNumberFormatString);
|
||||
raise EFPSpreadsheet.CreateFmt(rsNoValidNumberFormatString, [ANumFormatStr]);
|
||||
// Make sure that we do not use a number format for date/times values.
|
||||
if not parser.IsDateTimeFormat then
|
||||
raise EFPSpreadsheet.Create(rsInvalidDateTimeFormat);
|
||||
raise EFPSpreadsheet.CreateFmt(rsInvalidDateTimeFormat, [ANumFormatStr]);
|
||||
// Avoid possible duplication of standard formats
|
||||
if ANumFormat = nfCustom then
|
||||
ANumFormat := parser.NumFormat;
|
||||
|
@ -128,10 +128,10 @@ resourcestring
|
||||
|
||||
// Format
|
||||
rsAmbiguousDecThouSeparator = 'Assuming usage of decimal separator in "%s".';
|
||||
rsInvalidDateTimeFormat = 'Trying to use an incompatible date/time format.';
|
||||
rsInvalidDateTimeFormat = 'Trying to use an incompatible date/time format (%s).';
|
||||
rsInvalidFontIndex = 'Invalid font index';
|
||||
rsInvalidNumberFormat = 'Trying to use an incompatible number format.';
|
||||
rsNoValidNumberFormatString = 'No valid number format string.';
|
||||
rsNoValidNumberFormatString = 'No valid number format string (%s).';
|
||||
|
||||
// Formulas
|
||||
rsFormulaNotSupported = 'The formula in cell %s is not supported by this file format: %s';
|
||||
|
Reference in New Issue
Block a user