fpspreadsheet: Make file readers/writers raise EFpSpreadsheetReader/EFpSpreadsheetWriter exceptions instead of EFpSpreadsheet
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6763 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
e65331e881
commit
27d77fe114
@ -2191,7 +2191,7 @@ begin
|
||||
else if NullDateSetting = '1904-01-01' then
|
||||
FDateMode := dmODS1904
|
||||
else
|
||||
raise EFPSpreadsheet.CreateFmt('Spreadsheet file corrupt: cannot handle null-date format %s', [NullDateSetting]);
|
||||
raise EFPSpreadsheetReader.CreateFmt('Spreadsheet file corrupt: cannot handle null-date format %s', [NullDateSetting]);
|
||||
end;
|
||||
|
||||
procedure TsSpreadOpenDocReader.ReadDocumentProtection(ANode: TDOMNode);
|
||||
@ -2643,11 +2643,11 @@ begin
|
||||
|
||||
BodyNode := Doc.DocumentElement.FindNode('office:body');
|
||||
if not Assigned(BodyNode) then
|
||||
raise EFPSpreadsheet.Create('[TsSpreadOpenDocReader.ReadFromStream] Node "office:body" not found.');
|
||||
raise EFPSpreadsheetReader.Create('[TsSpreadOpenDocReader.ReadFromStream] Node "office:body" not found.');
|
||||
|
||||
SpreadSheetNode := BodyNode.FindNode('office:spreadsheet');
|
||||
if not Assigned(SpreadSheetNode) then
|
||||
raise EFPSpreadsheet.Create('[TsSpreadOpenDocReader.ReadFromStream] Node "office:spreadsheet" not found.');
|
||||
raise EFPSpreadsheetReader.Create('[TsSpreadOpenDocReader.ReadFromStream] Node "office:spreadsheet" not found.');
|
||||
|
||||
ReadSheets(SpreadsheetNode);
|
||||
ReadDocumentProtection(SpreadsheetNode);
|
||||
@ -7670,7 +7670,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
if styleName = '' then
|
||||
raise EFPSpreadsheet.Create(rsRowStyleNotFound);
|
||||
raise EFPSpreadsheetWriter.Create(rsRowStyleNotFound);
|
||||
end;
|
||||
|
||||
// No empty rows allowed here for the moment!
|
||||
|
@ -670,7 +670,7 @@ begin
|
||||
BIFF2EOF := True;
|
||||
|
||||
if not BOFFound then
|
||||
raise EFPSpreadsheet.Create('BOF record not found.');
|
||||
raise EFPSpreadsheetReader.Create('BOF record not found.');
|
||||
end;
|
||||
|
||||
FixCols(FWorksheet);
|
||||
|
@ -2162,7 +2162,7 @@ var
|
||||
lsMediumDashDotDot : Result := lsDashed;
|
||||
lsSlantDashDot : Result := lsDashed;
|
||||
else
|
||||
raise EFPSpreadsheet.Create('[TsSpreadBIFF5Writer.WriteXF] Linestyle not supported.');
|
||||
raise EFPSpreadsheetWriter.Create('[TsSpreadBIFF5Writer.WriteXF] Linestyle not supported.');
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user