Author: gadams
Date: Sun Apr  8 20:18:15 2012
New Revision: 1311081

URL: http://svn.apache.org/viewvc?rev=1311081&view=rev
Log:
Bugzilla #50901: RTF percentage table column width not calculated from table.

Modified:
    
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java
    xmlgraphics/fop/trunk/status.xml

Modified: 
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java?rev=1311081&r1=1311080&r2=1311081&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java
 (original)
+++ 
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java
 Sun Apr  8 20:18:15 2012
@@ -29,6 +29,7 @@ import org.apache.fop.datatypes.PercentB
 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 P
         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:

Modified: xmlgraphics/fop/trunk/status.xml
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=1311081&r1=1311080&r2=1311081&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Sun Apr  8 20:18:15 2012
@@ -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>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to