DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40271>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40271





------- Additional Comments From [EMAIL PROTECTED]  2006-08-21 05:45 -------
(In reply to comment #11)
> I'm confused about this. When I checkout the Apache FOP source code from SVN 
> and
> try to feed it some .fo files that previously worked with table-layout="auto"
> they fail.

Indeed. That's a result from the 'faulty' default for column-width we currently 
set in 
FOPropertyMapping. 
The value "proportional-column-width(1)" should not be used in case of 
table-layout="auto" (as per the 
Recommendation; strictly speaking the results in case of auto-layout are 
undefined...)

It is easy enough to catch this internally, though. 
To solve this locally, I made the default an enum value of "auto", then checked 
for this later on, and 
replaced it with a 'new TableColLength(1.0, ...)'

Roughly (in TableColumn.bind(), after setting columnWidth from the 
PropertyList):
 
if (columnWidth.getEnum() == EN_AUTO) {
  columnWidth = new TableColLength(1.0, col);
}

This avoids triggering the function-evaluation, which in turn avoids the check 
for auto-layout and thus 
produces no validation error.

Haven't committed this change, yet, since I was also playing with adding 
default columns from cells in 
the first row. Goal is to have TableColumn instances for every default column 
(instead of only one 
default column for the whole table) with their widths set to the width of the 
cell they were based on 
(ultimately the above described default TableColLength(), if the cell's width 
is "auto").

> In my new patch I commented out your change just so that I may do some 
> testing.
> I have to understand this better.

I hope the above clarifies it a bit. If not, don't hesitate to ask further.

What is also important in case of auto-layout, I think, is that the 
minimum-column-width should not 
simply be 'the available IPD divided by the number of columns' (or 'one 
table-unit'). 
The big difference with fixed-layout is precisely that, in case of auto-layout 
the minimum-column-
width depends on the content. For example: if the column contains only one 
character of content each 
row, then the column's minimum-width would most likely turn out to be far less 
than 'proportional-
column-width(1)'.


Cheers,

Andreas

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to