aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionElement.java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-07-28 15:05:14 +0000
committerJeremias Maerki <jeremias@apache.org>2008-07-28 15:05:14 +0000
commite016f209941db98ef58fd4e2efa12caeb4875ce6 (patch)
tree1af8f696f7885f0c8aa3349518a16e37bf786db4 /src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionElement.java
parent3307e9495037a527348aa0153dd8c5e1b43afdcb (diff)
downloadxmlgraphics-fop-e016f209941db98ef58fd4e2efa12caeb4875ce6.tar.gz
xmlgraphics-fop-e016f209941db98ef58fd4e2efa12caeb4875ce6.zip
Reverted revision 670341 and replaced it with a different solution as discussed:
addCharacters() is now deprecated and called by the new characters() method which uses start/length instead of start/end. Fixed bugs in the AFP and PS extensions (ArrayIndexOutOfBoundsExceptions). They were not properly changed when the interface changed. Discussion: http://markmail.org/message/pdgzf6odxrnhflby git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@680378 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionElement.java')
-rw-r--r--src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionElement.java16
1 files changed, 4 insertions, 12 deletions
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));
}
}