aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/list
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2006-02-09 08:54:06 +0000
committerJeremias Maerki <jeremias@apache.org>2006-02-09 08:54:06 +0000
commit88879d05069e6d5fff9da743bd08f77d3a883f22 (patch)
treeebd124d6cc3fd309399229b91ec0e6b2e3e92ad4 /src/java/org/apache/fop/layoutmgr/list
parent3606df4b663e7b7189a625efeec89974eed5c41d (diff)
downloadxmlgraphics-fop-88879d05069e6d5fff9da743bd08f77d3a883f22.tar.gz
xmlgraphics-fop-88879d05069e6d5fff9da743bd08f77d3a883f22.zip
Bugfix: padding-top and padding-bottom on list-items could lead to wrong page break decisions and thus to overlapping text.
Bugfix: break-before and break-after were ignored on list-items. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@376226 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/list')
-rw-r--r--src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
index c402f37ae..d9bbd18f6 100644
--- a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
@@ -179,8 +179,21 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager
LinkedList returnList = new LinkedList();
+ if (!breakBeforeServed) {
+ try {
+ if (addKnuthElementsForBreakBefore(returnList, context)) {
+ return returnList;
+ }
+ } finally {
+ breakBeforeServed = true;
+ }
+ }
+
addKnuthElementsForSpaceBefore(returnList, alignment);
+ addKnuthElementsForBorderPaddingBefore(returnList, !firstVisibleMarkServed);
+ firstVisibleMarkServed = true;
+
//Spaces, border and padding to be repeated at each break
addPendingMarks(context);
@@ -222,7 +235,9 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager
// "wrap" the Position inside each element
wrapPositionElements(returnedList, returnList, true);
+ addKnuthElementsForBorderPaddingAfter(returnList, true);
addKnuthElementsForSpaceAfter(returnList, alignment);
+ addKnuthElementsForBreakAfter(returnList, context);
if (keepWithNextPendingOnLabel || keepWithNextPendingOnBody || mustKeepWithNext()) {
context.setFlags(LayoutContext.KEEP_WITH_NEXT_PENDING);