-----Original Message----- From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]
I guess the riddle I'm still trying to solve is: How do I access the LM's for the subsequent rows at this point?
AFAICT, I have overlooked (at least) the following note in the spec (6.7.1 Table Formatting Objects - Introduction):
- a cell that is spanned may have a different background in each of the grid units it occupies
Ahh... I can see why this would complicate things somewhat. Perhaps you could still just have a single Cell occupying each grid unit but allow each LM to render multiple backgrounds.
Reading this, I'm totally unsure of the solution I have proposed... As it is, I think it would 'expand' the background props in the first grid unit, and use them as background for the whole spanned cell. In order to achieve this effect, it may be necessary to have the body LM add dummy cells to the following rows.
So the child areas of a spanned cell need to be laid out to fill the full range the cell spans, while the specified background may only be used on the first grid unit... Quite a bit harder than I initially thought, but we'll keep looking.
Another detail overlooked is the column-number property, which would perfectly fulfill the role of my proposed cspanPrev variable. It is defined in TableCell, but not according to the default defined in the spec. (It's set to 0, but should be set to: <q> the first column to be spanned by the table-cell. The initial value is the current column-number. For the first table-cell in a table-row, the current column is 1. For other table-cells, the current column-number is the column-number of the previous table-cell in the row plus the number of columns spanned by that previous cell. </q>)
I didnt read your posts in the correct order, so my earlier reply on column-number is meaningless, sorry. I was thinking of TableColumn not the TableCell. But you could still work out column number in the FO Tree classes as you proposed. You may want to override the FObj.addChild method on TableRow in a similar manner to the Table class.
In the meantime, if anyone can provide me with any pointers, be sure to post them! (C'mon, ya layout-geeks, where are you? :) )