diff options
author | Jeremias Maerki <jeremias@apache.org> | 2007-05-17 09:36:24 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2007-05-17 09:36:24 +0000 |
commit | 4dbd4bd6aacc9d6265c7a234aff6501d67e49876 (patch) | |
tree | 11962ecb6175821e1483c4f424086de699f6b6f4 /src/java | |
parent | 70d54cb2fad48610abd58e22d962e25e169022dc (diff) | |
download | xmlgraphics-fop-4dbd4bd6aacc9d6265c7a234aff6501d67e49876.tar.gz xmlgraphics-fop-4dbd4bd6aacc9d6265c7a234aff6501d67e49876.zip |
Bugfix for ClassCastException with spaces inside a table-cell (using fox:widow/orphan-content-limit)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@538849 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-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; |