]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugzilla 50987: Fixed an issue where a link was added to the parent tree instead...
authorAndreas L. Delmelle <adelmelle@apache.org>
Sun, 3 Apr 2011 09:44:28 +0000 (09:44 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Sun, 3 Apr 2011 09:44:28 +0000 (09:44 +0000)
Thanks to Martin Koegler.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1088234 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/pdf/PDFLogicalStructureHandler.java

index ba95845979d817cfb1a5e9c61b98b62503acf5d3..1b28bc9e29828b2345f9503a0c34a6f455ca14c7 100644 (file)
@@ -291,12 +291,12 @@ 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);
         contentItem.put("Obj", link);
         PDFStructElem parent = (PDFStructElem) structTreeMap.get(structurePointer);
+        parentTree.getNums().put(structParent, link);
         parent.addKid(contentItem);
     }