Kaynağa Gözat

no page index requires no location to satisfy identity junit test

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@815346 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-1_0
Maximilian Berger 14 yıl önce
ebeveyn
işleme
a164040a67

+ 11
- 3
src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java Dosyayı Görüntüle

@@ -106,9 +106,17 @@ public class DocumentNavigationHandler extends DefaultHandler
} 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)) {

Loading…
İptal
Kaydet