xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r685192 - /xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFPainter.java
Date Tue, 12 Aug 2008 15:41:04 GMT
Author: jeremias
Date: Tue Aug 12 08:41:03 2008
New Revision: 685192

URL: http://svn.apache.org/viewvc?rev=685192&view=rev
Log:
Implemented named destinations for PDF painter.

Modified:
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFPainter.java

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFPainter.java?rev=685192&r1=685191&r2=685192&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFPainter.java
(original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFPainter.java
Tue Aug 12 08:41:03 2008
@@ -63,6 +63,7 @@
 import org.apache.fop.render.intermediate.extensions.Bookmark;
 import org.apache.fop.render.intermediate.extensions.BookmarkTree;
 import org.apache.fop.render.intermediate.extensions.GoToXYAction;
+import org.apache.fop.render.intermediate.extensions.NamedDestination;
 import org.apache.fop.util.CharUtilities;
 
 /**
@@ -508,6 +509,12 @@
         }
     }
 
+    private void renderNamedDestination(NamedDestination destination) {
+        PDFAction action = getAction(destination.getAction());
+        pdfDoc.getFactory().makeDestination(
+                destination.getName(), action.makeReference());
+    }
+
     private PDFAction getAction(AbstractAction action) {
         if (action instanceof GoToXYAction) {
             GoToXYAction a = (GoToXYAction)action;
@@ -534,6 +541,8 @@
             pdfUtil.renderXMPMetadata(wrapper);
         } else if (extension instanceof BookmarkTree) {
             renderBookmarkTree((BookmarkTree)extension);
+        } else if (extension instanceof NamedDestination) {
+            renderNamedDestination((NamedDestination)extension);
         } else {
             log.warn("Don't know how to handle extension object: "
                     + extension + " (" + extension.getClass().getName());



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message