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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8321

from-parent('width') returns 0 for nested tables

           Summary: from-parent('width') returns 0 for nested tables
           Product: Fop
           Version: 0.20.3
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: page-master/layout
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I often use a function of from-parent('width') to specify column width in
tables.  When the table is inside a <fo:block> or in a table cell, 
from-parent('width') returns 0 (which leads to the error, "Zero-width 
table column!")

I have traced this to the fact that calls to Block.getContentWidth() and
TableCell.getContentWidth both return 0 (but for different reasons).

org.apache.fop.fo.flow.Block sets its instance variable contentWidth 
*after* laying out its children.  If any child calls getContentWidth
while being laid out, it returns 0.  The solution is to move the code 
that sets areaHeight and contentWidth earlier in the layout() method
(I will provide a patch)

org.apache.fop.fo.flow.TableCell does not overwride the getContentWidth()
method from FObj, so it returns 0.  I will also attach a possible 
implementation for TableCell.getContentWidth()

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to