Author: vhennebert
Date: Thu Jul 23 16:40:04 2009
New Revision: 797142

URL: http://svn.apache.org/viewvc?rev=797142&view=rev
Log:
Bugfix: if an incomplete GoTo action has already been recorded for a given ID, 
there's no need to re-create and store another one

Modified:
    
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java

Modified: 
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java?rev=797142&r1=797141&r2=797142&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java
 (original)
+++ 
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java
 Thu Jul 23 16:40:04 2009
@@ -144,15 +144,20 @@
         if (pdfAction != null) {
             return pdfAction;
         } else if (action instanceof GoToXYAction) {
-            GoToXYAction a = (GoToXYAction)action;
-            PDFGoTo pdfGoTo = new PDFGoTo(null);
-            getPDFDoc().assignObjectNumber(pdfGoTo);
-            if (action.isComplete()) {
-                updateTargetLocation(pdfGoTo, a);
+            pdfAction = (PDFAction) incompleteActions.get(action.getID());
+            if (pdfAction != null) {
+                return pdfAction;
             } else {
-                this.incompleteActions.put(action.getID(), pdfGoTo);
+                GoToXYAction a = (GoToXYAction)action;
+                PDFGoTo pdfGoTo = new PDFGoTo(null);
+                getPDFDoc().assignObjectNumber(pdfGoTo);
+                if (action.isComplete()) {
+                    updateTargetLocation(pdfGoTo, a);
+                } else {
+                    this.incompleteActions.put(action.getID(), pdfGoTo);
+                }
+                return pdfGoTo;
             }
-            return pdfGoTo;
         } else if (action instanceof URIAction) {
             URIAction u = (URIAction)action;
             assert u.isComplete();



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to