diff options
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/ElementListUtils.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/ElementListUtils.java b/src/java/org/apache/fop/layoutmgr/ElementListUtils.java index 1166482a9..08450db98 100644 --- a/src/java/org/apache/fop/layoutmgr/ElementListUtils.java +++ b/src/java/org/apache/fop/layoutmgr/ElementListUtils.java @@ -143,10 +143,15 @@ public class ElementListUtils { i.add(new KnuthPenalty(0, KnuthPenalty.INFINITE, false, null, false)); } - } else if (el instanceof BreakElement) { - BreakElement breakEl = (BreakElement)el; - if (breakEl.getPenaltyValue() < KnuthPenalty.INFINITE) { - breakEl.setPenaltyValue(KnuthPenalty.INFINITE); + } else if (el.isUnresolvedElement()) { + if (el instanceof BreakElement) { + BreakElement breakEl = (BreakElement)el; + if (breakEl.getPenaltyValue() < KnuthPenalty.INFINITE) { + breakEl.setPenaltyValue(KnuthPenalty.INFINITE); + } + } else if (el instanceof UnresolvedListElementWithLength) { + UnresolvedListElementWithLength uel = (UnresolvedListElementWithLength)el; + len += uel.getLength().opt; } } else { KnuthElement kel = (KnuthElement)el; |