aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/PageBreaker.java
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2009-08-26 18:50:10 +0000
committerVincent Hennebert <vhennebert@apache.org>2009-08-26 18:50:10 +0000
commitbcfda76c15640c34c91f2d8e29d85b9326ab8d25 (patch)
tree8ebab128378a36a84ddd450063a402ff2b6841e5 /src/java/org/apache/fop/layoutmgr/PageBreaker.java
parent9520407736edcb4389c1418b70e0f7f376d7bd85 (diff)
downloadxmlgraphics-fop-bcfda76c15640c34c91f2d8e29d85b9326ab8d25.tar.gz
xmlgraphics-fop-bcfda76c15640c34c91f2d8e29d85b9326ab8d25.zip
Merged back ChangingIPDHack branch into Trunk
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@808157 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/PageBreaker.java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/PageBreaker.java35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/PageBreaker.java b/src/java/org/apache/fop/layoutmgr/PageBreaker.java
index ed0b37602..86c3fccf8 100644
--- a/src/java/org/apache/fop/layoutmgr/PageBreaker.java
+++ b/src/java/org/apache/fop/layoutmgr/PageBreaker.java
@@ -77,6 +77,14 @@ public class PageBreaker extends AbstractBreaker {
return pslm.getPageProvider();
}
+ /**
+ * Starts the page breaking process.
+ * @param flowBPD the constant available block-progression-dimension (used for every part)
+ */
+ void doLayout(int flowBPD) {
+ doLayout(flowBPD, false);
+ }
+
/** {@inheritDoc} */
protected PageBreakingLayoutListener createLayoutListener() {
return new PageBreakingLayoutListener() {
@@ -121,6 +129,12 @@ public class PageBreaker extends AbstractBreaker {
/** {@inheritDoc} */
protected int getNextBlockList(LayoutContext childLC,
int nextSequenceStartsOn) {
+ return getNextBlockList(childLC, nextSequenceStartsOn, null, null, null);
+ }
+
+ /** {@inheritDoc} */
+ protected int getNextBlockList(LayoutContext childLC, int nextSequenceStartsOn,
+ Position positionAtIPDChange, LayoutManager restartLM, List firstElements) {
if (!firstPart) {
// if this is the first page that will be created by
// the current BlockSequence, it could have a break
@@ -132,7 +146,8 @@ public class PageBreaker extends AbstractBreaker {
pageBreakHandled = true;
pageProvider.setStartOfNextElementList(pslm.getCurrentPageNum(),
pslm.getCurrentPV().getCurrentSpan().getCurrentFlowIndex());
- return super.getNextBlockList(childLC, nextSequenceStartsOn);
+ return super.getNextBlockList(childLC, nextSequenceStartsOn, positionAtIPDChange,
+ restartLM, firstElements);
}
private boolean containsFootnotes(List contentList, LayoutContext context) {
@@ -209,6 +224,24 @@ public class PageBreaker extends AbstractBreaker {
return contentList;
}
+ /** {@inheritDoc} */
+ protected List getNextKnuthElements(LayoutContext context, int alignment,
+ Position positionAtIPDChange, LayoutManager restartAtLM) {
+ List contentList = null;
+
+ do {
+ contentList = childFLM.getNextKnuthElements(context, alignment, positionAtIPDChange,
+ restartAtLM);
+ } while (!childFLM.isFinished() && contentList == null);
+
+ // scan contentList, searching for footnotes
+ if (containsFootnotes(contentList, context)) {
+ // handle the footnote separator
+ handleFootnoteSeparator();
+ }
+ return contentList;
+ }
+
/**
* @return current display alignment
*/