diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-02-06 14:07:03 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-02-06 14:07:03 +0000 |
commit | 448befc115b005dc2a07391182179c686a91d25f (patch) | |
tree | b658d79ef2bbd433580a089758d5ecb945c52166 /src/java/org/apache/fop/area/Block.java | |
parent | 36c62fb27612261f81eb8de02f1754a3d662cea4 (diff) | |
download | xmlgraphics-fop-448befc115b005dc2a07391182179c686a91d25f.tar.gz xmlgraphics-fop-448befc115b005dc2a07391182179c686a91d25f.zip |
Bugzilla #36391:
Fixed problem with positioning of content when reference-orientation="180" is used. CTM is now correct. It is updated after the height of the content is known. Instead of somehow inverting the element list, I've simply declared this case non-breakable, i.e. I generate one box.
Fixed a few other problems mostly occurring when rotating block-container content by 90 or 270 degrees plus a few remaining auto-height handling problems. This involved switching off some sometimes unwanted side-effects from auto-updating the BPD in some area classes.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@618992 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/area/Block.java')
-rw-r--r-- | src/java/org/apache/fop/area/Block.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/area/Block.java b/src/java/org/apache/fop/area/Block.java index 264a9e690..21fa7c49d 100644 --- a/src/java/org/apache/fop/area/Block.java +++ b/src/java/org/apache/fop/area/Block.java @@ -19,7 +19,6 @@ package org.apache.fop.area; -import java.util.ArrayList; // block areas hold either more block areas or line // areas can also be used as a block spacer @@ -59,6 +58,8 @@ public class Block extends BlockParent { private int stacking = TB; private int positioning = STACK; + protected transient boolean allowBPDUpdate = true; + // a block with may contain the dominant styling info in // terms of most lines or blocks with info @@ -78,7 +79,7 @@ public class Block extends BlockParent { * @param autoHeight increase the height of the block. */ public void addBlock(Block block, boolean autoHeight) { - if (autoHeight) { + if (autoHeight && allowBPDUpdate) { bpd += block.getAllocBPD(); } addChildArea(block); @@ -113,12 +114,20 @@ public class Block extends BlockParent { } /** + * Indicates whether this block is stacked, rather than absolutely positioned. + * @return true if it is stacked + */ + public boolean isStacked() { + return (getPositioning() == Block.STACK || getPositioning() == Block.RELATIVE); + } + + /** * @return the start-indent trait */ public int getStartIndent() { Integer startIndent = (Integer)getTrait(Trait.START_INDENT); return (startIndent != null ? startIndent.intValue() : 0); } - + } |