]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Simplification.
authorJeremias Maerki <jeremias@apache.org>
Tue, 12 Feb 2008 10:45:50 +0000 (10:45 +0000)
committerJeremias Maerki <jeremias@apache.org>
Tue, 12 Feb 2008 10:45:50 +0000 (10:45 +0000)
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

index f4e9cb633bddc11ea7a6e3a7492d05a23a726ca7..54fd315b1a60bc55b03edb3201e8aca4bd98fd34 100644 (file)
@@ -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: