From: Simon Steiner Date: Tue, 21 Feb 2023 08:49:47 +0000 (+0000) Subject: FOP-3118: Text missing after page break inside table inline X-Git-Tag: 2_9~35 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=61552a1f108a32b369a9275a368225b8abee2730;p=xmlgraphics-fop.git FOP-3118: Text missing after page break inside table inline git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1907782 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java index e341078de..5d01c6f75 100644 --- a/fop-core/src/main/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java +++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java @@ -67,13 +67,13 @@ public final class AreaAdditionUtil { } if (pos instanceof NonLeafPosition && pos.getPosition() != null) { // pos was created by a child of this FlowLM - positionList.add(pos.getPosition()); - lastLM = (pos.getPosition().getLM()); + add(pos.getPosition(), positionList); + lastLM = pos.getPosition().getLM(); if (firstLM == null) { firstLM = lastLM; } } else if (pos instanceof SpaceHandlingBreakPosition) { - positionList.add(pos); + add(pos, positionList); } else { // pos was created by this LM, so it must be ignored } @@ -119,8 +119,11 @@ public final class AreaAdditionUtil { parentLM.isFirst(firstPos), parentLM.isLast(lastPos)); } - - } + private static void add(Position pos, LinkedList positionList) { + if (!positionList.isEmpty() || pos.getLM() != null) { + positionList.add(pos); + } + } } diff --git a/fop/test/layoutengine/standard-testcases/table-inline-pagebreak.xml b/fop/test/layoutengine/standard-testcases/table-inline-pagebreak.xml new file mode 100644 index 000000000..3b8cc52f0 --- /dev/null +++ b/fop/test/layoutengine/standard-testcases/table-inline-pagebreak.xml @@ -0,0 +1,57 @@ + + + + + +

+ This test checks table inline page break +

+
+ + + + + + + + + + + + + + + + + + This is an example of a Table + + + + + + + + + + + + + + +