fpspreadsheet: Fix xlsx reader getting dimension of an empty worksheet incorrectly.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5988 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-07-25 09:40:05 +00:00
parent 05bdb8bb88
commit e688582c1c

View File

@ -1271,6 +1271,7 @@ procedure TsSpreadOOXMLReader.ReadDimension(ANode: TDOMNode;
var
ref: String;
r1, c1: Cardinal;
ok: Boolean;
begin
Unused(AWorksheet);
@ -1281,8 +1282,13 @@ begin
exit;
ref := GetAttrValue(ANode, 'ref');
if ref <> '' then
ParseCellRangeString(ref, r1, c1, FLastRow, FLastCol);
if ref <> '' then begin
// Normally the range of worksheets is specified as, e.g., 'A1:K5'
ok := ParseCellRangeString(ref, r1, c1, FLastRow, FLastCol);
// But for empty worksheets it is specified as only 'A1'
if not ok then
ParseCellString(ref, FLastRow, FLastCol);
end;
end;
procedure TsSpreadOOXMLReader.ReadFileVersion(ANode: TDOMNode);