From 6f2c345eb1501735aff9bd787841ebce46ee0cb8 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Fri, 11 Nov 2005 16:39:21 +0000 Subject: [PATCH] Bugzilla #37468: Bugfix: A normal break inside a table resulted in the next part to be sent to the next page instead of the next flow. TableContentLayoutManager produces KnuthPenalties with breakClass=0. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@332594 13f79535-47bb-0310-9956-ffa450edef68 --- .../layoutmgr/PageSequenceLayoutManager.java | 8 +- .../region-body_column-count_bug37468.xml | 130 ++++++++++++++++++ 2 files changed, 135 insertions(+), 3 deletions(-) create mode 100644 test/layoutengine/standard-testcases/region-body_column-count_bug37468.xml diff --git a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java index 6dbc997b3..fce0b4479 100644 --- a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java @@ -191,7 +191,8 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager { needColumnBalancing = (childLC.getNextSpan() == Constants.EN_ALL); } if (needColumnBalancing) { - AbstractBreaker.log.debug("Column balancing necessary for the next element list!!!"); + AbstractBreaker.log.debug( + "Column balancing necessary for the next element list!!!"); } return nextSequenceStartsOn; } @@ -321,7 +322,8 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager { } else { newStartPos = 0; } - AbstractBreaker.log.debug("Restarting at " + restartPoint + ", new start position: " + newStartPos); + AbstractBreaker.log.debug("Restarting at " + restartPoint + + ", new start position: " + newStartPos); //Handle page break right here to avoid any side-effects handleBreakTrait(EN_PAGE); @@ -623,7 +625,7 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager { } else if (breakVal == Constants.EN_NONE) { curPV.createSpan(false); return; - } else if (breakVal == Constants.EN_COLUMN || breakVal == -1) { + } else if (breakVal == Constants.EN_COLUMN || breakVal <= 0) { if (curPV.getCurrentSpan().hasMoreFlows()) { curPV.getCurrentSpan().moveToNextFlow(); } else { diff --git a/test/layoutengine/standard-testcases/region-body_column-count_bug37468.xml b/test/layoutengine/standard-testcases/region-body_column-count_bug37468.xml new file mode 100644 index 000000000..9055b63d4 --- /dev/null +++ b/test/layoutengine/standard-testcases/region-body_column-count_bug37468.xml @@ -0,0 +1,130 @@ + + + + + +

+ This test checks multi-column documents. Checks a problem described in Bugzilla #37468. + A table that was broken in multiple parts started a new page after each break possibility + instead of changing to the next flow area. +

+
+ + + + + + + + + + + + + + + + r1 c1 + + + r1 c2 + + + + + r2 c1 + + + r2 c2 + + + + + r3 c1 + + + r3 c2 + + + + + r4 c1 + + + r4 c2 + + + + + r5 c1 + + + r5 c2 + + + + + r6 c1 + + + r6 c2 + + + + + r7 c1 + + + r7 c2 + + + + + r8 c1 + + + r8 c2 + + + + + r9 c1 + + + r9 c2 + + + + + r10 c1 + + + r10 c2 + + + + + + + + + + + + + +
-- 2.39.5