diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2009-05-13 10:28:22 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2009-05-13 10:28:22 +0000 |
commit | 83266f47d0e1cd75ec69b841d462f572c0842b59 (patch) | |
tree | 0e478735545ce1bffdd7d7b32a74a6638b6ccd16 /src/java/org/apache/fop/fo | |
parent | 03ed498076aaabc791e5c89aea84f4d3c5efc9aa (diff) | |
download | xmlgraphics-fop-83266f47d0e1cd75ec69b841d462f572c0842b59.tar.gz xmlgraphics-fop-83266f47d0e1cd75ec69b841d462f572c0842b59.zip |
Bugzilla #47101: The cells of a table inside a marker were duplicated at every marker retrieval.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@774280 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo')
-rw-r--r-- | src/java/org/apache/fop/fo/FONode.java | 31 | ||||
-rw-r--r-- | src/java/org/apache/fop/fo/flow/table/TablePart.java | 7 |
2 files changed, 20 insertions, 18 deletions
diff --git a/src/java/org/apache/fop/fo/FONode.java b/src/java/org/apache/fop/fo/FONode.java index 07d8f472c..debb6a4b1 100644 --- a/src/java/org/apache/fop/fo/FONode.java +++ b/src/java/org/apache/fop/fo/FONode.java @@ -23,13 +23,12 @@ package org.apache.fop.fo; import java.util.ListIterator; import java.util.Map; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.xml.sax.Attributes; import org.xml.sax.Locator; import org.xml.sax.helpers.LocatorImpl; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - import org.apache.xmlgraphics.util.QName; import org.apache.fop.apps.FOPException; @@ -90,23 +89,19 @@ public abstract class FONode implements Cloneable { */ public FONode clone(FONode cloneparent, boolean removeChildren) throws FOPException { - try { - FONode foNode = (FONode) clone(); - foNode.parent = cloneparent; - foNode.siblings = null; - return foNode; - } catch (CloneNotSupportedException cnse) { - return null; - } + FONode foNode = (FONode) clone(); + foNode.parent = cloneparent; + foNode.siblings = null; + return foNode; } - /** - * Perform a shallow cloning operation - * - * {@inheritDoc} - */ - protected Object clone() throws CloneNotSupportedException { - return super.clone(); + /** {@inheritDoc} */ + protected Object clone() { + try { + return super.clone(); + } catch (CloneNotSupportedException e) { + throw new AssertionError(); // Can't happen + } } /** diff --git a/src/java/org/apache/fop/fo/flow/table/TablePart.java b/src/java/org/apache/fop/fo/flow/table/TablePart.java index b1db59d91..3a3b75ff8 100644 --- a/src/java/org/apache/fop/fo/flow/table/TablePart.java +++ b/src/java/org/apache/fop/fo/flow/table/TablePart.java @@ -70,6 +70,13 @@ public abstract class TablePart extends TableCellContainer { } /** {@inheritDoc} */ + protected Object clone() { + TablePart clone = (TablePart) super.clone(); + clone.rowGroups = new LinkedList(rowGroups); + return clone; + } + + /** {@inheritDoc} */ public void bind(PropertyList pList) throws FOPException { commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps(); super.bind(pList); |