diff options
author | Simon Steiner <ssteiner@apache.org> | 2024-04-15 14:54:14 +0100 |
---|---|---|
committer | Simon Steiner <ssteiner@apache.org> | 2024-04-15 14:54:14 +0100 |
commit | 7b29d1d1354f07a5e2914c0f2711d50f7c2ff967 (patch) | |
tree | a2471a2c788fe58039c15fd7933a12d4fab2b099 /fop-core/src/main | |
parent | 1484cf87fea058f6908d57491dfde439cb9bec4b (diff) | |
download | xmlgraphics-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.java | 10 |
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; + } } |