summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Reischenbacher <matthias@apache.org>2015-06-15 14:12:01 +0000
committerMatthias Reischenbacher <matthias@apache.org>2015-06-15 14:12:01 +0000
commitffce682a4f1b507a431eb655b05d57b9e7f6c5a4 (patch)
treef41c40a9ef84378d43cb8270a50861ac640b9094 /src
parent6d1a86e19180438eb3b01b6c7616fdc33901eb06 (diff)
downloadxmlgraphics-fop-ffce682a4f1b507a431eb655b05d57b9e7f6c5a4.tar.gz
xmlgraphics-fop-ffce682a4f1b507a431eb655b05d57b9e7f6c5a4.zip
FOP-2487: replace cached pages if span condition doesn't match
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1685586 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/layoutmgr/PageProvider.java12
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.");