diff options
author | Simon Pepping <spepping@apache.org> | 2007-04-03 19:40:14 +0000 |
---|---|---|
committer | Simon Pepping <spepping@apache.org> | 2007-04-03 19:40:14 +0000 |
commit | 894074229cae709ed7cd6d178e5966b46be72f64 (patch) | |
tree | 245963881c0285696d9254669e9d12e60bca55fb /src/java | |
parent | 6c1e613e650c77d67b1c2a6855a5e8dc46d71e01 (diff) | |
download | xmlgraphics-fop-894074229cae709ed7cd6d178e5966b46be72f64.tar.gz xmlgraphics-fop-894074229cae709ed7cd6d178e5966b46be72f64.zip |
Allow for the case where a block-container occurs inside an inline
FO. This solves bug 42024.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@525253 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java index e63345f77..117893304 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java @@ -34,6 +34,7 @@ import org.apache.fop.area.Trait; import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.BlockContainer; import org.apache.fop.fo.properties.CommonAbsolutePosition; +import org.apache.fop.layoutmgr.inline.InlineLayoutManager; import org.apache.fop.area.CTM; import org.apache.fop.datatypes.FODimension; import org.apache.fop.datatypes.Length; @@ -989,9 +990,12 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager */ public boolean mustKeepTogether() { //TODO Keeps will have to be more sophisticated sooner or later - return ((BlockLevelLayoutManager)getParent()).mustKeepTogether() - || !getBlockContainerFO().getKeepTogether().getWithinPage().isAuto() - || !getBlockContainerFO().getKeepTogether().getWithinColumn().isAuto(); + return (!getBlockContainerFO().getKeepTogether().getWithinPage().isAuto() + || !getBlockContainerFO().getKeepTogether().getWithinColumn().isAuto() + || (getParent() instanceof BlockLevelLayoutManager + && ((BlockLevelLayoutManager) getParent()).mustKeepTogether()) + || (getParent() instanceof InlineLayoutManager + && ((InlineLayoutManager) getParent()).mustKeepTogether())); } /** |