From: Vincent Hennebert Date: Tue, 22 Mar 2011 14:55:21 +0000 (+0000) Subject: Bugfix: keep-together does not apply to fo:table-cell X-Git-Tag: fop-1_1rc1old~257 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=823d0e968d25875f9774f62f2f5264863cb35ba9;p=xmlgraphics-fop.git Bugfix: keep-together does not apply to fo:table-cell git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1084205 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java index ded18384d..d5f259b38 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java @@ -553,12 +553,8 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager /** {@inheritDoc} */ public Keep getKeepTogether() { - Keep keep = Keep.KEEP_AUTO; - if (primaryGridUnit.getRow() != null) { - keep = Keep.getKeep(primaryGridUnit.getRow().getKeepTogether()); - } - keep = keep.compare(getParentKeepTogether()); - return keep; + // keep-together does not apply to fo:table-cell + return Keep.KEEP_AUTO; } /** {@inheritDoc} */ diff --git a/status.xml b/status.xml index 337164b31..304c08173 100644 --- a/status.xml +++ b/status.xml @@ -59,6 +59,9 @@ documents. Example: the fix of marks layering will be such a case when it's done. --> + + Bugfix: keep-together does not apply to fo:table-cell. + Bugfix: keep-together on a table containing row-spanning cells was not honored. diff --git a/test/layoutengine/standard-testcases/table-row_keep-together.xml b/test/layoutengine/standard-testcases/table-row_keep-together.xml index 0cf04bf37..73a334c6d 100644 --- a/test/layoutengine/standard-testcases/table-row_keep-together.xml +++ b/test/layoutengine/standard-testcases/table-row_keep-together.xml @@ -55,7 +55,7 @@ - + diff --git a/test/layoutengine/standard-testcases/table-row_keep-together_2.xml b/test/layoutengine/standard-testcases/table-row_keep-together_2.xml index 0e2867b2e..db75e4063 100644 --- a/test/layoutengine/standard-testcases/table-row_keep-together_2.xml +++ b/test/layoutengine/standard-testcases/table-row_keep-together_2.xml @@ -128,6 +128,38 @@ + + + + 4. 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 + + + + + After the table + + + @@ -199,5 +231,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/layoutengine/standard-testcases/table-row_keep-with-next2.xml b/test/layoutengine/standard-testcases/table-row_keep-with-next2.xml index 3b3b89384..845744e85 100644 --- a/test/layoutengine/standard-testcases/table-row_keep-with-next2.xml +++ b/test/layoutengine/standard-testcases/table-row_keep-with-next2.xml @@ -60,7 +60,9 @@ - + + + 3 diff --git a/test/layoutengine/standard-testcases/table_keep-together.xml b/test/layoutengine/standard-testcases/table_keep-together.xml index a904a144a..927ea64e6 100644 --- a/test/layoutengine/standard-testcases/table_keep-together.xml +++ b/test/layoutengine/standard-testcases/table_keep-together.xml @@ -92,7 +92,7 @@ - + @@ -114,7 +114,7 @@ - +