You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ma...@apache.org on 2009/09/15 16:35:29 UTC

svn commit: r815346 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java

Author: maxberger
Date: Tue Sep 15 14:35:28 2009
New Revision: 815346

URL: http://svn.apache.org/viewvc?rev=815346&view=rev
Log:
no page index requires no location to satisfy identity junit test

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java?rev=815346&r1=815345&r2=815346&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java Tue Sep 15 14:35:28 2009
@@ -106,9 +106,17 @@
                 } else {
                     String id = attributes.getValue("id");
                     int pageIndex = XMLUtil.getAttributeAsInt(attributes, "page-index");
-                    int x = XMLUtil.getAttributeAsInt(attributes, "x");
-                    int y = XMLUtil.getAttributeAsInt(attributes, "y");
-                    action = new GoToXYAction(id, pageIndex, new Point(x, y));
+                    final Point location;
+                    if (pageIndex < 0) {
+                        location = null;
+                    } else {
+                        final int x = XMLUtil
+                                .getAttributeAsInt(attributes, "x");
+                        final int y = XMLUtil
+                                .getAttributeAsInt(attributes, "y");
+                        location = new Point(x, y);
+                    }
+                    action = new GoToXYAction(id, pageIndex, location);
                 }
                 objectStack.push(action);
             } else if (GOTO_URI.getLocalName().equals(localName)) {



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