aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Herweg <pherweg@apache.org>2006-01-27 17:10:31 +0000
committerPeter Herweg <pherweg@apache.org>2006-01-27 17:10:31 +0000
commitba51a1b92ae2ba3b706075255a5d81edfccfda59 (patch)
treebd9a16a29cb10b8c6c718ab63baed9118892fbc9 /src
parentff538ae8413a9a7472728b50891ba2f2f5ad0c3d (diff)
downloadxmlgraphics-fop-ba51a1b92ae2ba3b706075255a5d81edfccfda59.tar.gz
xmlgraphics-fop-ba51a1b92ae2ba3b706075255a5d81edfccfda59.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/render/rtf/RTFHandler.java13
1 files changed, 12 insertions, 1 deletions
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));