diff options
Diffstat (limited to 'src/java/org/apache/fop/render')
3 files changed, 11 insertions, 18 deletions
diff --git a/src/java/org/apache/fop/render/afp/extensions/AbstractAFPExtensionObject.java b/src/java/org/apache/fop/render/afp/extensions/AbstractAFPExtensionObject.java index 364889b29..a92687aab 100644 --- a/src/java/org/apache/fop/render/afp/extensions/AbstractAFPExtensionObject.java +++ b/src/java/org/apache/fop/render/afp/extensions/AbstractAFPExtensionObject.java @@ -20,13 +20,14 @@ package org.apache.fop.render.afp.extensions; // FOP +import org.xml.sax.Attributes; +import org.xml.sax.Locator; + import org.apache.fop.apps.FOPException; import org.apache.fop.fo.FONode; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.ValidationException; import org.apache.fop.fo.extensions.ExtensionAttachment; -import org.xml.sax.Attributes; -import org.xml.sax.Locator; /** * Base class for the AFP-specific extension elements. @@ -60,9 +61,9 @@ public abstract class AbstractAFPExtensionObject extends FONode { } /** {@inheritDoc} */ - protected void addCharacters(char[] data, int start, int end, + protected void characters(char[] data, int start, int length, PropertyList pList, Locator locator) { - setupCode.setContent(new String(data, start, end - start)); + setupCode.setContent(new String(data, start, length)); } /** {@inheritDoc} */ diff --git a/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionElement.java b/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionElement.java index 14865a8c9..3f534af7e 100644 --- a/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionElement.java +++ b/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionElement.java @@ -64,24 +64,16 @@ public abstract class AbstractPSExtensionElement extends FONode { } } - /** - * Adds characters (does nothing here) - * @param data array of characters containing text to be added - * @param start starting array element to add - * @param length of data array to add - * @param pList currently applicable PropertyList - * @param locator location in fo source file. - * @see org.apache.fop.fo.FONode#addCharacters(char[], int, int, PropertyList, Locator) - */ - protected void addCharacters(char[] data, int start, int length, + /** {@inheritDoc} */ + protected void characters(char[] data, int start, int length, PropertyList pList, Locator locator) { PSExtensionAttachment a = (PSExtensionAttachment)getExtensionAttachment(); if (a.getContent() != null) { StringBuffer sb = new StringBuffer(a.getContent()); - sb.append(data, start, length - start); + sb.append(data, start, length); a.setContent(sb.toString()); } else { - a.setContent(new String(data, start, length - start)); + a.setContent(new String(data, start, length)); } } diff --git a/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionObject.java b/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionObject.java index 92108b551..ec90a3afd 100644 --- a/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionObject.java +++ b/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionObject.java @@ -54,14 +54,14 @@ public abstract class AbstractPSExtensionObject extends FONode { } /** {@inheritDoc} */ - protected void addCharacters(char[] data, int start, int length, + protected void characters(char[] data, int start, int length, PropertyList pList, Locator locator) { if (setupCode.getContent() != null) { StringBuffer sb = new StringBuffer(setupCode.getContent()); sb.append(data, start, length - start); setupCode.setContent(sb.toString()); } else { - setupCode.setContent(new String(data, start, length - start)); + setupCode.setContent(new String(data, start, length)); } } |