From 61dde65391fd7e6335aca8e97018204c4321b348 Mon Sep 17 00:00:00 2001 From: Luis Bernardo Date: Wed, 26 Nov 2014 13:30:11 +0000 Subject: [PATCH] handle lists when ipd changes across pages git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_BasicSideFloats@1641813 13f79535-47bb-0310-9956-ffa450edef68 --- .../list/ListBlockLayoutManager.java | 4 + .../layoutmgr/list/ListItemLayoutManager.java | 5 + .../flow_changing-ipd_4.xml | 9 +- .../flow_changing-ipd_5.xml | 142 ++++++++++++++++++ 4 files changed, 155 insertions(+), 5 deletions(-) create mode 100644 test/layoutengine/standard-testcases/flow_changing-ipd_5.xml diff --git a/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java b/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java index a0af4fd44..d39b63477 100644 --- a/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java @@ -277,5 +277,9 @@ public class ListBlockLayoutManager extends SpacedBorderedPaddedBlockLayoutManag return getListBlockFO().getKeepWithNext(); } + /** {@inheritDoc} */ + public boolean isRestartable() { + return true; + } } diff --git a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java index d29dba20b..ba49b7dc0 100644 --- a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java @@ -786,5 +786,10 @@ public class ListItemLayoutManager extends SpacedBorderedPaddedBlockLayoutManage breakBefore = BreakUtil.compareBreakClasses(breakBefore, body.getBreakBefore()); return breakBefore; } + + /** {@inheritDoc} */ + public boolean isRestartable() { + return true; + } } diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_4.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_4.xml index fe166d05c..4b0aea093 100644 --- a/test/layoutengine/standard-testcases/flow_changing-ipd_4.xml +++ b/test/layoutengine/standard-testcases/flow_changing-ipd_4.xml @@ -19,8 +19,7 @@

- This test checks that non-restartable elements still show up at IPD change, even if not - re-laid out. + This test checks that a list can be relaid out when a change in ipd happens across pages.

@@ -140,13 +139,13 @@ - + - + + xpath="//pageSequence[2]/pageViewport[2]//flow/block[1]/block/block[2]/block/lineArea[3]/text/word[position()=last()]"/> diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_5.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_5.xml new file mode 100644 index 000000000..a027ff108 --- /dev/null +++ b/test/layoutengine/standard-testcases/flow_changing-ipd_5.xml @@ -0,0 +1,142 @@ + + + + + +

+ This test checks that a list can be relaid out when a change in ipd happens across pages. +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + (a) + + + +In olden times when wishing still helped one, there lived a king whose daughters were all beautiful, but the youngest was so beautiful that the sun itself, which has seen so much, was astonished whenever it shone in her face. + + + + + + (a) + + + +In olden times when wishing still helped one, there lived a king whose daughters were all beautiful, but the youngest was so beautiful that the sun itself, which has seen so much, was astonished whenever it shone in her face. + + + + + + (a) + + + +In olden times when wishing still helped one, there lived a king whose daughters were all beautiful, but the youngest was so beautiful that the sun itself, which has seen so much, was astonished whenever it shone in her face. + + + + + + (a) + + + +In olden times when wishing still helped one, there lived a king whose daughters were all beautiful, but the youngest was so beautiful that the sun itself, which has seen so much, was astonished whenever it shone in her face. + + + + + + (a) + + + +In olden times when wishing still helped one, there lived a king whose daughters were all beautiful, but the youngest was so beautiful that the sun itself, which has seen so much, was astonished whenever it shone in her face. + + + + + + (a) + + + +In olden times when wishing still helped one, there lived a king whose daughters were all beautiful, but the youngest was so beautiful that the sun itself, which has seen so much, was astonished whenever it shone in her face. + + + + + + (a) + + + +In olden times when wishing still helped one, there lived a king whose daughters were all beautiful, but the youngest was so beautiful that the sun itself, which has seen so much, was astonished whenever it shone in her face. + + + + + + (a) + + + +In olden times when wishing still helped one, there lived a king whose daughters were all beautiful, but the youngest was so beautiful that the sun itself, which has seen so much, was astonished whenever it shone in her face. + + + + + + + + + + + + + + + + +
-- 2.39.5