aboutsummaryrefslogtreecommitdiffstats
path: root/fop-core/src/main
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2024-04-15 14:54:14 +0100
committerSimon Steiner <ssteiner@apache.org>2024-04-15 14:54:14 +0100
commit7b29d1d1354f07a5e2914c0f2711d50f7c2ff967 (patch)
treea2471a2c788fe58039c15fd7933a12d4fab2b099 /fop-core/src/main
parent1484cf87fea058f6908d57491dfde439cb9bec4b (diff)
downloadxmlgraphics-fop-7b29d1d1354f07a5e2914c0f2711d50f7c2ff967.tar.gz
xmlgraphics-fop-7b29d1d1354f07a5e2914c0f2711d50f7c2ff967.zip
FOP-3177: Remove space generated by fo:wrapper
Diffstat (limited to 'fop-core/src/main')
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/inline/WrapperLayoutManager.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/WrapperLayoutManager.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/WrapperLayoutManager.java
index ff2c59f4a..c6a2b05b2 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/WrapperLayoutManager.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/WrapperLayoutManager.java
@@ -19,6 +19,9 @@
package org.apache.fop.layoutmgr.inline;
+import java.util.Collections;
+import java.util.List;
+
import org.apache.fop.area.Block;
import org.apache.fop.area.inline.InlineArea;
import org.apache.fop.fo.flow.Wrapper;
@@ -87,4 +90,11 @@ public class WrapperLayoutManager extends LeafNodeLayoutManager {
getPSLM().addIDToPage(fobj.getId());
}
+ public List getNextKnuthElements(LayoutContext context, int alignment) {
+ List list = super.getNextKnuthElements(context, alignment);
+ if (parentLayoutManager instanceof LineLayoutManager && !fobj.hasId() && fobj.hasChildren()) {
+ return Collections.emptyList();
+ }
+ return list;
+ }
}