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 | |
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
-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 | ||||
-rw-r--r-- | status.xml | 4 |
3 files changed, 14 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"; diff --git a/status.xml b/status.xml index 24b90423c..f9fb720d7 100644 --- a/status.xml +++ b/status.xml @@ -28,6 +28,10 @@ <changes> <release version="FOP Trunk"> + <action context="Code" dev="JM" type="fix" fixes-bug="43439" due-to="Adrian Cumiskey"> + Fixed the restoration of the TLE values from the intermediate format + for the AFP extension elements. + </action> <action context="Code" dev="JM" type="add" fixes-bug="43041" due-to="Adrian Cumiskey"> Added a configuration setting for the renderer/device resolution to the AFP renderer. </action> |