From ab339a952bfe6397918cfd43e556c69cf4e30d5a Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Thu, 23 Jul 2009 16:40:04 +0000 Subject: 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 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@797142 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/render/pdf/PDFDocumentNavigationHandler.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/java/org') diff --git a/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java b/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java index bc22bb6d2..3e1024d98 100644 --- a/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java +++ b/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java @@ -144,15 +144,20 @@ public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler 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(); -- cgit v1.2.3