Browse Source

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
tags/fop-1_0
Vincent Hennebert 15 years ago
parent
commit
ab339a952b
1 changed files with 12 additions and 7 deletions
  1. 12
    7
      src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java

+ 12
- 7
src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java View File

@@ -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();

Loading…
Cancel
Save