diff options
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/PageProvider.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/PageProvider.java b/src/java/org/apache/fop/layoutmgr/PageProvider.java index ba35ecb11..bdb313003 100644 --- a/src/java/org/apache/fop/layoutmgr/PageProvider.java +++ b/src/java/org/apache/fop/layoutmgr/PageProvider.java @@ -23,11 +23,12 @@ import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; - import org.apache.fop.area.AreaTreeHandler; import org.apache.fop.area.PageViewport; import org.apache.fop.fo.Constants; import org.apache.fop.fo.pagination.PageSequence; +import org.apache.fop.fo.pagination.Region; +import org.apache.fop.fo.pagination.RegionBody; import org.apache.fop.fo.pagination.SimplePageMaster; /** @@ -304,6 +305,15 @@ public class PageProvider implements Constants { log.debug("blank condition doesn't match. Replacing PageViewport."); replace = true; } + if (page.getPageViewport().getCurrentSpan().getColumnCount() == 1 + && !this.spanAllForCurrentElementList) { + RegionBody rb = (RegionBody)page.getSimplePageMaster().getRegion(Region.FO_REGION_BODY); + int colCount = rb.getColumnCount(); + if (colCount > 1) { + log.debug("Span doesn't match. Replacing PageViewport."); + replace = true; + } + } if ((isLastPage && indexOfCachedLastPage != intIndex) || (!isLastPage && indexOfCachedLastPage >= 0)) { log.debug("last page condition doesn't match. Replacing PageViewport."); |