aboutsummaryrefslogtreecommitdiffstats
path: root/fop-core/src
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2023-02-21 08:49:47 +0000
committerSimon Steiner <ssteiner@apache.org>2023-02-21 08:49:47 +0000
commit61552a1f108a32b369a9275a368225b8abee2730 (patch)
treef66049fd0a6e1fa6e809c8a9426b050298e335b4 /fop-core/src
parent3cbbfc433707d869a0d407ca9c264ee46a1aab06 (diff)
downloadxmlgraphics-fop-61552a1f108a32b369a9275a368225b8abee2730.tar.gz
xmlgraphics-fop-61552a1f108a32b369a9275a368225b8abee2730.zip
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
Diffstat (limited to 'fop-core/src')
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java13
1 files changed, 8 insertions, 5 deletions
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<Position> positionList) {
+ if (!positionList.isEmpty() || pos.getLM() != null) {
+ positionList.add(pos);
+ }
+ }
}