Revision: 7792
Author: victormote
Date: 2006-07-17 19:19:08 -0700 (Mon, 17 Jul 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7792&view=rev
Log Message:
-----------
Allow expressions in margin computations.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Margin.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Margin.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Margin.java 2006-07-18 02:14:11 UTC (rev 7791)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Margin.java 2006-07-18 02:19:08 UTC (rev 7792)
@@ -31,6 +31,7 @@
import org.foray.fotree.fo.obj.SimplePageMaster;
import org.foray.fotree.value.DtLength;
import org.foray.fotree.value.DtPercentage;
+import org.foray.fotree.value.Expr;
import org.foray.fotree.value.PropertyCollection;
import org.foray.fotree.value.PropertyKeyword;
import org.foray.fotree.value.PropertyValue;
@@ -74,6 +75,12 @@
return pv;
}
pv = standardParse(propertyList, value, false, false);
+ if (pv instanceof Expr) {
+ Expr expression = (Expr) pv;
+ if (expression.canEvalUnitPower1()) {
+ return pv;
+ }
+ }
if (pv instanceof DtLength) {
return pv;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|