fpspreadsheet: Relax reading of unknown fill patterns from xlsx (avoids crash of xlsx files written by Gnumeric).

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5595 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-01-05 16:18:37 +00:00
parent 82145142ee
commit 212a9470c7

View File

@ -1270,7 +1270,16 @@ begin
fillData.BgColor := bgclr;
FFillList.Add(fillData);
end else
raise Exception.Create('[TsSpreadOOXLReader.ReadFills] Unsupported pattern node ' + nodeName);
if nodeName <> '#text' then
begin
// This pattern type is unknown to fpspreadsheet. We must store a dummy
// fill data record to keep the numbering intact.
fillData := TFillListData.Create;
fillData.PatternType := 'non';
FFillList.Add(fillData);
Workbook.AddErrorMsg('ReadFills: Unsupported pattern node ' + nodeName);
end;
patternNode := patternNode.NextSibling;
end;
fillNode := fillNode.NextSibling;
@ -1812,7 +1821,6 @@ begin
while Assigned(ANode) do begin
if ANode.NodeName = 'si' then begin
totaltxt := '';
// rtParams := nil;
SetLength(rtParams, 0);
valuenode := ANode.FirstChild;
while valuenode <> nil do begin