From a005ac2471d128d09efcfd6f6492a585c0b534c1 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 22 Jan 2007 22:33:42 +0000 Subject: [PATCH] Bugzilla #41426: Fix for ClassCastException when fo:wrapper was used as direct child of fo:flow. Note: "id" attributes are still not handled properly on fo:wrapper! Submitted by: Adrian Cumiskey git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@498835 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/layoutmgr/FlowLayoutManager.java | 4 +- status.xml | 4 ++ test/layoutengine/disabled-testcases.xml | 9 ++-- .../standard-testcases/wrapper_block_id.xml | 49 +++++++++++++++++++ 4 files changed, 59 insertions(+), 7 deletions(-) create mode 100644 test/layoutengine/standard-testcases/wrapper_block_id.xml diff --git a/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java b/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java index 831423838..e8f635311 100644 --- a/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java @@ -69,11 +69,11 @@ public class FlowLayoutManager extends BlockStackingLayoutManager int flowBPD = (int) getCurrentPV().getBodyRegion().getBPD(); // currently active LM - BlockLevelLayoutManager curLM; + LayoutManager curLM; LinkedList returnedList; LinkedList returnList = new LinkedList(); - while ((curLM = ((BlockLevelLayoutManager) getChildLM())) != null) { + while ((curLM = getChildLM()) != null) { if (curLM instanceof InlineLevelLayoutManager) { log.error("inline area not allowed under flow - ignoring"); curLM.setFinished(true); diff --git a/status.xml b/status.xml index b91fbc1f4..1527275c1 100644 --- a/status.xml +++ b/status.xml @@ -28,6 +28,10 @@ + + Fix for ClassCastException when fo:wrapper was used as direct child of fo:flow. + Note: "id" attributes are still not handled properly on fo:wrapper! + Added support for the soft hyphen (SHY) character. diff --git a/test/layoutengine/disabled-testcases.xml b/test/layoutengine/disabled-testcases.xml index 748f04f76..9767533d2 100644 --- a/test/layoutengine/disabled-testcases.xml +++ b/test/layoutengine/disabled-testcases.xml @@ -312,11 +312,10 @@ case should be revisited. - fo:wrapper around block-level content - wrapper_block.xml - A ClassCastException occurs when fo:wrapper directly surrounds a - block-level element because its layout manager is written to handle only - inline content. + fo:wrapper around block-level content (with id) + wrapper_block_id.xml + "id" attributes on fo:wrapper around block-level content don't get + added to the area tree. Bugzilla #40230: invalid extra page break diff --git a/test/layoutengine/standard-testcases/wrapper_block_id.xml b/test/layoutengine/standard-testcases/wrapper_block_id.xml new file mode 100644 index 000000000..6b1d2aec4 --- /dev/null +++ b/test/layoutengine/standard-testcases/wrapper_block_id.xml @@ -0,0 +1,49 @@ + + + + + +

+ This test checks fo:wrapper surrounding block-level content with an ID. +

+
+ + + + + + + + + + + block content. + + + + -- + + + + + + + + + +
-- 2.39.5