aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/area/PageViewport.java2
-rw-r--r--src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java31
2 files changed, 8 insertions, 25 deletions
diff --git a/src/java/org/apache/fop/area/PageViewport.java b/src/java/org/apache/fop/area/PageViewport.java
index 783461cb4..2f1f7786d 100644
--- a/src/java/org/apache/fop/area/PageViewport.java
+++ b/src/java/org/apache/fop/area/PageViewport.java
@@ -33,7 +33,6 @@ import org.apache.commons.logging.LogFactory;
import org.apache.fop.fo.Constants;
import org.apache.fop.fo.pagination.SimplePageMaster;
-import org.apache.fop.layoutmgr.StaticContentLayoutManager;
/**
* Page viewport that specifies the viewport area and holds the page contents.
@@ -85,6 +84,7 @@ public class PageViewport implements Resolvable, Cloneable {
pageNumberString = pageStr;
viewArea = new Rectangle(0, 0, pageWidth, pageHeight);
page = new Page(spm);
+ createSpan(false);
}
/**
diff --git a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
index 04038e011..7ce12edab 100644
--- a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
@@ -75,12 +75,6 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager {
*/
private FlowLayoutManager childFLM = null;
- /**
- * The collection of StaticContentLayoutManager objects that
- * are associated with this Page Sequence, keyed by flow-name.
- */
- //private HashMap staticContentLMs = new HashMap(4);
-
private int startPageNum = 0;
private int currentPageNum = 0;
@@ -107,9 +101,10 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager {
}
/**
- * Start the layout of this page sequence.
- * This completes the layout of the page sequence
- * which creates and adds all the pages to the area tree.
+ * Activate the layout of this page sequence.
+ * PageViewports corresponding to each page generated by this
+ * page sequence will be created and sent to the AreaTreeModel
+ * for rendering.
*/
public void activateLayout() {
startPageNum = pageSeq.getStartingPageNumber();
@@ -457,17 +452,10 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager {
throw new IllegalArgumentException("Cannot create page: " + fopex.getMessage());
}
- if (log.isDebugEnabled()) {
- log.debug("[" + curPV.getPageNumberString() + (bIsBlank ? "*" : "") + "]");
- }
-
- curPV.createSpan(false);
+ log.debug("[" + curPV.getPageNumberString() + (bIsBlank ? "*" : "") + "]");
return curPV;
}
- /* TODO: See if can initialize the SCLM's just once for
- * the page sequence, instead of after every page.
- */
private void layoutSideRegion(int regionID) {
SideRegion reg = (SideRegion)curPV.getSPM().getRegion(regionID);
if (reg == null) {
@@ -482,7 +470,6 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager {
getLayoutManagerMaker().makeStaticContentLayoutManager(
this, sc, reg);
lm.doLayout();
- lm.reset(null);
}
private void finishPage() {
@@ -528,12 +515,8 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager {
}
/**
- * If we have already started to layout content on a page,
- * and there is a forced break, see if we need to generate
- * an empty page.
- * Note that if not all content is placed, we aren't sure whether
- * it will flow onto another page or not, so we'd probably better
- * block until the queue of layoutable stuff is empty!
+ * Check if a blank page is needed to accomodate
+ * desired even or odd page number.
* @param breakVal - value of break-before or break-after trait.
*/
private boolean needBlankPageBeforeNew(int breakVal) {