https://issues.apache.org/bugzilla/show_bug.cgi?id=50987

           Summary: [PATCH] Accessibilty - Incorrect parent tree for links
           Product: Fop
           Version: 1.1dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: general
        AssignedTo: [email protected]
        ReportedBy: [email protected]


FOP puts in the parent tree for links the link itself instead of the related
structure element.

diff --git a/src/java/org/apache/fop/render/pdf/PDFLogicalStructureHandler.java
b/src/java/org/apache/fop/render/pdf/PDFLogicalStructureHandler.java
--- a/src/java/org/apache/fop/render/pdf/PDFLogicalStructureHandler.java
+++ b/src/java/org/apache/fop/render/pdf/PDFLogicalStructureHandler.java
@@ -314,7 +314,6 @@ class PDFLogicalStructureHandler {
     void addLinkContentItem(PDFLink link, String structurePointer) {
         int structParent = getNextParentTreeKey();
         link.setStructParent(structParent);
-        parentTree.getNums().put(structParent, link);
         PDFDictionary contentItem = new PDFDictionary();
         contentItem.put("Type", OBJR);
         contentItem.put("Pg", this.currentPage);
@@ -322,5 +321,6 @@ class PDFLogicalStructureHandler {
         PDFStructElem parent = (PDFStructElem)
structTreeMap.get(structurePointer);
+        parentTree.getNums().put(structParent, parent);
         parent.addKid(contentItem);
     }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to