diff options
author | Luca Furini <lfurini@apache.org> | 2005-05-31 16:19:29 +0000 |
---|---|---|
committer | Luca Furini <lfurini@apache.org> | 2005-05-31 16:19:29 +0000 |
commit | 2f75a4659d2cfe7f61f5a98521031d81cfb02c56 (patch) | |
tree | 766fe35c1daf4e0525c66d68b8d80aaa6989c0a5 /src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java | |
parent | 319ace2424682be5db5ddbf83b78ceb517fb916d (diff) | |
download | xmlgraphics-fop-2f75a4659d2cfe7f61f5a98521031d81cfb02c56.tar.gz xmlgraphics-fop-2f75a4659d2cfe7f61f5a98521031d81cfb02c56.zip |
Handling page dependent footnote separator
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198710 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java b/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java index 16914757e..613f17a75 100644 --- a/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java @@ -172,8 +172,8 @@ public class StaticContentLayoutManager extends BlockStackingLayoutManager { if (getStaticContentFO().getFlowName().equals("xsl-footnote-separator")) { targetBlock.addBlock((Block)childArea); } else { - targetRegion.addBlock((Block)childArea); - } + targetRegion.addBlock((Block)childArea); + } } /** @@ -183,19 +183,33 @@ public class StaticContentLayoutManager extends BlockStackingLayoutManager { if (getStaticContentFO().getFlowName().equals("xsl-footnote-separator")) { return targetBlock; } else { - return targetRegion; - } + return targetRegion; + } } /** * Does the layout for a side region. Called by PageSequenceLayoutManager. */ public void doLayout() { - StaticContentBreaker breaker = new StaticContentBreaker( - this, targetRegion.getIPD(), regionFO.getDisplayAlign()); - breaker.doLayout(targetRegion.getBPD()); + int targetIPD = 0; + int targetBPD = 0; + int targetAlign = EN_AUTO; + StaticContentBreaker breaker; + + if (getStaticContentFO().getFlowName().equals("xsl-footnote-separator")) { + targetIPD = targetBlock.getIPD(); + targetBPD = targetBlock.getBPD(); + targetAlign = EN_BEFORE; + } else { + targetIPD = targetRegion.getIPD(); + targetBPD = targetRegion.getBPD(); + targetAlign = regionFO.getDisplayAlign(); + } + breaker = new StaticContentBreaker(this, targetIPD, targetAlign); + breaker.doLayout(targetBPD); if (breaker.isOverflow()) { - if (regionFO.getOverflow() == EN_ERROR_IF_OVERFLOW) { + if (!getStaticContentFO().getFlowName().equals("xsl-footnote-separator") + && regionFO.getOverflow() == EN_ERROR_IF_OVERFLOW) { //TODO throw layout exception } log.warn("static-content overflows the available area."); |