aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2007-05-17 09:36:24 +0000
committerJeremias Maerki <jeremias@apache.org>2007-05-17 09:36:24 +0000
commit4dbd4bd6aacc9d6265c7a234aff6501d67e49876 (patch)
tree11962ecb6175821e1483c4f424086de699f6b6f4 /src
parent70d54cb2fad48610abd58e22d962e25e169022dc (diff)
downloadxmlgraphics-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')
-rw-r--r--src/java/org/apache/fop/layoutmgr/ElementListUtils.java13
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;