From 73d57c82452bac39a3b1fb19e8092f80dc254f94 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Thu, 19 Jun 2008 08:25:46 +0000 Subject: [PATCH] Simplifications and a Checkstyle fix. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@669423 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/FOEventHandler.java | 2 +- src/java/org/apache/fop/fo/FOTreeBuilder.java | 7 +++---- .../org/apache/fop/fo/properties/PageDimensionMaker.java | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/java/org/apache/fop/fo/FOEventHandler.java b/src/java/org/apache/fop/fo/FOEventHandler.java index 7521d398c..7aa6e8eeb 100644 --- a/src/java/org/apache/fop/fo/FOEventHandler.java +++ b/src/java/org/apache/fop/fo/FOEventHandler.java @@ -566,7 +566,7 @@ public abstract class FOEventHandler { * @param start Offset for characters to process. * @param length Portion of array to process. */ - public void characters(char data[], int start, int length) { + public void characters(char[] data, int start, int length) { } /** diff --git a/src/java/org/apache/fop/fo/FOTreeBuilder.java b/src/java/org/apache/fop/fo/FOTreeBuilder.java index 84abc4b8b..b1a0467b1 100644 --- a/src/java/org/apache/fop/fo/FOTreeBuilder.java +++ b/src/java/org/apache/fop/fo/FOTreeBuilder.java @@ -150,8 +150,7 @@ public class FOTreeBuilder extends DefaultHandler { this.delegate.endDocument(); if (this.rootFObj == null && empty) { FOValidationEventProducer eventProducer - = FOValidationEventProducer.Provider.get( - foEventHandler.getUserAgent().getEventBroadcaster()); + = FOValidationEventProducer.Provider.get(userAgent.getEventBroadcaster()); eventProducer.emptyDocument(this); } rootFObj = null; @@ -254,7 +253,7 @@ public class FOTreeBuilder extends DefaultHandler { || !localName.equals("root")) { FOValidationEventProducer eventProducer = FOValidationEventProducer.Provider.get( - foEventHandler.getUserAgent().getEventBroadcaster()); + userAgent.getEventBroadcaster()); eventProducer.invalidFORoot(this, FONode.getNodeString(namespaceURI, localName), getEffectiveLocator()); } @@ -379,7 +378,7 @@ public class FOTreeBuilder extends DefaultHandler { if (maker instanceof UnknownXMLObj.Maker) { FOValidationEventProducer eventProducer = FOValidationEventProducer.Provider.get( - foEventHandler.getUserAgent().getEventBroadcaster()); + userAgent.getEventBroadcaster()); eventProducer.unknownFormattingObject(this, currentFObj.getName(), new QName(namespaceURI, localName), getEffectiveLocator()); diff --git a/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java b/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java index 839ac7022..542dcac32 100644 --- a/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java +++ b/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java @@ -23,7 +23,6 @@ import org.apache.fop.fo.Constants; import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.expr.PropertyException; -import org.apache.fop.fo.properties.LengthProperty; /** * Custom Maker for page-height / page-width @@ -54,8 +53,8 @@ public class PageDimensionMaker extends LengthProperty.Maker { Property p = super.get(0, propertyList, tryInherit, tryDefault); FObj fo = propertyList.getFObj(); String fallbackValue = (propId == Constants.PR_PAGE_HEIGHT) - ? fo.getFOEventHandler().getUserAgent().getPageHeight() - : fo.getFOEventHandler().getUserAgent().getPageWidth(); + ? fo.getUserAgent().getPageHeight() + : fo.getUserAgent().getPageWidth(); if (p.getEnum() == Constants.EN_INDEFINITE) { int otherId = (propId == Constants.PR_PAGE_HEIGHT) -- 2.39.5