From b59502d64ede1cf0737187a9a50623980668af70 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Wed, 7 Oct 2009 17:31:13 +0000 Subject: Fixed support for links and images in the Intermediate Format git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Accessibility@822808 13f79535-47bb-0310-9956-ffa450edef68 --- .../intermediate/extensions/DocumentNavigationHandler.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/java/org/apache/fop/render/intermediate/extensions') diff --git a/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java b/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java index 376130838..6a27a929d 100644 --- a/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java +++ b/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java @@ -48,6 +48,8 @@ public class DocumentNavigationHandler extends DefaultHandler private IFDocumentNavigationHandler navHandler; + private String accessibilityPointer; + /** * Main constructor. * @param navHandler the navigation handler that will receive the events @@ -96,6 +98,7 @@ public class DocumentNavigationHandler extends DefaultHandler throw new SAXException(localName + " must be the root element!"); } Rectangle targetRect = XMLUtil.getAttributeAsRectangle(attributes, "rect"); + accessibilityPointer = attributes.getValue("ptr"); Link link = new Link(null, targetRect); objectStack.push(link); } else if (GOTO_XY.getLocalName().equals(localName)) { @@ -118,6 +121,9 @@ public class DocumentNavigationHandler extends DefaultHandler } action = new GoToXYAction(id, pageIndex, location); } + if (accessibilityPointer != null) { + action.setPtr(accessibilityPointer); + } objectStack.push(action); } else if (GOTO_URI.getLocalName().equals(localName)) { String id = attributes.getValue("id"); @@ -128,6 +134,9 @@ public class DocumentNavigationHandler extends DefaultHandler if (id != null) { action.setID(id); } + if (accessibilityPointer != null) { + action.setPtr(accessibilityPointer); + } objectStack.push(action); } else { throw new SAXException( -- cgit v1.2.3