fpspreadsheet: Fix file reader deleting row records of hidden rows.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6639 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-09-10 09:00:48 +00:00
parent 00ea419596
commit 4260c5bd5e

View File

@ -454,11 +454,13 @@ begin
// to the DefaultRowHeight ... // to the DefaultRowHeight ...
sheet.WriteDefaultRowHeight(h, FWorkbook.Units); sheet.WriteDefaultRowHeight(h, FWorkbook.Units);
// ... and delete all row records with default format. // ... and delete all visible row records with default format.
for r := sheet.Rows.Count-1 downto 0 do begin for r := sheet.Rows.Count-1 downto 0 do begin
lRow := PRow(sheet.Rows[r]); lRow := PRow(sheet.Rows[r]);
if (lRow^.FormatIndex = 0) and (not lRow^.Hidden) then sheet.RemoveRow(r); if (lRow^.FormatIndex = 0) and (not lRow^.Hidden) then
sheet.RemoveRow(lRow^.Row);
end; end;
end; end;
{@@ ---------------------------------------------------------------------------- {@@ ----------------------------------------------------------------------------