You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2012/10/25 17:34:32 UTC

[Bug 53659] RTF renderer barfs when fo:table-row is missing inside fo-table-header

https://issues.apache.org/bugzilla/show_bug.cgi?id=53659

--- Comment #2 from Robert Meyer <rm...@hotmail.co.uk> ---
Created attachment 29509
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29509&action=edit
Patch to fix mismatch between XSL:FO and RTF regarding header table-rows

This issue is happening because it is always expecting there to be a TableRow
even though Gisbert correctly states that one is not required for XSL:FO. This
fix tries to create the missing container element if one cannot be found. This
however creates the problem that because no endRow() method is ever fired, the
new TableRow will be left hanging by itself which causes table rendering
issues.

To fix this, each element whether it is a writeable section or not (i.e.
headers, footers) are pushed to the stack either as an RtfContainer or as their
matching FObj object. When a pop event occurs, a check is made to see that what
it thinks is being popped actually matches the top item on the stack. If it
doesn't, then it means there is a mismatch and it is likely caused by a new
table row. In this event, the item is pushed back onto the stack and a call to
the method matching that class is made to close the tag pair before attempting
to re-pop the original item.

The code allows for further expansion should any other tag mismatches between
XSL:FO and RTF be found. I have tested this patch against the original bug FO
and it works correctly. There are a couple of things which are not ideal but
please feel free to post any comments or suggestions if you have them.

-- 
You are receiving this mail because:
You are the assignee for the bug.