From: Peter Herweg Date: Fri, 27 Jan 2006 17:10:31 +0000 (+0000) Subject: RTF: testcase 'tableunits.fo' failed because there was no PercentBaseContext passed. X-Git-Tag: fop-0_92-beta~166 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ba51a1b92ae2ba3b706075255a5d81edfccfda59;p=xmlgraphics-fop.git RTF: testcase 'tableunits.fo' failed because there was no PercentBaseContext passed. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@372916 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/render/rtf/RTFHandler.java b/src/java/org/apache/fop/render/rtf/RTFHandler.java index 97212aeaf..47ebdfa5a 100644 --- a/src/java/org/apache/fop/render/rtf/RTFHandler.java +++ b/src/java/org/apache/fop/render/rtf/RTFHandler.java @@ -63,6 +63,8 @@ import org.apache.fop.fo.pagination.SimplePageMaster; import org.apache.fop.fo.pagination.StaticContent; import org.apache.fop.fo.Constants; import org.apache.fop.fo.FOText; +import org.apache.fop.layoutmgr.table.TableContentLayoutManager; +import org.apache.fop.layoutmgr.table.TableLayoutManager; import org.apache.fop.render.rtf.rtflib.rtfdoc.ITableAttributes; import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfAfterContainer; import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfBeforeContainer; @@ -534,7 +536,16 @@ public class RTFHandler extends FOEventHandler { } try { - Integer iWidth = new Integer(tc.getColumnWidth().getValue() / 1000); + Table tbl = (Table) tc.getParent(); + + TableLayoutManager tlm + = new TableLayoutManager(tbl); + TableContentLayoutManager tclm + = new TableContentLayoutManager(tlm); + + Integer iWidth + = new Integer(tc.getColumnWidth().getValue(tclm) / 1000); + String strWidth = iWidth.toString() + "pt"; Float width = new Float( FoUnitsConverter.getInstance().convertToTwips(strWidth));