From 2a5bfd2d0a1020ae90bae8c4cc11dad324ecb391 Mon Sep 17 00:00:00 2001 From: Joerg Pietschmann Date: Sat, 27 Jul 2002 10:50:18 +0000 Subject: [PATCH] Check whether there is a flow in a page sequence. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain@195030 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/fo/pagination/PageSequence.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/org/apache/fop/fo/pagination/PageSequence.java b/src/org/apache/fop/fo/pagination/PageSequence.java index fa6dfd5d0..32e5990e6 100644 --- a/src/org/apache/fop/fo/pagination/PageSequence.java +++ b/src/org/apache/fop/fo/pagination/PageSequence.java @@ -202,6 +202,9 @@ public class PageSequence extends FObj { * Runs the formatting of this page sequence into the given area tree */ public void format(AreaTree areaTree) throws FOPException { + if (flow == null) { + throw new FOPException("No flow in page-sequence"); + } PageSequence previousPageSequence=this.root.getPageSequence(); if( previousPageSequence!=null ) { if (previousPageSequence.forcePageCountType == ForcePageCount.AUTO) { @@ -310,11 +313,11 @@ public class PageSequence extends FObj { * @return a Page layout object based on the page master selected from the params */ private Page makePage(AreaTree areaTree, - boolean isBlankPage, - Page currentPage) + boolean isBlankPage, + Page currentPage) throws FOPException { if (this.pageSequenceMaster!=null) { - this.currentSimplePageMaster=this.pageSequenceMaster + this.currentSimplePageMaster = this.pageSequenceMaster .getNextSimplePageMaster(((this.currentPageNumber % 2)==1), isBlankPage); Region region = currentSimplePageMaster -- 2.39.5