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: [email protected]
For additional commands, e-mail: [email protected]