diff options
author | Glenn Adams <gadams@apache.org> | 2012-04-08 20:18:15 +0000 |
---|---|---|
committer | Glenn Adams <gadams@apache.org> | 2012-04-08 20:18:15 +0000 |
commit | 1a9d1d9ad0d90e26df6e399a4ecf7a2b1a93d78f (patch) | |
tree | 7b888e4c00f56d5ab9ef601ba81b2863e5475c83 /src/java/org/apache/fop/render/rtf/rtflib | |
parent | 656f7b54b5ef98d2ab55142e411a0427c92d193c (diff) | |
download | xmlgraphics-fop-1a9d1d9ad0d90e26df6e399a4ecf7a2b1a93d78f.tar.gz xmlgraphics-fop-1a9d1d9ad0d90e26df6e399a4ecf7a2b1a93d78f.zip |
Bugzilla #50901: RTF percentage table column width not calculated from table.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1311081 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/rtf/rtflib')
-rw-r--r-- | src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java b/src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java index 270d7e24b..643757b71 100644 --- a/src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java +++ b/src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java @@ -29,6 +29,7 @@ import org.apache.fop.datatypes.PercentBaseContext; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; import org.apache.fop.fo.flow.table.Table; +import org.apache.fop.fo.flow.table.TableColumn; import org.apache.fop.fo.pagination.PageSequence; /** @@ -59,6 +60,13 @@ public class PercentContext implements PercentBaseContext { if (fobj == null) { return 0; } + + // Special handler for TableColumn width specifications, needs to be + // relative to the parent! + if ( ( fobj instanceof TableColumn ) && ( fobj.getParent() instanceof FObj ) ) { + fobj = (FObj) fobj.getParent(); + } + switch (lengthBase) { case LengthBase.CONTAINING_BLOCK_WIDTH: case LengthBase.PARENT_AREA_WIDTH: |