From fcedea93410031b5a7704e3309dce0a19c4b3de8 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Mon, 19 Nov 2007 18:25:27 +0000 Subject: [PATCH] Bugzilla #43766: breaks generated by the merging algorithm for table rows containing empty cells has always a penalty of 900 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@596390 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/layoutmgr/table/ActiveCell.java | 2 +- status.xml | 4 + .../standard-testcases/table_empty-cells.xml | 101 ++++++++++++++++++ 3 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 test/layoutengine/standard-testcases/table_empty-cells.xml diff --git a/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java b/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java index 22c4f4191..f1769158f 100644 --- a/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java +++ b/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java @@ -251,7 +251,7 @@ class ActiveCell { * @return true if this cell's first step is inferior or equal to the current one */ boolean hasStarted() { - return includedLength > 0; + return includedLength >= 0; } /** diff --git a/status.xml b/status.xml index 20df48aad..5a605f55c 100644 --- a/status.xml +++ b/status.xml @@ -28,6 +28,10 @@ + + Bugfix: breaks generated by the merging algorithm for a table-row containing empty cells had always a + penalty of 900. + Added methods for fo:page-number-citation(-last) in FOEventHandler. diff --git a/test/layoutengine/standard-testcases/table_empty-cells.xml b/test/layoutengine/standard-testcases/table_empty-cells.xml new file mode 100644 index 000000000..9d93aaab0 --- /dev/null +++ b/test/layoutengine/standard-testcases/table_empty-cells.xml @@ -0,0 +1,101 @@ + + + + + +

+ This test checks that tables with empty cells are handled correctly. There was a bug (#43766) + which caused every break possibility of a row containing an empty cell to have a 900 penalty. +

+
+ + + + + + + + + + + + + + + + + + Before the table + + + + + + Cell 1.1 + Cell 1.1 + Cell 1.1 + + + + + + + Cell 2.1 + Cell 2.2 + + + Cell 3.1 + Cell 3.2 + + + Cell 4.1 + Cell 4.2 + + + Cell 5.1 + Cell 5.2 + + + Cell 6.1 + Cell 6.2 + + + + + + + + + + + + 6 + + + + + + + + + 16 + + +
-- 2.39.5