You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ad...@apache.org on 2006/08/17 11:40:15 UTC
svn commit: r432190 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java
Author: adelmelle
Date: Thu Aug 17 02:40:14 2006
New Revision: 432190
URL: http://svn.apache.org/viewvc?rev=432190&view=rev
Log:
Should cause an error when used with auto-layout
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java?rev=432190&r1=432189&r2=432190&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java Thu Aug 17 02:40:14 2006
@@ -19,7 +19,7 @@
package org.apache.fop.fo.expr;
-
+import org.apache.fop.fo.flow.Table;
import org.apache.fop.fo.properties.Property;
import org.apache.fop.fo.properties.TableColLength;
@@ -53,11 +53,18 @@
throw new PropertyException("Non numeric operand to "
+ "proportional-column-width function");
}
- if (!pInfo.getPropertyList().getFObj().getName().equals("fo:table-column")) {
+ if (!"fo:table-column".equals(
+ pInfo.getPropertyList().getFObj().getName())) {
throw new PropertyException("proportional-column-width function "
+ "may only be used on table-column FO");
}
- // Check if table-layout is "fixed"...
+
+ Table t = (Table) pInfo.getPropertyList().getParentFObj();
+ if (t.isAutoLayout()) {
+ throw new PropertyException("proportional-column-width() function "
+ + "may only be used when fo:table has "
+ + "table-layout=\"fixed\".");
+ }
return new TableColLength(d.doubleValue(), pInfo.getFO());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org