From: Jeremias Maerki Date: Tue, 12 Feb 2008 10:45:50 +0000 (+0000) Subject: Simplification. X-Git-Tag: fop-0_95beta~79 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=670a123bd85dfec3d0ae773a623c35bac1012d79;p=xmlgraphics-fop.git Simplification. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@620750 13f79535-47bb-0310-9956-ffa450edef68 --- 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: