summaryrefslogtreecommitdiffstats
path: root/fop-core/src
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2018-03-16 11:42:38 +0000
committerSimon Steiner <ssteiner@apache.org>2018-03-16 11:42:38 +0000
commita3a3995f8b6f271e57bcd87e2a03f45da2f04c16 (patch)
tree3af7c61746215ad1d7946efd4300ebea292f6043 /fop-core/src
parentc573724688e518f4c4587b791941fc3c3a66ceb2 (diff)
downloadxmlgraphics-fop-a3a3995f8b6f271e57bcd87e2a03f45da2f04c16.tar.gz
xmlgraphics-fop-a3a3995f8b6f271e57bcd87e2a03f45da2f04c16.zip
FOP-2776: NoSuchElementException for list changing ipd
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1826976 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'fop-core/src')
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
index 094caaf3d..69b78c9bc 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
@@ -36,6 +36,7 @@ import org.apache.fop.fo.flow.ListItemBody;
import org.apache.fop.fo.flow.ListItemLabel;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
import org.apache.fop.fo.properties.KeepProperty;
+import org.apache.fop.layoutmgr.BlockLayoutManager;
import org.apache.fop.layoutmgr.BreakElement;
import org.apache.fop.layoutmgr.BreakOpportunity;
import org.apache.fop.layoutmgr.BreakOpportunityHelper;
@@ -447,7 +448,13 @@ public class ListItemLayoutManager extends SpacedBorderedPaddedBlockLayoutManage
// add the original line where the float was but without the float now
returnList.add(new KnuthBlockBox(boxHeight, footnoteList, stepPosition, false));
}
-
+ if (originalBodyPosition != null) {
+ LayoutManager lm = originalBodyPosition.getLM();
+ if ((lm instanceof ListBlockLayoutManager || lm instanceof BlockLayoutManager)
+ && getKeepWithPrevious().isAuto()) {
+ stepPenalty++;
+ }
+ }
if (addedBoxHeight < totalHeight) {
Keep keep = keepWithNextActive.compare(getKeepTogether());
int p = stepPenalty;