From: Simon Steiner Date: Fri, 24 Jun 2016 13:10:48 +0000 (+0000) Subject: FOP-2614: Image missing on change IPD X-Git-Tag: fop-2_2~61 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7c20b1bac93b712db6caeb5152e496aea9cb9910;p=xmlgraphics-fop.git FOP-2614: Image missing on change IPD git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1750085 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/AbstractBreaker.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/AbstractBreaker.java index cc598ff88..36dd6f407 100644 --- a/fop-core/src/main/java/org/apache/fop/layoutmgr/AbstractBreaker.java +++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/AbstractBreaker.java @@ -430,10 +430,13 @@ public abstract class AbstractBreaker { firstElementsForRestart = null; LayoutManager restartAtLM = getRestartAtLM(alg, ipdChangesOnNextPage, onLastPageAndIPDChanges, visitedBefore, blockList, 1); - if (restartAtLM == null) { + if (restartAtLM == null || restartAtLM.getChildLMs().isEmpty()) { firstElementsForRestart = null; - restartAtLM = getRestartAtLM(alg, ipdChangesOnNextPage, onLastPageAndIPDChanges, + LayoutManager restartAtLM2 = getRestartAtLM(alg, ipdChangesOnNextPage, onLastPageAndIPDChanges, visitedBefore, blockList, 0); + if (restartAtLM2 != null) { + restartAtLM = restartAtLM2; + } } if (ipdChangesOnNextPage) { addAreas(alg, optimalPageCount, blockList, blockList); diff --git a/fop/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_12.xml b/fop/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_12.xml new file mode 100644 index 000000000..10fb45e5a --- /dev/null +++ b/fop/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_12.xml @@ -0,0 +1,64 @@ + + + + + +

+ This test checks that the definition of a special page-master for the last page with a + different width that the previous "rest" page causes FOP to redo the line breaking layout. +

+
+ + + + + + + + + + + + + + + + + + + + + + + + TO DO: Type your text here... + + + + + + + + + + + + + + +