aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/fo/expr/BodyStartFunction.java')
-rw-r--r--src/java/org/apache/fop/fo/expr/BodyStartFunction.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/java/org/apache/fop/fo/expr/BodyStartFunction.java b/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
index f58b17718..d064ee998 100644
--- a/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
+++ b/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
@@ -20,7 +20,7 @@ package org.apache.fop.fo.expr;
import org.apache.fop.datatypes.Numeric;
import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.flow.ListItem;
import org.apache.fop.fo.properties.Property;
@@ -49,16 +49,15 @@ public class BodyStartFunction extends FunctionBase {
Numeric distance =
pInfo.getPropertyList().get(Constants.PR_PROVISIONAL_DISTANCE_BETWEEN_STARTS).getNumeric();
- FONode item = pInfo.getFO();
- while (item != null && !(item instanceof ListItem)) {
- item = item.getParent();
+ PropertyList pList = pInfo.getPropertyList();
+ while (pList != null && !(pList.getFObj() instanceof ListItem)) {
+ pList = pList.getParentPropertyList();
}
- if (item == null) {
+ if (pList == null) {
throw new PropertyException("body-start() called from outside an fo:list-item");
}
- Numeric startIndent =
- ((ListItem)item).getProperty(Constants.PR_START_INDENT).getNumeric();
+ Numeric startIndent = pList.get(Constants.PR_START_INDENT).getNumeric();
return (Property) NumericOp.addition(distance, startIndent);
}