> -----Original Message-----
> From: Glen Mazza [mailto:[EMAIL PROTECTED]
<snip />
> In particular, his recent handling of a messy
> disagreement between the committers a couple of weeks
> back was very helpful

Good to see that it's considered to be helpful. I, myself, was not too sure
at first about whether or not to put it in such strong wordings. Still not
fully satisfied, though, but if Victor's still monitoring the list (closely
or from a distance), I guess my intention is at least partly fulfilled.

BTW *if* he is, perhaps he (or s.o. else) could explain in terms of design,
what he thinks should 'happen' in case of row- or column-spanned
table-cells. I'm staring at the related classes, of which the ones in
fop.fo.flow seem to be equipped for handling this ( TableCell has member
vars numColumnsSpanned and numRowsSpanned ), but IIC, then a similar
functionality is still lacking in the cell's layout manager (in
What do you think? Is the layout context in getNextBreakPoss() incorrectly
set to the current column, instead of the current and n following columns,
where n equals (numColumnsSpanned - 1)? Or rather, AFAICT
context.getRefIPD() sets cellIPD to the IPD of the first column in the range
the cell occupies, regardless of colspan specifications.

I was still having a bit of difficulty finding out how to access the
corresponding TableCell Object from the layout manager... --so, it inherits
a FObj member via BlockStackingLayoutManager-AbstractLayoutManager.
Hmmm. Something like the following in fop.layoutmgr.table.Cell:

import org.apache.fop.fo.flow.TableCell;


then, further on, right above the spot where I added the little patch a few
days ago:

if( (TableCell).fobj.getNumColumnsSpanned() = 1 ) {
    cellIPD = context.getRefIPD();
} else {
    // something

Would this be the correct direction, or is the LayoutContext in this case
supposed to be returning the correct IPD? I'd guess the layout context isn't
aware of the properties of the reference fo object, so this logic definitely
belongs in the layout managers.

Perhaps something missing at Row level?

In fop.layoutmgr.table.Row.getNextBreakPoss() this happens at line 194:


I think the widths of the subsequent (n - 1) columns should be added to
As it is right now, this would be the same as

int cspan = 1;
int refIPD = 0;
for( int cnt = cspan; --cnt >= 0; ) {
    refIPD += ((Column).columns.get(cellcount - 1 + cnt);

Now it's only a matter of retrieving the colspan for the Cell. For this
purpose, I thought it necessary to equip Cell.java with a colspan member var
and corresponding getNumColumnsSpanned(), then change the first line in the
above to:

int cspan = ((Cell)cellList(cellcount - 1)).getNumColumnsSpanned();

This seems to partially solve the problem. The cellIPD gets set to the
correct value if you log it, but...

in the Row class, method addAreas() at line 352:

xoffset += col.getWidth();

So, a similar construction over here, and we've got ourselves a patch :)
Expect this soon, just gonna add a few testcases (--you never know)

Thanks again for the vote of confidence!



Reply via email to