diff options
author | Jeremias Maerki <jeremias@apache.org> | 2007-10-05 09:56:12 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2007-10-05 09:56:12 +0000 |
commit | 5a1d09c2a9672afa7a25ca8eb59c64badc731b95 (patch) | |
tree | 30c9855418d210ddec9448c2db0220414b8e2b2a /src/java/org/apache/fop/render/afp | |
parent | d2a740ec8e10ce56949b8402e5a0943cbef66090 (diff) | |
download | xmlgraphics-fop-5a1d09c2a9672afa7a25ca8eb59c64badc731b95.tar.gz xmlgraphics-fop-5a1d09c2a9672afa7a25ca8eb59c64badc731b95.zip |
Bugzilla #43439:
Fixed the restoration of the TLE values from the intermediate format for the AFP extension elements.
Submitted by: Adrian Cumiskey <dev.at.cumiskey.com>
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@582178 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/afp')
-rw-r--r-- | src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java | 10 | ||||
-rw-r--r-- | src/java/org/apache/fop/render/afp/extensions/AFPPageSetup.java | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java b/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java index 8d0e50fbc..8318488bf 100644 --- a/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java +++ b/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java @@ -74,9 +74,15 @@ public class AFPExtensionHandler extends DefaultHandler /** {@inheritDoc} */
public void endElement(String uri, String localName, String qName) throws SAXException {
if (AFPPageSetup.CATEGORY.equals(uri)) {
- String name = lastAttributes.getValue("name");
this.returnedObject = new AFPPageSetup(localName);
- returnedObject.setName(name);
+ String name = lastAttributes.getValue("name");
+ if (name != null) {
+ returnedObject.setName(name);
+ }
+ String value = lastAttributes.getValue("value");
+ if (value != null) {
+ returnedObject.setValue(value);
+ }
if (content.length() > 0) {
returnedObject.setContent(content.toString());
content.setLength(0); //Reset text buffer (see characters())
diff --git a/src/java/org/apache/fop/render/afp/extensions/AFPPageSetup.java b/src/java/org/apache/fop/render/afp/extensions/AFPPageSetup.java index 3fe6c1e53..ca568028e 100644 --- a/src/java/org/apache/fop/render/afp/extensions/AFPPageSetup.java +++ b/src/java/org/apache/fop/render/afp/extensions/AFPPageSetup.java @@ -109,7 +109,8 @@ public class AFPPageSetup implements ExtensionAttachment, Serializable, XMLizabl /** {@inheritDoc} */ public String toString() { - return "AFPPageSetup(element-name=" + getElementName() + " name=" + getName() + ")"; + return "AFPPageSetup(element-name=" + getElementName() + + " name=" + getName() + " value=" + getValue() + ")"; } private static final String ATT_NAME = "name"; |