diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2009-07-23 16:40:04 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2009-07-23 16:40:04 +0000 |
commit | ab339a952bfe6397918cfd43e556c69cf4e30d5a (patch) | |
tree | 9721f507f154f3c8d40a85d89548beb7540fff02 /src/java | |
parent | d3302f39bd8e5746ca9b9a00849529b6346a492a (diff) | |
download | xmlgraphics-fop-ab339a952bfe6397918cfd43e556c69cf4e30d5a.tar.gz xmlgraphics-fop-ab339a952bfe6397918cfd43e556c69cf4e30d5a.zip |
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
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java | 19 |
1 files changed, 12 insertions, 7 deletions
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(); |