From f8933ed37b48add7bc870a5b80e74dfaabdb55b5 Mon Sep 17 00:00:00 2001 From: Simon Steiner Date: Mon, 9 Feb 2015 09:53:37 +0000 Subject: [PATCH] FOP-2447: Text cut off for changing IPD for page starting with a table git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1658340 13f79535-47bb-0310-9956-ffa450edef68 --- .../layoutmgr/table/TableLayoutManager.java | 4 +- .../flow_changing-ipd_break-before-table.xml | 2 +- .../flow_changing-ipd_break-before-table2.xml | 68 +++++++++++++++++++ 3 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table2.xml diff --git a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java index e343d72f3..ea6cb2b22 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java @@ -296,7 +296,7 @@ public class TableLayoutManager extends SpacedBorderedPaddedBlockLayoutManager int breakBefore = BreakUtil.compareBreakClasses(getTable().getBreakBefore(), childLC.getBreakBefore()); if (breakBefore != Constants.EN_AUTO) { - returnList.add(0, new BreakElement(getAuxiliaryPosition(), 0, + returnList.add(0, new BreakElement(new LeafPosition(getParent(), 0), 0, -KnuthElement.INFINITE, breakBefore, context)); } } @@ -305,7 +305,7 @@ public class TableLayoutManager extends SpacedBorderedPaddedBlockLayoutManager int breakAfter = BreakUtil.compareBreakClasses(getTable().getBreakAfter(), childLC.getBreakAfter()); if (breakAfter != Constants.EN_AUTO) { - returnList.add(new BreakElement(getAuxiliaryPosition(), + returnList.add(new BreakElement(new LeafPosition(getParent(), 0), 0, -KnuthElement.INFINITE, breakAfter, context)); } diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table.xml index 11496f80e..bbba1b565 100644 --- a/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table.xml +++ b/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table.xml @@ -68,7 +68,7 @@ - + diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table2.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table2.xml new file mode 100644 index 000000000..a88a1cc07 --- /dev/null +++ b/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table2.xml @@ -0,0 +1,68 @@ + + + + + +

+ Bugfix: +

+
+ + + + + + + + + + + + + + + + + + + + Before the table + + + + + + + Investment details + + + + + + + + + + + + + + + + +
-- 2.39.5