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);
* @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);
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
+ <action context="Code" dev="AD" type="fix" fixes-bug="46960">
+ Bugfix: previously retrieved markers were not cleared if the new marker was empty.
+ </action>
<action context="Fonts" dev="VH" type="fix" fixes-bug="47232" due-to="Maxim Wirt">
Bugfix: for the last character of a Type1 font, always a width of 0 was returned.
</action>
<action context="Code" dev="VH" type="fix">
- 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.
</action>
<action context="Layout" dev="VH" type="fix" fixes-bug="47101">
Bugfix: The cells of a table inside a marker were duplicated at every marker retrieval.
</action>
<action context="Images" dev="JM" type="fix">
- 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.
</action>
<action context="Renderers" dev="JM" type="fix">
Added setting to enable dithered painting of filled rectangles in AFP and PCL.
</action>
<action context="Layout" dev="VH" type="fix">
- 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
</action>
<action context="Renderers" dev="JM" type="update" fixes-bug="47031" due-to="Francois Fernandes">
PDFGraphics2D.writeClip doesn't generate a clip command anymore when the clip path
- is empty.
+ is empty.
</action>
<action context="Renderers" dev="JM" type="add" fixes-bug="47000">
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.
</action>
<action context="Renderers" dev="JM" type="fix">
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".
</action>
<action context="Renderers" dev="JM" type="fix" fixes-bug="46882" due-to="Yegor Kozlov">
Fixed the handling of CMYK colors in PDFGraphics2D.
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks for bug 46960: retrieve-markers not cleared if a subsequent
+ retrieved marker is empty.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="a4" page-width="210mm" page-height="297mm" margin="5mm">
+ <fo:region-body margin-top="2cm"/>
+ <fo:region-before extent="2cm" region-name="header"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="a4">
+ <fo:static-content flow-name="header">
+ <fo:block><fo:retrieve-marker id="rm-cont-1" retrieve-class-name="Continued" retrieve-boundary="document" retrieve-position="first-starting-within-page"/></fo:block>
+ </fo:static-content>
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block><fo:marker marker-class-name="Continued"/>First Page</fo:block>
+ <fo:block break-before="page"><fo:marker marker-class-name="Continued">Continued</fo:marker>Second Page</fo:block>
+ <fo:block break-before="page"><fo:marker marker-class-name="Continued"/>Third Page</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <!-- first retrieved marker is empty -->
+ <eval expected="0" xpath="(//page)[1]//regionBefore/block/@bpd" />
+ <!-- second marker is "Continued" -->
+ <eval expected="Continued" xpath="(//page)[2]//regionBefore/block/lineArea/text/word" />
+ <!-- third marker should be empty again -->
+ <eval expected="0" xpath="(//page)[3]//regionBefore/block/@bpd" />
+ </checks>
+</testcase>