]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
RTF: testcase 'tableunits.fo' failed because there was no PercentBaseContext passed.
authorPeter Herweg <pherweg@apache.org>
Fri, 27 Jan 2006 17:10:31 +0000 (17:10 +0000)
committerPeter Herweg <pherweg@apache.org>
Fri, 27 Jan 2006 17:10:31 +0000 (17:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@372916 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/rtf/RTFHandler.java

index 97212aeaff69e928cbc45c4a379ee39d0e2992b2..47ebdfa5a68ec3553e62ed0ae491c23d04e6bde2 100644 (file)
@@ -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));