Hi,

I can describe the case only, since I can't commit my changes yet (they still break a few layout tests), so please ask further if you don't have enough info to form an idea of my changes. Maybe better to wait to when I commit my stuff to a branch --tomorrow or Thursday--, so you get a clearer view, but anyway...


Sketch of the changes:
In my local copy, I have added a new Maker subclass for the column-number property. It works in combination with an added columnIndex instance variable in the related FObjs (Table/TableBody/TableRow), which is updated in addChildNode() (if the child-node is a TableColumn/TableCell).

Very roughly, the new ColumnNumberProperty.make() does something like this:

if( fo.getNameId() == FO_TABLE_CELL || fo.getNameId() == FO_TABLE_COLUMN ) {
   //return the parent's current columnIndex
} else {
   //tried two things here:
   //1) return null
   //2) throw a PropertyException
}

All seems to work nicely if I trace it using log.debug(), but I wanted to include some junit tests.

Problem is that the tests fail because:
- either an exception is thrown because the property is specified on 'null'
- or the property evaluates to 'null' instead of the expected '1'.

The related fragments of the test-case look like:

<fo:table-column column-width="100%">
  <test:assert property="column-number" expected="1" />
</fo:table-column>
...
<fo:table-cell>
  <test:assert property="column-number" expected="1" />
  <fo:block>cell content</fo:block>
</fo:table-cell>


Any idea what I am missing/doing wrong? Any insights appreciated.

TIA!

Cheers,

Andreas

Reply via email to