From afdf427804303fe997a3928709fcf222e1d7244a Mon Sep 17 00:00:00 2001 From: Simon Steiner Date: Wed, 7 Aug 2019 08:58:21 +0000 Subject: FOP-2877: Table row was inside footer git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1864605 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/layoutmgr/table/TableStepper.java | 3 +- .../standard-testcases/table_border_padding_3.xml | 2 +- .../standard-testcases/table_border_padding_4.xml | 664 +++++++++++++++++++++ .../standard-testcases/table_border_padding_5.xml | 274 +++++++++ .../standard-testcases/table_bug44621.xml | 2 +- 5 files changed, 942 insertions(+), 3 deletions(-) create mode 100644 fop/test/layoutengine/standard-testcases/table_border_padding_4.xml create mode 100644 fop/test/layoutengine/standard-testcases/table_border_padding_5.xml diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableStepper.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableStepper.java index 1d41d6cf1..ff38d692e 100644 --- a/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableStepper.java +++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableStepper.java @@ -34,6 +34,7 @@ import org.apache.fop.layoutmgr.BreakElement; import org.apache.fop.layoutmgr.Keep; import org.apache.fop.layoutmgr.KnuthBlockBox; import org.apache.fop.layoutmgr.KnuthBox; +import org.apache.fop.layoutmgr.KnuthElement; import org.apache.fop.layoutmgr.KnuthGlue; import org.apache.fop.layoutmgr.KnuthPenalty; import org.apache.fop.layoutmgr.LayoutContext; @@ -275,7 +276,7 @@ public class TableStepper { step = getNextStep(); if (penaltyOrGlueLen < 0) { - if (step < 0) { + if (keep.getPenalty() == KnuthElement.INFINITE) { returnList.add(new KnuthGlue(0, -penaltyOrGlueLen, 0, new Position(null), true)); } else { returnList.add(new KnuthGlue(-penaltyOrGlueLen, 0, 0, new Position(null), true)); diff --git a/fop/test/layoutengine/standard-testcases/table_border_padding_3.xml b/fop/test/layoutengine/standard-testcases/table_border_padding_3.xml index 38a744bb0..7fb15a244 100644 --- a/fop/test/layoutengine/standard-testcases/table_border_padding_3.xml +++ b/fop/test/layoutengine/standard-testcases/table_border_padding_3.xml @@ -76,6 +76,6 @@ - + diff --git a/fop/test/layoutengine/standard-testcases/table_border_padding_4.xml b/fop/test/layoutengine/standard-testcases/table_border_padding_4.xml new file mode 100644 index 000000000..26387f4e5 --- /dev/null +++ b/fop/test/layoutengine/standard-testcases/table_border_padding_4.xml @@ -0,0 +1,664 @@ + + + + + +

+ This test checks border and padding conditionality on table. +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Date + + + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/fop/test/layoutengine/standard-testcases/table_border_padding_5.xml b/fop/test/layoutengine/standard-testcases/table_border_padding_5.xml new file mode 100644 index 000000000..748fea1cc --- /dev/null +++ b/fop/test/layoutengine/standard-testcases/table_border_padding_5.xml @@ -0,0 +1,274 @@ + + + + + +

+ This test checks border and padding conditionality on table. +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Spread the cost with no extra charge + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Monthly/QuarterlyDirect Debit + + + + + Quarterly Credit/Debit Card + + + + + Annual DirectDebit + + + + + Annual Credit/Debit Card + + + + + Credit/Debit Card + + + + + Cheque + + + + + + + + + + + + + + + + Free + - we won't charge you any extra in the coming policy year + + + + + + + + + + + + + + + + + Convenient + - never miss payments + + + + + + + + + + + + + + + + + You're always covered + - even if you're away at your renewal date + + + + + + + + + + + + + + + + + Extra security + - payments are backed by the Direct Debit Guarantee + + + + + + + + + + + + + + + + + Easy to budget + - spread the payments + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + As a 1234 customer, you are eligible to join our free membership programme called Possibilities. Possibilities brings you VIP experiences and exclusive access to events and great offers. For more information and to join Possibilities, simply speak to our advisers when you call to renew or visit 1234.co.uk/membership + + + + + + + + + + + + + + + +
diff --git a/fop/test/layoutengine/standard-testcases/table_bug44621.xml b/fop/test/layoutengine/standard-testcases/table_bug44621.xml index f97b8756f..ae04d1903 100644 --- a/fop/test/layoutengine/standard-testcases/table_bug44621.xml +++ b/fop/test/layoutengine/standard-testcases/table_bug44621.xml @@ -132,7 +132,7 @@ 6 - + 3 -- cgit v1.2.3