From 670a123bd85dfec3d0ae773a623c35bac1012d79 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Tue, 12 Feb 2008 10:45:50 +0000 Subject: [PATCH] Simplification. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@620750 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/layoutmgr/AbstractBreaker.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java b/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java index f4e9cb633..54fd315b1 100644 --- a/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java +++ b/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java @@ -25,6 +25,7 @@ import java.util.ListIterator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.apache.fop.fo.Constants; import org.apache.fop.traits.MinOptMax; @@ -560,10 +561,8 @@ public abstract class AbstractBreaker { nextSequenceStartsOn = handleSpanChange(childLC, nextSequenceStartsOn); Position breakPosition = null; - if (((KnuthElement) returnedList.getLast()).isPenalty() - && ((KnuthPenalty) returnedList.getLast()).getP() == -KnuthElement.INFINITE) { - KnuthPenalty breakPenalty = (KnuthPenalty) returnedList - .removeLast(); + if (((KnuthElement) returnedList.getLast()).isForcedBreak()) { + KnuthPenalty breakPenalty = (KnuthPenalty)returnedList.removeLast(); breakPosition = breakPenalty.getPosition(); switch (breakPenalty.getBreakClass()) { case Constants.EN_PAGE: -- 2.39.5