Apache OpenOffice (AOO) Bugzilla – Issue 53770
tables with fixed row heights and row-spanning cells are imported as table with dynamic row height
Last modified: 2013-08-07 14:38:26 UTC
Open the first attached document (<issue_number>.idt). It contains a table with two rows and two columns, where in the second column, both cells are merged. In the file format (the content.xml inside the zipped file), the table is described as follows (syntax shortened): <style name="fixed_height"> <row-properties optimal-height="false" height="0.2in"> </style> <table> <row style="fixed_height"> <cell/> <cell rows-spanned="2">some text</cell> </row> <row style="fixed_height"> <cell/> <covered-cell/> </row> </table> That is, the file describes a table with two rows, both having a fixed height, and the second cell in the first row covering two rows. The expected outcome when loading this document is that the overall table has a height of 0.4 inches. However, it hasn't. In fact, the text in the merged cell is so long that this cell grows automatically, also growing the table this way. Chosing "Row/Height" in the context menu of this cell reveales that in fact Writer created a row which has the "Fit to size" flag set, i.e. grows dynamically. While this can be explained with the differences in the two table models (in the table model, and in Writer internally), it simply means that there is *no* way to generate a table with a fixed height, except with Writer itself. In particular, external applications creating OASIS documents don't have a chance to describe a fixed-height table with cells spanning multiple rows, since those tables will always end up with a /dynamic/ height after being imported in Writer.
Created attachment 29041 [details] document to reproduce the bug case
(with the two table models mentioned above I meant "in the file format, and in Writer internally")
Created attachment 29042 [details] more complex document to illustrate the problem
Created attachment 29043 [details] (the right one) more complex document to illustrate the problem
The second attached JasperOasis.odt is the one which originally revealed the problem. It was generated by an external program (JasperReports). The table in the document contains 180 rows, and a number of cells spanning multiple rows. Every row has a style attached with it, giving it a fixed height. The heights of all rows sum up to 10.90 inches, while the page size is 11.69 inches. Since there are no page borders, the table should fit completely onto the page. However, it doesn't - the last few lines slip to the second page. That is because of the merged cells in the document, which implicitly, upon loading and translating into Writer's table model, create rows with a dynamic row height, thus growing the table.