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-ffa450edef68tags/fop-0_95beta
@@ -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()) |
@@ -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"; |
@@ -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> |