]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
changes to support named destination
authorJay Bryant <jbryant@apache.org>
Sun, 1 Apr 2007 14:45:59 +0000 (14:45 +0000)
committerJay Bryant <jbryant@apache.org>
Sun, 1 Apr 2007 14:45:59 +0000 (14:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@524600 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/area/AreaTreeHandler.java

index 91a5d603d412fbe6e746521373ba88f42b02e99b..e7f6effe034457a24cf3d03cb2daea47e186036a 100644 (file)
@@ -48,6 +48,9 @@ import org.apache.fop.layoutmgr.PageSequenceLayoutManager;
 import org.apache.fop.layoutmgr.LayoutManagerMaker;
 import org.apache.fop.layoutmgr.LayoutManagerMapping;
 
+import org.apache.fop.area.DestinationData;
+import org.apache.fop.fo.extensions.destination.Destination;
+
 /**
  * Area tree handler for formatting objects.
  *
@@ -412,6 +415,15 @@ public class AreaTreeHandler extends FOEventHandler {
     public void endDocument() throws SAXException {
 
         finishPrevPageSequence(null);
+        // process fox:destination elements
+        ArrayList destinationList = rootFObj.getDestinationList();
+        if (destinationList != null) {
+            while(destinationList.size() > 0) {
+                Destination destination = (Destination)destinationList.remove(0);
+                DestinationData destinationData = new DestinationData(destination);
+                addOffDocumentItem(destinationData);
+            }
+        }
         // process fo:bookmark-tree
         BookmarkTree bookmarkTree = rootFObj.getBookmarkTree();
         if (bookmarkTree != null) {