You've already forked lazarus-ccr
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:
@ -1270,7 +1270,16 @@ begin
|
|||||||
fillData.BgColor := bgclr;
|
fillData.BgColor := bgclr;
|
||||||
FFillList.Add(fillData);
|
FFillList.Add(fillData);
|
||||||
end else
|
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;
|
patternNode := patternNode.NextSibling;
|
||||||
end;
|
end;
|
||||||
fillNode := fillNode.NextSibling;
|
fillNode := fillNode.NextSibling;
|
||||||
@ -1812,7 +1821,6 @@ begin
|
|||||||
while Assigned(ANode) do begin
|
while Assigned(ANode) do begin
|
||||||
if ANode.NodeName = 'si' then begin
|
if ANode.NodeName = 'si' then begin
|
||||||
totaltxt := '';
|
totaltxt := '';
|
||||||
// rtParams := nil;
|
|
||||||
SetLength(rtParams, 0);
|
SetLength(rtParams, 0);
|
||||||
valuenode := ANode.FirstChild;
|
valuenode := ANode.FirstChild;
|
||||||
while valuenode <> nil do begin
|
while valuenode <> nil do begin
|
||||||
|
Reference in New Issue
Block a user