From 9a50626fd30bee2f4c62eea748da61d38f163a22 Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Sun, 16 Sep 2007 10:45:05 +0000 Subject: Bugzilla 42703: Fixed incorrect white-space removal in retrieved markers. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@576072 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/FOText.java | 3 + .../org/apache/fop/fo/flow/RetrieveMarker.java | 3 +- status.xml | 3 + .../marker_white-space-treatment_bug42703.xml | 68 ++++++++++++++++++++++ 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 test/layoutengine/standard-testcases/marker_white-space-treatment_bug42703.xml diff --git a/src/java/org/apache/fop/fo/FOText.java b/src/java/org/apache/fop/fo/FOText.java index 527cdbfc4..8d9111b02 100644 --- a/src/java/org/apache/fop/fo/FOText.java +++ b/src/java/org/apache/fop/fo/FOText.java @@ -158,6 +158,9 @@ public class FOText extends FONode { System.arraycopy(ca, 0, ft.ca, 0, ca.length); } } + prevFOTextThisBlock = null; + nextFOTextThisBlock = null; + ancestorBlock = null; return ft; } diff --git a/src/java/org/apache/fop/fo/flow/RetrieveMarker.java b/src/java/org/apache/fop/fo/flow/RetrieveMarker.java index 316d5411a..3a7328b6b 100644 --- a/src/java/org/apache/fop/fo/flow/RetrieveMarker.java +++ b/src/java/org/apache/fop/fo/flow/RetrieveMarker.java @@ -125,6 +125,7 @@ public class RetrieveMarker extends FObjMixed { getLocator(), pList, newPropertyList); + addChildTo(newChild, (FObj) newParent); if (newChild.getNameId() == FO_TABLE) { Table t = (Table) child; cloneSubtree(t.getColumns().listIterator(), @@ -139,8 +140,8 @@ public class RetrieveMarker extends FObjMixed { } else if (child instanceof FOText) { FOText ft = (FOText) newChild; ft.bind(parentPropertyList); + addChildTo(newChild, (FObj) newParent); } - addChildTo(newChild, (FObj) newParent); if (newChild instanceof FObjMixed) { handleWhiteSpaceFor((FObjMixed) newChild); } diff --git a/status.xml b/status.xml index 3d67b242e..2b7a1f11b 100644 --- a/status.xml +++ b/status.xml @@ -28,6 +28,9 @@ + + Fixed erroneous white-space removal in retrieved markers. + Fixed erroneous usage of inherited color-values in SVG. diff --git a/test/layoutengine/standard-testcases/marker_white-space-treatment_bug42703.xml b/test/layoutengine/standard-testcases/marker_white-space-treatment_bug42703.xml new file mode 100644 index 000000000..0eb80f982 --- /dev/null +++ b/test/layoutengine/standard-testcases/marker_white-space-treatment_bug42703.xml @@ -0,0 +1,68 @@ + + + + + +

+ Test accompanying bugfix for Bugzilla 42703 +

+
+ + + + + + + + + + + + + marker1 content: + + + marker1 content: + + + + + + + + + Block with inline element and a graphic . + + text with the marker + + + + + + + + + + +
-- cgit v1.2.3