aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/ElementListUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/ElementListUtils.java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/ElementListUtils.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/ElementListUtils.java b/src/java/org/apache/fop/layoutmgr/ElementListUtils.java
index d7f854a42..7e337dc6b 100644
--- a/src/java/org/apache/fop/layoutmgr/ElementListUtils.java
+++ b/src/java/org/apache/fop/layoutmgr/ElementListUtils.java
@@ -194,6 +194,16 @@ public final class ElementListUtils {
}
/**
+ * Indicates whether the given element list starts with a forced break.
+ * @param elems the element list
+ * @return true if the list starts with a forced break
+ */
+ public static boolean startsWithForcedBreak(List elems) {
+ return !elems.isEmpty()
+ && ((ListElement) elems.get(0)).isForcedBreak();
+ }
+
+ /**
* Indicates whether the given element list ends with a penalty with a non-infinite penalty
* value.
* @param elems the element list
@@ -229,4 +239,4 @@ public final class ElementListUtils {
return prevBreak;
}
-}
+} \ No newline at end of file