From bbe544cf9e37bd2df99d88181d0549a6b30c4981 Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Fri, 5 Jun 2009 08:43:10 +0000 Subject: [PATCH] Bugzilla 46960: Previously retrieved marker not cleared when the subsequently retrieved marker was empty. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@781944 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/fo/flow/AbstractRetrieveMarker.java | 10 ++-- status.xml | 15 +++--- .../markers_empty_bug46960.xml | 54 +++++++++++++++++++ 3 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 test/layoutengine/standard-testcases/markers_empty_bug46960.xml diff --git a/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java b/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java index 1432c9381..51ae7441d 100644 --- a/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java +++ b/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java @@ -155,11 +155,6 @@ public abstract class AbstractRetrieveMarker extends FObjMixed { private void cloneFromMarker(Marker marker) throws FOPException { - // clean up remnants from a possible earlier layout - if (firstChild != null) { - currentTextNode = null; - firstChild = null; - } cloneSubtree(marker.getChildNodes(), this, marker, propertyList); handleWhiteSpaceFor(this, null); @@ -171,6 +166,11 @@ public abstract class AbstractRetrieveMarker extends FObjMixed { * @param marker the marker that is to be cloned */ public void bindMarker(Marker marker) { + // clean up remnants from a possible earlier layout + if (firstChild != null) { + currentTextNode = null; + firstChild = null; + } if (marker.getChildNodes() != null) { try { cloneFromMarker(marker); diff --git a/status.xml b/status.xml index 8a1368ca6..e0f436c5c 100644 --- a/status.xml +++ b/status.xml @@ -58,18 +58,21 @@ documents. Example: the fix of marks layering will be such a case when it's done. --> + + Bugfix: previously retrieved markers were not cleared if the new marker was empty. + Bugfix: for the last character of a Type1 font, always a width of 0 was returned. - Changed meaning of ‘-v’ option to ‘verbose’, which will print FOP’s version and proceed. + Changed meaning of ‘-v’ option to ‘verbose’, which will print FOP’s version and proceed. Added a ‘-version’ option to simply print the version then exit, following Java practices. Bugfix: The cells of a table inside a marker were duplicated at every marker retrieval. - Bugfix: use the effective color profile supplied by the ImageEncodingHelper, instead of the + Bugfix: use the effective color profile supplied by the ImageEncodingHelper, instead of the original one. @@ -79,20 +82,20 @@ Added setting to enable dithered painting of filled rectangles in AFP and PCL. - Bugfix: footnotes occurring within the forced height of a table row did not appear on the + Bugfix: footnotes occurring within the forced height of a table row did not appear on the output PDFGraphics2D.writeClip doesn't generate a clip command anymore when the clip path - is empty. + is empty. Added a custom text painter for rendering SVG text using text operators when rendering - to PostScript or EPS. Text is no longer painted as shapes, thus creating much smaller files. + to PostScript or EPS. Text is no longer painted as shapes, thus creating much smaller files. Fixed a bug that left the PrintRenderer unconfigured even if a configuration was - specified for "application/X-fop-print". + specified for "application/X-fop-print". Fixed the handling of CMYK colors in PDFGraphics2D. diff --git a/test/layoutengine/standard-testcases/markers_empty_bug46960.xml b/test/layoutengine/standard-testcases/markers_empty_bug46960.xml new file mode 100644 index 000000000..a959517d1 --- /dev/null +++ b/test/layoutengine/standard-testcases/markers_empty_bug46960.xml @@ -0,0 +1,54 @@ + + + + + +

+ This test checks for bug 46960: retrieve-markers not cleared if a subsequent + retrieved marker is empty. +

+
+ + + + + + + + + + + + + + First Page + ContinuedSecond Page + Third Page + + + + + + + + + + + + +
-- 2.39.5