From 7594480319beef01b3c3d6b757b2c8aa53b6ae2e Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Thu, 14 Feb 2008 12:09:05 +0000 Subject: [PATCH] break-after set on the last child of a row-spanning cell must apply to the last row spanned by the cell git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@627721 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/fo/flow/table/EffRow.java | 2 +- .../table-cell_row-span_breaks.xml | 91 +++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/fo/flow/table/EffRow.java b/src/java/org/apache/fop/fo/flow/table/EffRow.java index ac99a1d37..7989f3d9d 100644 --- a/src/java/org/apache/fop/fo/flow/table/EffRow.java +++ b/src/java/org/apache/fop/fo/flow/table/EffRow.java @@ -197,7 +197,7 @@ public class EffRow { int breakAfter = Constants.EN_AUTO; for (Iterator iter = gridUnits.iterator(); iter.hasNext();) { GridUnit gu = (GridUnit) iter.next(); - if (gu.isPrimary()) { + if (!gu.isEmpty() && gu.getColSpanIndex() == 0 && gu.isLastGridUnitRowSpan()) { breakAfter = BreakUtil.compareBreakClasses(breakAfter, gu.getPrimary().getBreakAfter()); } diff --git a/test/layoutengine/standard-testcases/table-cell_row-span_breaks.xml b/test/layoutengine/standard-testcases/table-cell_row-span_breaks.xml index f00d9894d..8f146ece5 100644 --- a/test/layoutengine/standard-testcases/table-cell_row-span_breaks.xml +++ b/test/layoutengine/standard-testcases/table-cell_row-span_breaks.xml @@ -97,6 +97,49 @@ + + + + + Before the table + + + + + + Cell 1.1 Line 1 + Cell 1.1 Line 2 + Cell 1.1 Line 3 + + + Cell 1.2 Line 1 + Cell 1.2 Line 2 + + + + + Cell 2.2 Line 1 + Cell 2.2 Line 2 + + + + + Cell 3.1 Line 1 + Cell 3.1 Line 2 + + + Cell 3.2 Line 1 + Cell 3.2 Line 2 + + + + + After the table + + + @@ -193,5 +236,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.39.5