diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-07-29 08:52:31 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-07-29 08:52:31 +0000 |
commit | 365f117dfac9f039f402ab59a0dd84b5854e112c (patch) | |
tree | 97ffae89e8b908c0e3535eebb63f08e8e542a0ae /src/java/org/apache/fop/render | |
parent | d058e870151a49af34ec1e7204edd0ffc64aaefc (diff) | |
download | xmlgraphics-fop-365f117dfac9f039f402ab59a0dd84b5854e112c.tar.gz xmlgraphics-fop-365f117dfac9f039f402ab59a0dd84b5854e112c.zip |
Merged revisions 680369,680378 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r680369 | jeremias | 2008-07-28 15:24:51 +0100 (Mon, 28 Jul 2008) | 2 lines
Bugzilla #45470:
Added LayoutManagerMapping.registerMaker() to make registration of custom layout managers easier.
........
r680378 | jeremias | 2008-07-28 16:05:14 +0100 (Mon, 28 Jul 2008) | 4 lines
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/branches/Temp_AFPGOCAResources@680649 13f79535-47bb-0310-9956-ffa450edef68
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 a9bbbcfcf..c0e9c2c89 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. @@ -66,10 +67,10 @@ 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) throws FOPException { ((AFPExtensionAttachment)getExtensionAttachment()).setContent( - new String(data, start, end - start)); + new String(data, start, length)); } /** 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)); } } |