aboutsummaryrefslogtreecommitdiffstats
path: root/fop-core
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2024-07-19 13:45:33 +0100
committerSimon Steiner <ssteiner@apache.org>2024-07-19 13:45:33 +0100
commitf9404c6f4a07e15a45f00db456f55259844a960c (patch)
tree2297abc2fb7c6fc1ee2ab3f49e21617ff55d880b /fop-core
parenteb335e3f4be1670ef58a608f492f97f6c566c824 (diff)
downloadxmlgraphics-fop-f9404c6f4a07e15a45f00db456f55259844a960c.tar.gz
xmlgraphics-fop-f9404c6f4a07e15a45f00db456f55259844a960c.zip
FOP-3192: Redo layout for multipage columns for change in column count
Diffstat (limited to 'fop-core')
-rw-r--r--fop-core/src/main/java/org/apache/fop/layoutmgr/PageBreaker.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/PageBreaker.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/PageBreaker.java
index d95bd3c48..3f90d033a 100644
--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/PageBreaker.java
+++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/PageBreaker.java
@@ -621,6 +621,7 @@ public class PageBreaker extends AbstractBreaker {
&& pv.getCurrentSpan().getColumnCount() == 1);
if (forceNewPageWithSpan) {
+ checkPagePositionOnly();
log.trace("Forcing new page with span");
curPage = pslm.makeNewPage(false);
curPage.getPageViewport().createSpan(true);
@@ -632,10 +633,7 @@ public class PageBreaker extends AbstractBreaker {
log.trace("Moving to next flow");
pv.getCurrentSpan().moveToNextFlow();
} else {
- if (pslm.getCurrentPage().isPagePositionOnly
- && !pslm.fobj.getUserAgent().isLegacySkipPagePositionOnly()) {
- throw new PagePositionOnlyException();
- }
+ checkPagePositionOnly();
log.trace("Making new page");
pslm.makeNewPage(false, emptyContent);
}
@@ -647,14 +645,22 @@ public class PageBreaker extends AbstractBreaker {
}
}
+ private void checkPagePositionOnly() {
+ if (pslm.getCurrentPage().isPagePositionOnly && !pslm.fobj.getUserAgent().isLegacySkipPagePositionOnly()) {
+ throw new PagePositionOnlyException();
+ }
+ }
+
private void handleBreakBeforeFollowingPage(int breakVal) {
log.debug("handling break-before after page " + pslm.getCurrentPageNum() + " breakVal="
+ getBreakClassName(breakVal));
if (needBlankPageBeforeNew(breakVal)) {
+ checkPagePositionOnly();
log.trace("Inserting blank page");
/* curPage = */pslm.makeNewPage(true);
}
if (needNewPage(breakVal)) {
+ checkPagePositionOnly();
log.trace("Making new page");
/* curPage = */pslm.makeNewPage(false);
}