You've already forked lazarus-ccr
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:
@ -2191,7 +2191,7 @@ begin
|
|||||||
else if NullDateSetting = '1904-01-01' then
|
else if NullDateSetting = '1904-01-01' then
|
||||||
FDateMode := dmODS1904
|
FDateMode := dmODS1904
|
||||||
else
|
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;
|
end;
|
||||||
|
|
||||||
procedure TsSpreadOpenDocReader.ReadDocumentProtection(ANode: TDOMNode);
|
procedure TsSpreadOpenDocReader.ReadDocumentProtection(ANode: TDOMNode);
|
||||||
@ -2643,11 +2643,11 @@ begin
|
|||||||
|
|
||||||
BodyNode := Doc.DocumentElement.FindNode('office:body');
|
BodyNode := Doc.DocumentElement.FindNode('office:body');
|
||||||
if not Assigned(BodyNode) then
|
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');
|
SpreadSheetNode := BodyNode.FindNode('office:spreadsheet');
|
||||||
if not Assigned(SpreadSheetNode) then
|
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);
|
ReadSheets(SpreadsheetNode);
|
||||||
ReadDocumentProtection(SpreadsheetNode);
|
ReadDocumentProtection(SpreadsheetNode);
|
||||||
@ -7670,7 +7670,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if styleName = '' then
|
if styleName = '' then
|
||||||
raise EFPSpreadsheet.Create(rsRowStyleNotFound);
|
raise EFPSpreadsheetWriter.Create(rsRowStyleNotFound);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// No empty rows allowed here for the moment!
|
// No empty rows allowed here for the moment!
|
||||||
|
@ -670,7 +670,7 @@ begin
|
|||||||
BIFF2EOF := True;
|
BIFF2EOF := True;
|
||||||
|
|
||||||
if not BOFFound then
|
if not BOFFound then
|
||||||
raise EFPSpreadsheet.Create('BOF record not found.');
|
raise EFPSpreadsheetReader.Create('BOF record not found.');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FixCols(FWorksheet);
|
FixCols(FWorksheet);
|
||||||
|
@ -2162,7 +2162,7 @@ var
|
|||||||
lsMediumDashDotDot : Result := lsDashed;
|
lsMediumDashDotDot : Result := lsDashed;
|
||||||
lsSlantDashDot : Result := lsDashed;
|
lsSlantDashDot : Result := lsDashed;
|
||||||
else
|
else
|
||||||
raise EFPSpreadsheet.Create('[TsSpreadBIFF5Writer.WriteXF] Linestyle not supported.');
|
raise EFPSpreadsheetWriter.Create('[TsSpreadBIFF5Writer.WriteXF] Linestyle not supported.');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user