]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugzilla #50901: RTF percentage table column width not calculated from table.
authorGlenn Adams <gadams@apache.org>
Sun, 8 Apr 2012 20:18:15 +0000 (20:18 +0000)
committerGlenn Adams <gadams@apache.org>
Sun, 8 Apr 2012 20:18:15 +0000 (20:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1311081 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java
status.xml

index 270d7e24b7daaf88460ebb148960ac59f359a279..643757b71d41221f66089afac705a14a2bc5613c 100644 (file)
@@ -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:
index 8b09facf5e5125036fadf06bf49d9572d178630c..d9e1d768014cd0cf8f7540019af4e8d7ec2d5e94 100644 (file)
@@ -62,6 +62,9 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     -->
     <release version="FOP Trunk" date="TBD">
+      <action context="Code" dev="GA" type="fix" fixes-bug="50901" due-to="Carsten Pfeiffer">
+        RTF percentage table column width not calculated from table.
+      </action>
       <action context="Code" dev="GA" type="fix" fixes-bug="51009" due-to="Max Aster">
         RTF generates unexpected lines for blocks in tables. Also fix three findbugs issues.
       </action>