From 8916945ca168aa4bc7c11e4447604497220df819 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sat, 31 Jan 2015 20:37:44 +0000 Subject: [PATCH] fpspreadsheet: Fix missing repeated cells when reading ods file (bug #0027389) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3919 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/fpsopendocument.pas | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/components/fpspreadsheet/fpsopendocument.pas b/components/fpspreadsheet/fpsopendocument.pas index fb06e2695..45c667f88 100755 --- a/components/fpspreadsheet/fpsopendocument.pas +++ b/components/fpspreadsheet/fpsopendocument.pas @@ -1921,7 +1921,8 @@ var rowStyle: TRowStyleData; rowHeight: Single; autoRowHeight: Boolean; - i: Integer; + i, n: Integer; + cell: PCell; begin rowsRepeated := 0; row := 0; @@ -2018,6 +2019,14 @@ begin paramColsRepeated := GetAttrValue(cellNode, 'table:number-columns-repeated'); if paramColsRepeated = '' then paramColsRepeated := '1'; + n := StrToInt(paramColsRepeated); + if n > 1 then + begin + cell := FWorksheet.FindCell(row, col); + if cell <> nil then + for i:=1 to n-1 do + FWorksheet.CopyCell(row, col, row, col+i); + end; end else if nodeName = 'table:covered-table-cell' then