aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2006-02-09 09:20:02 +0000
committerJeremias Maerki <jeremias@apache.org>2006-02-09 09:20:02 +0000
commitedfe1fbf5b9567c70c9648f4a7609dcf82c85e96 (patch)
tree320d7d349bb754778fd680a18470f83bc5a1947c /src/java/org/apache
parent88879d05069e6d5fff9da743bd08f77d3a883f22 (diff)
downloadxmlgraphics-fop-edfe1fbf5b9567c70c9648f4a7609dcf82c85e96.tar.gz
xmlgraphics-fop-edfe1fbf5b9567c70c9648f4a7609dcf82c85e96.zip
Bugfix: Fixed two causes for ClassCastExceptions in BlockContainerLayoutManager.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@376235 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r--src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
index 658a92e0d..33c1bdbae 100644
--- a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
@@ -276,7 +276,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager
// get elements from curLM
returnedList = curLM.getNextKnuthElements(childLC, alignment);
if (returnedList.size() == 1
- && ((KnuthElement)returnedList.getFirst()).isForcedBreak()) {
+ && ((ListElement)returnedList.getFirst()).isForcedBreak()) {
// a descendant of this block has break-before
/*
if (returnList.size() == 0) {
@@ -306,15 +306,10 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager
// blocks
contentList.add(new BreakElement(
new Position(this), KnuthElement.INFINITE, context));
- //contentList.add(new KnuthPenalty(0,
- // KnuthElement.INFINITE, false,
- // new Position(this), false));
- } else if (!((KnuthElement) contentList.getLast()).isGlue()) {
+ } else if (!((ListElement) contentList.getLast()).isGlue()) {
// add a null penalty to allow a break between blocks
contentList.add(new BreakElement(
new Position(this), 0, context));
- //contentList.add(new KnuthPenalty(0, 0, false,
- // new Position(this), false));
} else {
// the last element in contentList is a glue;
// it is a feasible breakpoint, there is no need to add