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 vh...@apache.org on 2010/08/17 20:57:15 UTC
svn commit: r986451 [3/13] - in
/xmlgraphics/fop/branches/Temp_ComplexScripts: ./
examples/plan/src/org/apache/fop/plan/
src/codegen/java/org/apache/fop/tools/ src/codegen/unicode/data/
src/codegen/unicode/java/org/apache/fop/hyphenation/ src/codegen/u...
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/svg/AFPGraphicsConfiguration.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/svg/AFPGraphicsConfiguration.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/svg/AFPGraphicsConfiguration.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/svg/AFPGraphicsConfiguration.java Tue Aug 17 18:57:04 2010
@@ -109,7 +109,8 @@ public class AFPGraphicsConfiguration ex
}
}
- private static final Log log = LogFactory.getLog(AFPGraphicsConfiguration.class);
+ private static final Log LOG
+ = LogFactory.getLog(AFPGraphicsConfiguration.class);
private AffineTransform defaultTransform = null;
private AffineTransform normalizingTransform = null;
@@ -121,7 +122,7 @@ public class AFPGraphicsConfiguration ex
* @return the default transform for the configuration
*/
public AffineTransform getDefaultTransform() {
- log.debug("getDefaultTransform()");
+ LOG.debug("getDefaultTransform()");
if (defaultTransform == null) {
defaultTransform = new AffineTransform();
}
@@ -136,7 +137,7 @@ public class AFPGraphicsConfiguration ex
* @return the normalizing transform for the configuration
*/
public AffineTransform getNormalizingTransform() {
- log.debug("getNormalizingTransform()");
+ LOG.debug("getNormalizingTransform()");
if (normalizingTransform == null) {
normalizingTransform = new AffineTransform(2, 0, 0, 2, 0, 0);
}
@@ -145,7 +146,7 @@ public class AFPGraphicsConfiguration ex
/** {@inheritDoc} */
public GraphicsDevice getDevice() {
- log.debug("getDevice()");
+ LOG.debug("getDevice()");
return graphicsDevice;
}
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/svg/AFPTextHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/svg/AFPTextHandler.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/svg/AFPTextHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/svg/AFPTextHandler.java Tue Aug 17 18:57:04 2010
@@ -21,7 +21,6 @@ package org.apache.fop.afp.svg;
import java.awt.Color;
import java.awt.Graphics2D;
-import java.io.IOException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -34,13 +33,13 @@ import org.apache.fop.afp.fonts.AFPPageF
import org.apache.fop.afp.modca.GraphicsObject;
import org.apache.fop.fonts.Font;
import org.apache.fop.fonts.FontInfo;
-import org.apache.fop.svg.FOPTextHandler;
+import org.apache.fop.svg.FOPTextHandlerAdapter;
/**
* Specialized TextHandler implementation that the AFPGraphics2D class delegates to to paint text
* using AFP GOCA text operations.
*/
-public class AFPTextHandler implements FOPTextHandler {
+public class AFPTextHandler extends FOPTextHandlerAdapter {
/** logging instance */
private static Log log = LogFactory.getLog(AFPTextHandler.class);
@@ -73,7 +72,6 @@ public class AFPTextHandler implements F
* Registers a page font
*
* @param internalFontName the internal font name
- * @param internalFontName the internal font name
* @param fontSize the font size
* @return a font reference
*/
@@ -88,19 +86,13 @@ public class AFPTextHandler implements F
return afpFontAttributes.getFontReference();
}
- /** {@inheritDoc} */
- public void drawString(String text, float x, float y) throws IOException {
- // TODO Remove me after removing the deprecated method in TextHandler.
- throw new UnsupportedOperationException("Deprecated method!");
- }
-
/**
* Add a text string to the current data object of the AFP datastream.
* The text is painted using text operations.
*
* {@inheritDoc}
*/
- public void drawString(Graphics2D g, String str, float x, float y) throws IOException {
+ public void drawString(Graphics2D g, String str, float x, float y) {
if (log.isDebugEnabled()) {
log.debug("drawString() str=" + str + ", x=" + x + ", y=" + y);
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/svg/AFPTextPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/svg/AFPTextPainter.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/svg/AFPTextPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/svg/AFPTextPainter.java Tue Aug 17 18:57:04 2010
@@ -26,7 +26,7 @@ import org.apache.fop.svg.AbstractFOPTex
import org.apache.fop.svg.FOPTextHandler;
/**
- * Renders the attributed character iterator of a {@link TextNode}.
+ * Renders the attributed character iterator of some text.
* This class draws the text directly into the AFPGraphics2D so that
* the text is not drawn using shapes.
* If the text is simple enough to draw then it sets the font and calls
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/BinaryUtils.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/BinaryUtils.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/BinaryUtils.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/BinaryUtils.java Tue Aug 17 18:57:04 2010
@@ -27,6 +27,9 @@ import java.io.ByteArrayOutputStream;
*/
public final class BinaryUtils {
+ private BinaryUtils() {
+ }
+
/**
* Convert an int into the corresponding byte array by encoding each
* two hexadecimal digits as a char. This will return a byte array
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/CubicBezierApproximator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/CubicBezierApproximator.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/CubicBezierApproximator.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/CubicBezierApproximator.java Tue Aug 17 18:57:04 2010
@@ -29,7 +29,10 @@ import java.awt.geom.Point2D.Double;
* The various techniques are described here:
* http://www.timotheegroleau.com/Flash/articles/cubic_bezier_in_flash.htm
*/
-public class CubicBezierApproximator {
+public final class CubicBezierApproximator {
+
+ private CubicBezierApproximator() {
+ }
/**
* This method will take in an array containing the x and y coordinates of the four control
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/DTDEntityResolver.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/DTDEntityResolver.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/DTDEntityResolver.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/DTDEntityResolver.java Tue Aug 17 18:57:04 2010
@@ -98,7 +98,7 @@ public class DTDEntityResolver implement
/**
* Returns the URL of a resource on the classpath
- * @param resourceName the path to the resource relative to the root of the
+ * @param resourcePath the path to the resource relative to the root of the
* classpath.
* @return the URL of the required resource
* @throws FontRuntimeException if the resource could not be found.
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/StringUtils.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/StringUtils.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/StringUtils.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/StringUtils.java Tue Aug 17 18:57:04 2010
@@ -23,7 +23,10 @@ package org.apache.fop.afp.util;
* Library of utility methods useful in dealing with strings.
*
*/
-public class StringUtils {
+public final class StringUtils {
+
+ private StringUtils() {
+ }
/**
* Padds the string to the left with the given character for
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java Tue Aug 17 18:57:04 2010
@@ -34,7 +34,6 @@ import org.apache.commons.logging.LogFac
import org.apache.xmlgraphics.image.loader.spi.ImageImplRegistry;
import org.apache.xmlgraphics.image.loader.util.Penalty;
-import org.apache.fop.fonts.FontManager;
import org.apache.fop.fonts.FontManagerConfigurator;
import org.apache.fop.util.LogUtil;
@@ -198,9 +197,7 @@ public class FopFactoryConfigurator {
}
// configure font manager
- FontManager fontManager = factory.getFontManager();
- FontManagerConfigurator fontManagerConfigurator = new FontManagerConfigurator(cfg);
- fontManagerConfigurator.configure(fontManager, strict);
+ new FontManagerConfigurator(cfg).configure(factory.getFontManager(), strict);
// configure image loader framework
configureImageLoading(cfg.getChild("image-loading", false), strict);
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaEventProducer.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaEventProducer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaEventProducer.java Tue Aug 17 18:57:04 2010
@@ -30,7 +30,10 @@ public interface AreaEventProducer exten
/**
* Provider class for the event producer.
*/
- class Provider {
+ static final class Provider {
+
+ private Provider() {
+ }
/**
* Returns an event producer.
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeParser.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeParser.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeParser.java Tue Aug 17 18:57:04 2010
@@ -228,8 +228,13 @@ public class AreaTreeParser {
if (areaStack.size() > 0) {
int pos = areaStack.size() - 1;
Object obj = null;
- while (pos >= 0 && !(clazz.isInstance(obj = areaStack.get(pos)))) {
- pos--;
+ while ( pos >= 0 ) {
+ obj = areaStack.get(pos);
+ if ( clazz.isInstance ( obj ) ) {
+ break;
+ } else {
+ pos--;
+ }
}
if (pos >= 0) {
return (Area)obj;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Block.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Block.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Block.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Block.java Tue Aug 17 18:57:04 2010
@@ -58,6 +58,7 @@ public class Block extends BlockParent {
private int stacking = TB;
private int positioning = STACK;
+ /** if true, allow BPD update */
protected transient boolean allowBPDUpdate = true;
// a block with may contain the dominant styling info in
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/DestinationData.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/DestinationData.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/DestinationData.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/DestinationData.java Tue Aug 17 18:57:04 2010
@@ -98,7 +98,7 @@ public class DestinationData extends Abs
* object that corresponds to the IDRef
*
* {@inheritDoc} List)
- * @todo check to make sure it works if multiple bookmark-items
+ * @asf.todo check to make sure it works if multiple bookmark-items
* have the same idref
*/
public void resolveIDRef(String id, List pages) {
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/IDTracker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/IDTracker.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/IDTracker.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/IDTracker.java Tue Aug 17 18:57:04 2010
@@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFac
*/
public class IDTracker {
- private static final Log log = LogFactory.getLog(IDTracker.class);
+ private static final Log LOG = LogFactory.getLog(IDTracker.class);
// HashMap of ID's whose area is located on one or more consecutive
// PageViewports. Each ID has an arraylist of PageViewports that
@@ -58,8 +58,8 @@ public class IDTracker {
* @param pv a page viewport that contains the area with this ID
*/
public void associateIDWithPageViewport(String id, PageViewport pv) {
- if (log.isDebugEnabled()) {
- log.debug("associateIDWithPageViewport(" + id + ", " + pv + ")");
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("associateIDWithPageViewport(" + id + ", " + pv + ")");
}
List pvList = (List) idLocations.get(id);
if (pvList == null) { // first time ID located
@@ -92,8 +92,8 @@ public class IDTracker {
* @param id the id of the object being processed
*/
public void signalPendingID(String id) {
- if (log.isDebugEnabled()) {
- log.debug("signalPendingID(" + id + ")");
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("signalPendingID(" + id + ")");
}
unfinishedIDs.add(id);
}
@@ -106,8 +106,8 @@ public class IDTracker {
* @param id the id of the formatting object which was just finished
*/
public void signalIDProcessed(String id) {
- if (log.isDebugEnabled()) {
- log.debug("signalIDProcessed(" + id + ")");
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("signalIDProcessed(" + id + ")");
}
alreadyResolvedIDs.add(id);
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LineArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LineArea.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LineArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LineArea.java Tue Aug 17 18:57:04 2010
@@ -37,7 +37,7 @@ public class LineArea extends Area {
* that can be used in order to re-compute adjustement and / or indents when a
* page-number or a page-number-citation is resolved
*/
- private class LineAdjustingInfo implements Serializable {
+ private final class LineAdjustingInfo implements Serializable {
private int lineAlignment;
private int difference;
private int availableStretch;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java Tue Aug 17 18:57:04 2010
@@ -34,7 +34,10 @@ import org.apache.fop.util.ColorUtil;
* Area traits used for rendering.
* This class represents an area trait that specifies a value for rendering.
*/
-public class Trait implements Serializable {
+public final class Trait implements Serializable {
+
+ private Trait() {
+ }
/**
* Id reference line, not resolved.
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/AbstractTextArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/AbstractTextArea.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/AbstractTextArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/AbstractTextArea.java Tue Aug 17 18:57:04 2010
@@ -140,12 +140,14 @@ public abstract class AbstractTextArea e
if (textWordSpaceAdjust < 0) {
// from a negative adjustment to a positive one
balancingFactor
- = ((double) textAdjustingInfo.availableStretch / textAdjustingInfo.availableShrink)
+ = ((double) textAdjustingInfo.availableStretch
+ / textAdjustingInfo.availableShrink)
* ((double) lineShrink / lineStretch);
} else {
// from a positive adjustment to a negative one
balancingFactor
- = ((double) textAdjustingInfo.availableShrink / textAdjustingInfo.availableStretch)
+ = ((double) textAdjustingInfo.availableShrink
+ / textAdjustingInfo.availableStretch)
* ((double) lineStretch / lineShrink);
}
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineArea.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineArea.java Tue Aug 17 18:57:04 2010
@@ -218,6 +218,10 @@ public class InlineArea extends Area {
return false;
}
+ /**
+ * Apply IPD variation.
+ * @param ipdVariation the variation
+ */
public void handleIPDVariation(int ipdVariation) {
increaseIPD(ipdVariation);
notifyIPDVariation(ipdVariation);
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/SpaceArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/SpaceArea.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/SpaceArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/SpaceArea.java Tue Aug 17 18:57:04 2010
@@ -16,6 +16,7 @@
*/
/* $Id$ */
+
package org.apache.fop.area.inline;
/**
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/WordArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/WordArea.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/WordArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/WordArea.java Tue Aug 17 18:57:04 2010
@@ -16,6 +16,7 @@
*/
/* $Id$ */
+
package org.apache.fop.area.inline;
/**
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/CommandLineOptions.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/CommandLineOptions.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/CommandLineOptions.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/CommandLineOptions.java Tue Aug 17 18:57:04 2010
@@ -41,6 +41,7 @@ import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.FopFactory;
import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.fonts.FontManager;
import org.apache.fop.pdf.PDFAMode;
import org.apache.fop.pdf.PDFEncryptionManager;
import org.apache.fop.pdf.PDFEncryptionParams;
@@ -109,7 +110,7 @@ public class CommandLineOptions {
private boolean useStdIn = false;
/* true if System.out (stdout) should be used for the output file */
private boolean useStdOut = false;
- /* true if a catalog resolver should be used for entity and uri resolution */
+ /* true if a catalog resolver should be used for entity and uri resolution */
private boolean useCatalogResolver = false;
/* rendering options (for the user agent) */
private Map renderingOptions = new java.util.HashMap();
@@ -129,6 +130,8 @@ public class CommandLineOptions {
private String mimicRenderer = null;
+ private boolean flushCache = false;
+
/**
* Construct a command line option object.
*/
@@ -166,7 +169,9 @@ public class CommandLineOptions {
}
checkSettings();
setUserConfig();
-
+ if (flushCache) {
+ flushCache();
+ }
//Factory config is set up, now we can create the user agent
foUserAgent = factory.newFOUserAgent();
foUserAgent.getRendererOptions().putAll(renderingOptions);
@@ -284,6 +289,10 @@ public class CommandLineOptions {
factory.setStrictValidation(false);
} else if (args[i].equals("-conserve")) {
conserveMemoryPolicy = true;
+ } else if (args[i].equals("-flush")) {
+ flushCache = true;
+ } else if (args[i].equals("-cache")) {
+ parseCacheOption(args, i);
} else if (args[i].equals("-dpi")) {
i = i + parseResolution(args, i);
} else if (args[i].equals("-q") || args[i].equals("--quiet")) {
@@ -385,6 +394,17 @@ public class CommandLineOptions {
return true;
} // end parseOptions
+ private int parseCacheOption(String[] args, int i) throws FOPException {
+ if ((i + 1 == args.length)
+ || (isOption(args[i + 1]))) {
+ throw new FOPException("if you use '-cache', you must specify "
+ + "the name of the font cache file");
+ } else {
+ factory.getFontManager().setCacheFile(new File(args[i + 1]));
+ return 1;
+ }
+ }
+
private int parseConfigurationOption(String[] args, int i) throws FOPException {
if ((i + 1 == args.length)
|| (isOption(args[i + 1]))) {
@@ -961,10 +981,12 @@ public class CommandLineOptions {
"FO output mode is only available if you use -xml and -xsl");
} else if (outputmode.equals(MimeConstants.MIME_FOP_AREA_TREE)) {
throw new FOPException(
- "Area Tree Output is not available if Intermediate Format is used as input!");
+ "Area Tree Output is not available if Intermediate Format"
+ + " is used as input!");
} else if (outputmode.equals(MimeConstants.MIME_FOP_IF)) {
throw new FOPException(
- "Intermediate Output is not available if Intermediate Format is used as input!");
+ "Intermediate Output is not available if Intermediate Format"
+ + " is used as input!");
}
if (iffile != null && !iffile.exists()) {
throw new FileNotFoundException("Error: intermediate format file "
@@ -1151,7 +1173,8 @@ public class CommandLineOptions {
+ " -r relaxed/less strict validation (where available)\n"
+ " -dpi xxx target resolution in dots per inch (dpi) where xxx is a number\n"
+ " -s for area tree XML, down to block areas only\n"
- + " -v run in verbose mode (currently simply print FOP version and continue)\n\n"
+ + " -v run in verbose mode (currently simply print FOP version"
+ + " and continue)\n\n"
+ " -o [password] PDF file will be encrypted with option owner password\n"
+ " -u [password] PDF file will be encrypted with option user password\n"
+ " -noprint PDF file will be encrypted without printing permission\n"
@@ -1161,8 +1184,15 @@ public class CommandLineOptions {
+ " -a enables accessibility features (Tagged PDF etc., default off)\n"
+ " -pdfprofile prof PDF file will be generated with the specified profile\n"
+ " (Examples for prof: PDF/A-1b or PDF/X-3:2003)\n\n"
- + " -conserve Enable memory-conservation policy (trades memory-consumption for disk I/O)\n"
- + " (Note: currently only influences whether the area tree is serialized.)\n\n"
+ + " -conserve enable memory-conservation policy (trades memory-consumption"
+ + " for disk I/O)\n"
+ + " (Note: currently only influences whether the area tree is"
+ + " serialized.)\n\n"
+
+ + " -cache specifies a file/directory path location"
+ + " for the font cache file\n"
+ + " -flush flushes the current font cache file\n\n"
+
+ " [INPUT] \n"
+ " infile xsl:fo input file (the same as the next) \n"
+ " (use '-' for infile to pipe input from stdin)\n"
@@ -1192,14 +1222,16 @@ public class CommandLineOptions {
+ " -at [mime] out representation of area tree as XML (outfile req'd) \n"
+ " specify optional mime output to allow the AT to be converted\n"
+ " to final format later\n"
- + " -if [mime] out representation of document in intermediate format XML (outfile req'd)\n"
+ + " -if [mime] out representation of document in intermediate format XML"
+ + " (outfile req'd)\n"
+ " specify optional mime output to allow the IF to be converted\n"
+ " to final format later\n"
+ " -print input file will be rendered and sent to the printer \n"
+ " see options with \"-print help\" \n"
+ " -out mime outfile input will be rendered using the given MIME type\n"
+ " (outfile req'd) Example: \"-out application/pdf D:\\out.pdf\"\n"
- + " (Tip: \"-out list\" prints the list of supported MIME types)\n"
+ + " (Tip: \"-out list\" prints the list of supported MIME types"
+ + " and exits)\n"
//+ " -mif outfile input will be rendered as MIF (FrameMaker) (outfile req'd)\n"
//+ " Experimental feature - requires additional fop-sandbox.jar.\n"
+ " -svg outfile input will be rendered as an SVG slides file (outfile req'd) \n"
@@ -1333,5 +1365,14 @@ public class CommandLineOptions {
}
}
+ private void flushCache() throws FOPException {
+ FontManager fontManager = factory.getFontManager();
+ File cacheFile = fontManager.getCacheFile();
+ if (!fontManager.deleteCache()) {
+ System.err.println("Failed to flush the font cache file '"
+ + cacheFile + "'.");
+ System.exit(1);
+ }
+ }
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/InputHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/InputHandler.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/InputHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/InputHandler.java Tue Aug 17 18:57:04 2010
@@ -196,13 +196,14 @@ public class InputHandler implements Err
* Creates a catalog resolver and uses it for XML parsing and XSLT URI resolution.
* Tries the Apache Commons Resolver, and if unsuccessful,
* tries the same built into Java 6.
+ * @param userAgent the user agent instance
*/
public void createCatalogResolver(FOUserAgent userAgent) {
String[] classNames = new String[] {
"org.apache.xml.resolver.tools.CatalogResolver",
"com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver"};
- ResourceEventProducer eventProducer =
- ResourceEventProducer.Provider.get(userAgent.getEventBroadcaster());
+ ResourceEventProducer eventProducer
+ = ResourceEventProducer.Provider.get(userAgent.getEventBroadcaster());
Class resolverClass = null;
for (int i = 0; i < classNames.length && resolverClass == null; ++i) {
try {
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/Main.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/Main.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/Main.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/Main.java Tue Aug 17 18:57:04 2010
@@ -35,7 +35,10 @@ import org.apache.fop.apps.MimeConstants
/**
* Main command-line class for Apache FOP.
*/
-public class Main {
+public final class Main {
+
+ private Main() {
+ }
/**
* @return the list of URLs to all libraries.
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/FODimension.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/FODimension.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/FODimension.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/FODimension.java Tue Aug 17 18:57:04 2010
@@ -27,9 +27,9 @@ package org.apache.fop.datatypes;
public class FODimension {
/** distance (in millipoints) on the inline-progression-direction */
- public int ipd;
+ public int ipd; // CSOK: VisibilityModifier
/** distance (in millipoints) on the block-progression-direction */
- public int bpd;
+ public int bpd; // CSOK: VisibilityModifier
/**
* Constructor
@@ -41,6 +41,17 @@ public class FODimension {
this.bpd = bpd;
}
+ /** @return ipd */
+ public int getIPD() {
+ return ipd;
+ }
+
+ /** @return bpd */
+ public int getBPD() {
+ return bpd;
+ }
+
+ /** {@inheritDoc} */
public String toString() {
StringBuffer sb = new StringBuffer(super.toString());
sb.append(" {ipd=").append(Integer.toString(ipd));
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/Numeric.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/Numeric.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/Numeric.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/Numeric.java Tue Aug 17 18:57:04 2010
@@ -37,7 +37,7 @@ public interface Numeric {
/**
* Return the value of this Numeric
* @return the computed value.
- * @throws PropertyException
+ * @throws PropertyException if a propert exception occurs
*/
double getNumericValue() throws PropertyException;
@@ -45,7 +45,7 @@ public interface Numeric {
* Return the value of this Numeric
* @param context The context for the length calculation (for percentage based lengths)
* @return the computed value.
- * @throws PropertyException
+ * @throws PropertyException if a propert exception occurs
*/
double getNumericValue(PercentBaseContext context) throws PropertyException;
@@ -68,14 +68,14 @@ public interface Numeric {
* Returns the value of this numeric as an int.
* @return the value as an integer.
*/
- public int getValue();
+ int getValue();
/**
* Returns the value of this numeric as an int.
* @param context the context for the length calculation (for percentage based lengths)
* @return the value as an integer.
*/
- public int getValue(PercentBaseContext context);
+ int getValue(PercentBaseContext context);
/**
* Return the resolved value. This method will becalled during evaluation
@@ -89,6 +89,7 @@ public interface Numeric {
/**
* Return the enum value that is stored in this numeric.
+ * @return the enum value
*/
- public int getEnum();
+ int getEnum();
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/PercentBaseContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/PercentBaseContext.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/PercentBaseContext.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/PercentBaseContext.java Tue Aug 17 18:57:04 2010
@@ -36,6 +36,6 @@ public interface PercentBaseContext {
* @param fobj The FO object against which the percentage should be evaluated
* @return The base length value of the given kind
*/
- public int getBaseLength(int lengthBase, FObj fobj);
+ int getBaseLength(int lengthBase, FObj fobj);
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/URISpecification.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/URISpecification.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/URISpecification.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/URISpecification.java Tue Aug 17 18:57:04 2010
@@ -25,7 +25,10 @@ import java.io.UnsupportedEncodingExcept
/**
* This class contains method to deal with the <uri-specification> datatype from XSL-FO.
*/
-public class URISpecification {
+public final class URISpecification {
+
+ private URISpecification() {
+ }
/**
* Get the URL string from a wrapped URL.
@@ -94,7 +97,7 @@ public class URISpecification {
return false;
}
- private final static char[] HEX_DIGITS = {
+ private static final char[] HEX_DIGITS = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
};
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/EventExceptionManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/EventExceptionManager.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/EventExceptionManager.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/EventExceptionManager.java Tue Aug 17 18:57:04 2010
@@ -27,7 +27,10 @@ import org.apache.xmlgraphics.util.Servi
/**
* This class is responsible for converting events into exceptions.
*/
-public class EventExceptionManager {
+public final class EventExceptionManager {
+
+ private EventExceptionManager() {
+ }
private static final Map EXCEPTION_FACTORIES = new java.util.HashMap();
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/model/EventModelParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/model/EventModelParser.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/model/EventModelParser.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/model/EventModelParser.java Tue Aug 17 18:57:04 2010
@@ -40,10 +40,13 @@ import org.apache.fop.util.DefaultErrorL
/**
* This is a parser for the event model XML.
*/
-public class EventModelParser {
+public final class EventModelParser {
+
+ private EventModelParser() {
+ }
/** Logger instance */
- protected static Log log = LogFactory.getLog(EventModelParser.class);
+ private static final Log LOG = LogFactory.getLog(EventModelParser.class);
private static SAXTransformerFactory tFactory
= (SAXTransformerFactory)SAXTransformerFactory.newInstance();
@@ -57,7 +60,7 @@ public class EventModelParser {
public static EventModel parse(Source src)
throws TransformerException {
Transformer transformer = tFactory.newTransformer();
- transformer.setErrorListener(new DefaultErrorListener(log));
+ transformer.setErrorListener(new DefaultErrorListener(LOG));
EventModel model = new EventModel();
SAXResult res = new SAXResult(getContentHandler(model));
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOEventHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOEventHandler.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOEventHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOEventHandler.java Tue Aug 17 18:57:04 2010
@@ -40,11 +40,10 @@ import org.apache.fop.fo.flow.PageNumber
import org.apache.fop.fo.flow.PageNumberCitationLast;
import org.apache.fop.fo.flow.table.Table;
import org.apache.fop.fo.flow.table.TableBody;
-import org.apache.fop.fo.flow.table.TableFooter;
-import org.apache.fop.fo.flow.table.TableHeader;
-import org.apache.fop.fo.flow.table.TablePart;
import org.apache.fop.fo.flow.table.TableCell;
import org.apache.fop.fo.flow.table.TableColumn;
+import org.apache.fop.fo.flow.table.TableFooter;
+import org.apache.fop.fo.flow.table.TableHeader;
import org.apache.fop.fo.flow.table.TableRow;
import org.apache.fop.fo.pagination.Flow;
import org.apache.fop.fo.pagination.PageSequence;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FONode.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FONode.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FONode.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FONode.java Tue Aug 17 18:57:04 2010
@@ -633,8 +633,9 @@ public abstract class FONode implements
* this method only in exceptional conditions because this method may perform quite extensive
* information gathering inside the FO tree.
* @return a String containing context information
- * @deprecated Not localized! Should rename getContextInfoAlt() to getContextInfo() when done!
*/
+ // [GA] remove deprecation - no alternative specified
+ // @deprecated Not localized! Should rename getContextInfoAlt() to getContextInfo() when done!
public String getContextInfo() {
StringBuffer sb = new StringBuffer();
if (getLocalName() != null) {
@@ -797,8 +798,9 @@ public abstract class FONode implements
/**
* This method is overridden by extension elements and allows the extension element to return
- * a {@link ContentHandlerFactory}. This factory can create ContentHandler implementations that handle
- * foreign XML content by either building up a specific DOM, a Java object or something else.
+ * a {@link ContentHandlerFactory}. This factory can create ContentHandler implementations that
+ * handle foreign XML content by either building up a specific DOM, a Java object or something
+ * else.
*
* @return the <code>ContentHandlerFactory</code> or <code>null</code> if not applicable
*/
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOPropertyMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOPropertyMapping.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOPropertyMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOPropertyMapping.java Tue Aug 17 18:57:04 2010
@@ -72,16 +72,20 @@ import org.apache.fop.fo.properties.XMLL
* This class creates and returns an array of Property.Maker instances
* indexed by the PR_* propId from Constants.java.
*
- * @todo Check multi-threading safety of the statics below
+ * @asf.todo Check multi-threading safety of the statics below
*/
public final class FOPropertyMapping implements Constants {
- private static Map s_htPropNames = new HashMap();
- private static Map s_htSubPropNames = new HashMap();
- private static Map s_htPropIds = new HashMap();
- private static PropertyMaker[] s_generics = null;
+ private FOPropertyMapping() {
+ }
+
+ private static Map propNames = new HashMap(); // CSOK: VisibilityModifier
+ private static Map subPropNames = new HashMap(); // CSOK: VisibilityModifier
+ private static Map propIds = new HashMap(); // CSOK: VisibilityModifier
+
+ private static PropertyMaker[] generics = null; // CSOK: VisibilityModifier
- // The rest is only used during the building of the s_generics array.
+ // The rest is only used during the building of the generics array.
private Property[] enums = null;
private PropertyMaker genericColor = null;
@@ -154,7 +158,7 @@ public final class FOPropertyMapping imp
genericPadding.setInherited(false);
genericPadding.setDefault("0pt");
genericPadding.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
- genericPadding.addShorthand(s_generics[PR_PADDING]);
+ genericPadding.addShorthand(generics[PR_PADDING]);
// GenericCondBorderWidth
genericCondBorderWidth = new CondLengthProperty.Maker(0);
@@ -235,15 +239,15 @@ public final class FOPropertyMapping imp
/**
* Add a property maker to the generics array.
- * Also creates the name <-> id mapping in s_htPropNames and s_htPropIds.
+ * Also creates the name <-> id mapping in propNames and propIds.
*
* @param name the name of the property maker.
* @param maker the maker.
*/
private static void addPropertyMaker(String name, PropertyMaker maker) {
- s_generics[maker.getPropId()] = maker;
- s_htPropNames.put(name, new Integer(maker.getPropId()));
- s_htPropIds.put(new Integer(maker.getPropId()), name);
+ generics[maker.getPropId()] = maker;
+ propNames.put(name, new Integer(maker.getPropId()));
+ propIds.put(new Integer(maker.getPropId()), name);
}
/**
@@ -252,8 +256,8 @@ public final class FOPropertyMapping imp
* @param id Id for the subproperty from CP_* in Constants.java.
*/
private static void addSubpropMakerName(String name, int id) {
- s_htSubPropNames.put(name, new Integer(id));
- s_htPropIds.put(new Integer(id), name);
+ subPropNames.put(name, new Integer(id));
+ propIds.put(new Integer(id), name);
}
/**
@@ -278,9 +282,9 @@ public final class FOPropertyMapping imp
*/
public static PropertyMaker[] getGenericMappings() {
- if (s_generics == null) {
+ if (generics == null) {
/* this method was never called before */
- s_generics = new PropertyMaker[PROPERTY_COUNT + 1];
+ generics = new PropertyMaker[PROPERTY_COUNT + 1];
FOPropertyMapping gp = new FOPropertyMapping();
/* Create the shorthand first. They are
@@ -328,7 +332,7 @@ public final class FOPropertyMapping imp
addSubpropMakerName("precedence", CP_PRECEDENCE);
}
- return s_generics;
+ return generics;
}
/**
@@ -338,7 +342,7 @@ public final class FOPropertyMapping imp
*/
public static int getPropertyId(String name) {
if (name != null) {
- Integer i = (Integer) s_htPropNames.get(name);
+ Integer i = (Integer) propNames.get(name);
if (i != null) {
return i.intValue();
}
@@ -353,7 +357,7 @@ public final class FOPropertyMapping imp
*/
public static int getSubPropertyId(String name) {
if (name != null) {
- Integer i = (Integer) s_htSubPropNames.get(name);
+ Integer i = (Integer) subPropNames.get(name);
if (i != null) {
return i.intValue();
}
@@ -369,10 +373,10 @@ public final class FOPropertyMapping imp
public static String getPropertyName(int id) {
if (((id & Constants.COMPOUND_MASK) == 0)
|| ((id & Constants.PROPERTY_MASK) == 0)) {
- return (String) s_htPropIds.get(new Integer(id));
+ return (String) propIds.get(new Integer(id));
} else {
- return s_htPropIds.get(new Integer(id & Constants.PROPERTY_MASK))
- + "." + s_htPropIds.get(new Integer(id & Constants.COMPOUND_MASK));
+ return propIds.get(new Integer(id & Constants.PROPERTY_MASK))
+ + "." + propIds.get(new Integer(id & Constants.COMPOUND_MASK));
}
}
@@ -403,7 +407,7 @@ public final class FOPropertyMapping imp
m.addEnum("fixed", getEnumProperty(EN_FIXED, "FIXED"));
m.addEnum("absolute", getEnumProperty(EN_ABSOLUTE, "ABSOLUTE"));
m.setDefault("auto");
- m.addShorthand(s_generics[PR_POSITION]);
+ m.addShorthand(generics[PR_POSITION]);
addPropertyMaker("absolute-position", m);
// top
@@ -551,7 +555,7 @@ public final class FOPropertyMapping imp
addPropertyMaker("volume", m);
}
- private void createBorderPaddingBackgroundProperties() {
+ private void createBorderPaddingBackgroundProperties() { // CSOK: MethodLength
PropertyMaker m;
BorderWidthPropertyMaker bwm;
CorrespondingPropertyMaker corr;
@@ -606,7 +610,7 @@ public final class FOPropertyMapping imp
m.addKeyword("center", "50%");
m.addKeyword("right", "100%");
m.setPercentBase(LengthBase.IMAGE_BACKGROUND_POSITION_HORIZONTAL);
- m.addShorthand(s_generics[PR_BACKGROUND_POSITION]);
+ m.addShorthand(generics[PR_BACKGROUND_POSITION]);
addPropertyMaker("background-position-horizontal", m);
// background-position-vertical
@@ -617,7 +621,7 @@ public final class FOPropertyMapping imp
m.addKeyword("center", "50%");
m.addKeyword("bottom", "100%");
m.setPercentBase(LengthBase.IMAGE_BACKGROUND_POSITION_VERTICAL);
- m.addShorthand(s_generics[PR_BACKGROUND_POSITION]);
+ m.addShorthand(generics[PR_BACKGROUND_POSITION]);
addPropertyMaker("background-position-vertical", m);
// border-before-color
@@ -745,9 +749,9 @@ public final class FOPropertyMapping imp
m.useGeneric(genericColor);
m.setInherited(false);
m.setDefault("black");
- m.addShorthand(s_generics[PR_BORDER_TOP]);
- m.addShorthand(s_generics[PR_BORDER_COLOR]);
- m.addShorthand(s_generics[PR_BORDER]);
+ m.addShorthand(generics[PR_BORDER_TOP]);
+ m.addShorthand(generics[PR_BORDER_COLOR]);
+ m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_BEFORE_COLOR, PR_BORDER_BEFORE_COLOR,
PR_BORDER_START_COLOR);
@@ -756,9 +760,9 @@ public final class FOPropertyMapping imp
// border-top-style
m = new EnumProperty.Maker(PR_BORDER_TOP_STYLE);
m.useGeneric(genericBorderStyle);
- m.addShorthand(s_generics[PR_BORDER_TOP]);
- m.addShorthand(s_generics[PR_BORDER_STYLE]);
- m.addShorthand(s_generics[PR_BORDER]);
+ m.addShorthand(generics[PR_BORDER_TOP]);
+ m.addShorthand(generics[PR_BORDER_STYLE]);
+ m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_BEFORE_STYLE, PR_BORDER_BEFORE_STYLE,
PR_BORDER_START_STYLE);
@@ -768,9 +772,9 @@ public final class FOPropertyMapping imp
bwm = new BorderWidthPropertyMaker(PR_BORDER_TOP_WIDTH);
bwm.useGeneric(genericBorderWidth);
bwm.setBorderStyleId(PR_BORDER_TOP_STYLE);
- bwm.addShorthand(s_generics[PR_BORDER_TOP]);
- bwm.addShorthand(s_generics[PR_BORDER_WIDTH]);
- bwm.addShorthand(s_generics[PR_BORDER]);
+ bwm.addShorthand(generics[PR_BORDER_TOP]);
+ bwm.addShorthand(generics[PR_BORDER_WIDTH]);
+ bwm.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(bwm);
corr.setCorresponding(PR_BORDER_BEFORE_WIDTH, PR_BORDER_BEFORE_WIDTH,
PR_BORDER_START_WIDTH);
@@ -781,9 +785,9 @@ public final class FOPropertyMapping imp
m.useGeneric(genericColor);
m.setInherited(false);
m.setDefault("black");
- m.addShorthand(s_generics[PR_BORDER_BOTTOM]);
- m.addShorthand(s_generics[PR_BORDER_COLOR]);
- m.addShorthand(s_generics[PR_BORDER]);
+ m.addShorthand(generics[PR_BORDER_BOTTOM]);
+ m.addShorthand(generics[PR_BORDER_COLOR]);
+ m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_AFTER_COLOR, PR_BORDER_AFTER_COLOR,
PR_BORDER_END_COLOR);
@@ -792,9 +796,9 @@ public final class FOPropertyMapping imp
// border-bottom-style
m = new EnumProperty.Maker(PR_BORDER_BOTTOM_STYLE);
m.useGeneric(genericBorderStyle);
- m.addShorthand(s_generics[PR_BORDER_BOTTOM]);
- m.addShorthand(s_generics[PR_BORDER_STYLE]);
- m.addShorthand(s_generics[PR_BORDER]);
+ m.addShorthand(generics[PR_BORDER_BOTTOM]);
+ m.addShorthand(generics[PR_BORDER_STYLE]);
+ m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_AFTER_STYLE, PR_BORDER_AFTER_STYLE,
PR_BORDER_END_STYLE);
@@ -804,9 +808,9 @@ public final class FOPropertyMapping imp
bwm = new BorderWidthPropertyMaker(PR_BORDER_BOTTOM_WIDTH);
bwm.useGeneric(genericBorderWidth);
bwm.setBorderStyleId(PR_BORDER_BOTTOM_STYLE);
- bwm.addShorthand(s_generics[PR_BORDER_BOTTOM]);
- bwm.addShorthand(s_generics[PR_BORDER_WIDTH]);
- bwm.addShorthand(s_generics[PR_BORDER]);
+ bwm.addShorthand(generics[PR_BORDER_BOTTOM]);
+ bwm.addShorthand(generics[PR_BORDER_WIDTH]);
+ bwm.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(bwm);
corr.setCorresponding(PR_BORDER_AFTER_WIDTH, PR_BORDER_AFTER_WIDTH,
PR_BORDER_END_WIDTH);
@@ -817,9 +821,9 @@ public final class FOPropertyMapping imp
m.useGeneric(genericColor);
m.setInherited(false);
m.setDefault("black");
- m.addShorthand(s_generics[PR_BORDER_LEFT]);
- m.addShorthand(s_generics[PR_BORDER_COLOR]);
- m.addShorthand(s_generics[PR_BORDER]);
+ m.addShorthand(generics[PR_BORDER_LEFT]);
+ m.addShorthand(generics[PR_BORDER_COLOR]);
+ m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_START_COLOR, PR_BORDER_END_COLOR,
PR_BORDER_AFTER_COLOR);
@@ -828,9 +832,9 @@ public final class FOPropertyMapping imp
// border-left-style
m = new EnumProperty.Maker(PR_BORDER_LEFT_STYLE);
m.useGeneric(genericBorderStyle);
- m.addShorthand(s_generics[PR_BORDER_LEFT]);
- m.addShorthand(s_generics[PR_BORDER_STYLE]);
- m.addShorthand(s_generics[PR_BORDER]);
+ m.addShorthand(generics[PR_BORDER_LEFT]);
+ m.addShorthand(generics[PR_BORDER_STYLE]);
+ m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_START_STYLE, PR_BORDER_END_STYLE,
PR_BORDER_AFTER_STYLE);
@@ -840,9 +844,9 @@ public final class FOPropertyMapping imp
bwm = new BorderWidthPropertyMaker(PR_BORDER_LEFT_WIDTH);
bwm.useGeneric(genericBorderWidth);
bwm.setBorderStyleId(PR_BORDER_LEFT_STYLE);
- bwm.addShorthand(s_generics[PR_BORDER_LEFT]);
- bwm.addShorthand(s_generics[PR_BORDER_WIDTH]);
- bwm.addShorthand(s_generics[PR_BORDER]);
+ bwm.addShorthand(generics[PR_BORDER_LEFT]);
+ bwm.addShorthand(generics[PR_BORDER_WIDTH]);
+ bwm.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(bwm);
corr.setCorresponding(PR_BORDER_START_WIDTH, PR_BORDER_END_WIDTH,
PR_BORDER_AFTER_WIDTH);
@@ -853,9 +857,9 @@ public final class FOPropertyMapping imp
m.useGeneric(genericColor);
m.setInherited(false);
m.setDefault("black");
- m.addShorthand(s_generics[PR_BORDER_RIGHT]);
- m.addShorthand(s_generics[PR_BORDER_COLOR]);
- m.addShorthand(s_generics[PR_BORDER]);
+ m.addShorthand(generics[PR_BORDER_RIGHT]);
+ m.addShorthand(generics[PR_BORDER_COLOR]);
+ m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_END_COLOR, PR_BORDER_START_COLOR,
PR_BORDER_BEFORE_COLOR);
@@ -864,9 +868,9 @@ public final class FOPropertyMapping imp
// border-right-style
m = new EnumProperty.Maker(PR_BORDER_RIGHT_STYLE);
m.useGeneric(genericBorderStyle);
- m.addShorthand(s_generics[PR_BORDER_RIGHT]);
- m.addShorthand(s_generics[PR_BORDER_STYLE]);
- m.addShorthand(s_generics[PR_BORDER]);
+ m.addShorthand(generics[PR_BORDER_RIGHT]);
+ m.addShorthand(generics[PR_BORDER_STYLE]);
+ m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_END_STYLE, PR_BORDER_START_STYLE,
PR_BORDER_BEFORE_STYLE);
@@ -876,9 +880,9 @@ public final class FOPropertyMapping imp
bwm = new BorderWidthPropertyMaker(PR_BORDER_RIGHT_WIDTH);
bwm.useGeneric(genericBorderWidth);
bwm.setBorderStyleId(PR_BORDER_RIGHT_STYLE);
- bwm.addShorthand(s_generics[PR_BORDER_RIGHT]);
- bwm.addShorthand(s_generics[PR_BORDER_WIDTH]);
- bwm.addShorthand(s_generics[PR_BORDER]);
+ bwm.addShorthand(generics[PR_BORDER_RIGHT]);
+ bwm.addShorthand(generics[PR_BORDER_WIDTH]);
+ bwm.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(bwm);
corr.setCorresponding(PR_BORDER_END_WIDTH, PR_BORDER_START_WIDTH,
PR_BORDER_BEFORE_WIDTH);
@@ -964,7 +968,7 @@ public final class FOPropertyMapping imp
m = new FontFamilyProperty.Maker(PR_FONT_FAMILY);
m.setInherited(true);
m.setDefault("sans-serif,Symbol,ZapfDingbats");
- m.addShorthand(s_generics[PR_FONT]);
+ m.addShorthand(generics[PR_FONT]);
addPropertyMaker("font-family", m);
// font-selection-strategy
@@ -990,7 +994,7 @@ public final class FOPropertyMapping imp
m.addEnum("larger", getEnumProperty(EN_LARGER, "LARGER"));
m.addEnum("smaller", getEnumProperty(EN_SMALLER, "SMALLER"));
m.setPercentBase(LengthBase.INH_FONTSIZE);
- m.addShorthand(s_generics[PR_FONT]);
+ m.addShorthand(generics[PR_FONT]);
addPropertyMaker("font-size", m);
// font-stretch
@@ -1024,7 +1028,7 @@ public final class FOPropertyMapping imp
m.addEnum("oblique", getEnumProperty(EN_OBLIQUE, "OBLIQUE"));
m.addEnum("backslant", getEnumProperty(EN_BACKSLANT, "BACKSLANT"));
m.setDefault("normal");
- m.addShorthand(s_generics[PR_FONT]);
+ m.addShorthand(generics[PR_FONT]);
addPropertyMaker("font-style", m);
// font-variant
@@ -1033,7 +1037,7 @@ public final class FOPropertyMapping imp
m.addEnum("normal", getEnumProperty(EN_NORMAL, "NORMAL"));
m.addEnum("small-caps", getEnumProperty(EN_SMALL_CAPS, "SMALL_CAPS"));
m.setDefault("normal");
- m.addShorthand(s_generics[PR_FONT]);
+ m.addShorthand(generics[PR_FONT]);
addPropertyMaker("font-variant", m);
// font-weight
@@ -1053,7 +1057,7 @@ public final class FOPropertyMapping imp
m.addEnum("800", getEnumProperty(EN_800, "800"));
m.addEnum("900", getEnumProperty(EN_900, "900"));
m.setDefault("400");
- m.addShorthand(s_generics[PR_FONT]);
+ m.addShorthand(generics[PR_FONT]);
addPropertyMaker("font-weight", m);
}
@@ -1064,14 +1068,14 @@ public final class FOPropertyMapping imp
m = new StringProperty.Maker(PR_COUNTRY);
m.setInherited(true);
m.setDefault("none");
- m.addShorthand(s_generics[PR_XML_LANG]);
+ m.addShorthand(generics[PR_XML_LANG]);
addPropertyMaker("country", m);
// language
m = new StringProperty.Maker(PR_LANGUAGE);
m.setInherited(true);
m.setDefault("none");
- m.addShorthand(s_generics[PR_XML_LANG]);
+ m.addShorthand(generics[PR_XML_LANG]);
addPropertyMaker("language", m);
// script
@@ -1114,7 +1118,7 @@ public final class FOPropertyMapping imp
m = new LengthProperty.Maker(PR_MARGIN_TOP);
m.setInherited(false);
m.setDefault("0pt");
- m.addShorthand(s_generics[PR_MARGIN]);
+ m.addShorthand(generics[PR_MARGIN]);
m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
addPropertyMaker("margin-top", m);
@@ -1122,7 +1126,7 @@ public final class FOPropertyMapping imp
m = new LengthProperty.Maker(PR_MARGIN_BOTTOM);
m.setInherited(false);
m.setDefault("0pt");
- m.addShorthand(s_generics[PR_MARGIN]);
+ m.addShorthand(generics[PR_MARGIN]);
m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
addPropertyMaker("margin-bottom", m);
@@ -1130,7 +1134,7 @@ public final class FOPropertyMapping imp
m = new LengthProperty.Maker(PR_MARGIN_LEFT);
m.setInherited(false);
m.setDefault("0pt");
- m.addShorthand(s_generics[PR_MARGIN]);
+ m.addShorthand(generics[PR_MARGIN]);
m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
addPropertyMaker("margin-left", m);
@@ -1138,7 +1142,7 @@ public final class FOPropertyMapping imp
m = new LengthProperty.Maker(PR_MARGIN_RIGHT);
m.setInherited(false);
m.setDefault("0pt");
- m.addShorthand(s_generics[PR_MARGIN]);
+ m.addShorthand(generics[PR_MARGIN]);
m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
addPropertyMaker("margin-right", m);
@@ -1218,7 +1222,7 @@ public final class FOPropertyMapping imp
m.addEnum("static", getEnumProperty(EN_STATIC, "STATIC"));
m.addEnum("relative", getEnumProperty(EN_RELATIVE, "RELATIVE"));
m.setDefault("static");
- m.addShorthand(s_generics[PR_POSITION]);
+ m.addShorthand(generics[PR_POSITION]);
addPropertyMaker("relative-position", m);
}
@@ -1242,7 +1246,7 @@ public final class FOPropertyMapping imp
m.addEnum("mathematical", getEnumProperty(EN_MATHEMATICAL, "MATHEMATICAL"));
m.setDefault("auto");
m.setPercentBase(LengthBase.ALIGNMENT_ADJUST);
- m.addShorthand(s_generics[PR_VERTICAL_ALIGN]);
+ m.addShorthand(generics[PR_VERTICAL_ALIGN]);
addPropertyMaker("alignment-adjust", m);
// alignment-baseline
@@ -1261,7 +1265,7 @@ public final class FOPropertyMapping imp
m.addEnum("hanging", getEnumProperty(EN_HANGING, "HANGING"));
m.addEnum("mathematical", getEnumProperty(EN_MATHEMATICAL, "MATHEMATICAL"));
m.setDefault("auto");
- m.addShorthand(s_generics[PR_VERTICAL_ALIGN]);
+ m.addShorthand(generics[PR_VERTICAL_ALIGN]);
addPropertyMaker("alignment-baseline", m);
// baseline-shift
@@ -1271,7 +1275,7 @@ public final class FOPropertyMapping imp
m.addEnum("sub", getEnumProperty(EN_SUB, "SUB"));
m.addEnum("super", getEnumProperty(EN_SUPER, "SUPER"));
m.setDefault("baseline");
- m.addShorthand(s_generics[PR_VERTICAL_ALIGN]);
+ m.addShorthand(generics[PR_VERTICAL_ALIGN]);
m.setPercentBase(LengthBase.CUSTOM_BASE);
addPropertyMaker("baseline-shift", m);
@@ -1303,7 +1307,7 @@ public final class FOPropertyMapping imp
m.addEnum("text-after-edge", getEnumProperty(EN_TEXT_AFTER_EDGE, "TEXT_AFTER_EDGE"));
m.addEnum("text-before-edge", getEnumProperty(EN_TEXT_BEFORE_EDGE, "TEXT_BEFORE_EDGE"));
m.setDefault("auto");
- m.addShorthand(s_generics[PR_VERTICAL_ALIGN]);
+ m.addShorthand(generics[PR_VERTICAL_ALIGN]);
addPropertyMaker("dominant-baseline", m);
// relative-align
@@ -1315,7 +1319,7 @@ public final class FOPropertyMapping imp
addPropertyMaker("relative-align", m);
}
- private void createAreaDimensionProperties() {
+ private void createAreaDimensionProperties() { // CSOK: MethodLength
PropertyMaker m;
LengthProperty.Maker l;
DimensionPropertyMaker pdim;
@@ -1464,8 +1468,10 @@ public final class FOPropertyMapping imp
m = new EnumProperty.Maker(PR_SCALING_METHOD);
m.setInherited(false);
m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
- m.addEnum("integer-pixels", getEnumProperty(EN_INTEGER_PIXELS, "INTEGER_PIXELS"));
- m.addEnum("resample-any-method", getEnumProperty(EN_RESAMPLE_ANY_METHOD, "RESAMPLE_ANY_METHOD"));
+ m.addEnum("integer-pixels",
+ getEnumProperty(EN_INTEGER_PIXELS, "INTEGER_PIXELS"));
+ m.addEnum("resample-any-method",
+ getEnumProperty(EN_RESAMPLE_ANY_METHOD, "RESAMPLE_ANY_METHOD"));
m.setDefault("auto");
addPropertyMaker("scaling-method", m);
@@ -1484,7 +1490,7 @@ public final class FOPropertyMapping imp
addPropertyMaker("fox:block-progression-unit", l);
}
- private void createBlockAndLineProperties() {
+ private void createBlockAndLineProperties() { // CSOK: MethodLength
PropertyMaker m;
// hyphenation-keep
@@ -1517,7 +1523,7 @@ public final class FOPropertyMapping imp
m.addKeyword("normal", "1.2");
m.setPercentBase(LengthBase.FONTSIZE);
m.setDefault("normal", true);
- m.addShorthand(s_generics[PR_FONT]);
+ m.addShorthand(generics[PR_FONT]);
addPropertyMaker("line-height", m);
// line-height-shift-adjustment
@@ -1543,9 +1549,11 @@ public final class FOPropertyMapping imp
m.addEnum("ignore", getEnumProperty(EN_IGNORE, "IGNORE"));
m.addEnum("preserve", getEnumProperty(EN_PRESERVE, "PRESERVE"));
m.addEnum("treat-as-space", getEnumProperty(EN_TREAT_AS_SPACE, "TREAT_AS_SPACE"));
- m.addEnum("treat-as-zero-width-space", getEnumProperty(EN_TREAT_AS_ZERO_WIDTH_SPACE, "TREAT_AS_ZERO_WIDTH_SPACE"));
+ m.addEnum("treat-as-zero-width-space",
+ getEnumProperty(EN_TREAT_AS_ZERO_WIDTH_SPACE,
+ "TREAT_AS_ZERO_WIDTH_SPACE"));
m.setDefault("treat-as-space");
- m.addShorthand(s_generics[PR_WHITE_SPACE]);
+ m.addShorthand(generics[PR_WHITE_SPACE]);
addPropertyMaker("linefeed-treatment", m);
// white-space-treatment
@@ -1553,11 +1561,17 @@ public final class FOPropertyMapping imp
m.setInherited(true);
m.addEnum("ignore", getEnumProperty(EN_IGNORE, "IGNORE"));
m.addEnum("preserve", getEnumProperty(EN_PRESERVE, "PRESERVE"));
- m.addEnum("ignore-if-before-linefeed", getEnumProperty(EN_IGNORE_IF_BEFORE_LINEFEED, "IGNORE_IF_BEFORE_LINEFEED"));
- m.addEnum("ignore-if-after-linefeed", getEnumProperty(EN_IGNORE_IF_AFTER_LINEFEED, "IGNORE_IF_AFTER_LINEFEED"));
- m.addEnum("ignore-if-surrounding-linefeed", getEnumProperty(EN_IGNORE_IF_SURROUNDING_LINEFEED, "IGNORE_IF_SURROUNDING_LINEFEED"));
+ m.addEnum("ignore-if-before-linefeed",
+ getEnumProperty(EN_IGNORE_IF_BEFORE_LINEFEED,
+ "IGNORE_IF_BEFORE_LINEFEED"));
+ m.addEnum("ignore-if-after-linefeed",
+ getEnumProperty(EN_IGNORE_IF_AFTER_LINEFEED,
+ "IGNORE_IF_AFTER_LINEFEED"));
+ m.addEnum("ignore-if-surrounding-linefeed",
+ getEnumProperty(EN_IGNORE_IF_SURROUNDING_LINEFEED,
+ "IGNORE_IF_SURROUNDING_LINEFEED"));
m.setDefault("ignore-if-surrounding-linefeed");
- m.addShorthand(s_generics[PR_WHITE_SPACE]);
+ m.addShorthand(generics[PR_WHITE_SPACE]);
addPropertyMaker("white-space-treatment", m);
// text-align TODO: make it a StringProperty with enums.
@@ -1637,7 +1651,7 @@ public final class FOPropertyMapping imp
m.useGeneric(genericBoolean);
m.setInherited(true);
m.setDefault("true");
- m.addShorthand(s_generics[PR_WHITE_SPACE]);
+ m.addShorthand(generics[PR_WHITE_SPACE]);
addPropertyMaker("white-space-collapse", m);
// wrap-option
@@ -1646,7 +1660,7 @@ public final class FOPropertyMapping imp
m.addEnum("wrap", getEnumProperty(EN_WRAP, "WRAP"));
m.addEnum("no-wrap", getEnumProperty(EN_NO_WRAP, "NO_WRAP"));
m.setDefault("wrap");
- m.addShorthand(s_generics[PR_WHITE_SPACE]);
+ m.addShorthand(generics[PR_WHITE_SPACE]);
addPropertyMaker("wrap-option", m);
}
@@ -1750,9 +1764,11 @@ public final class FOPropertyMapping imp
m.setInherited(false);
m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
m.addEnum("perceptual", getEnumProperty(EN_PERCEPTUAL, "PERCEPTUAL"));
- m.addEnum("relative-colorimetric", getEnumProperty(EN_RELATIVE_COLOMETRIC, "RELATIVE_COLOMETRIC"));
+ m.addEnum("relative-colorimetric", getEnumProperty(EN_RELATIVE_COLOMETRIC,
+ "RELATIVE_COLOMETRIC"));
m.addEnum("saturation", getEnumProperty(EN_SATURATION, "SATURATION"));
- m.addEnum("absolute-colorimetric", getEnumProperty(EN_ABSOLUTE_COLORMETRIC, "ABSOLUTE_COLORMETRIC"));
+ m.addEnum("absolute-colorimetric", getEnumProperty(EN_ABSOLUTE_COLORMETRIC,
+ "ABSOLUTE_COLORMETRIC"));
m.setDefault("auto");
addPropertyMaker("rendering-intent", m);
}
@@ -1804,13 +1820,13 @@ public final class FOPropertyMapping imp
// break-after
m = new EnumProperty.Maker(PR_BREAK_AFTER);
m.useGeneric(genericBreak);
- m.addShorthand(s_generics[PR_PAGE_BREAK_AFTER]);
+ m.addShorthand(generics[PR_PAGE_BREAK_AFTER]);
addPropertyMaker("break-after", m);
// break-before
m = new EnumProperty.Maker(PR_BREAK_BEFORE);
m.useGeneric(genericBreak);
- m.addShorthand(s_generics[PR_PAGE_BREAK_BEFORE]);
+ m.addShorthand(generics[PR_PAGE_BREAK_BEFORE]);
addPropertyMaker("break-before", m);
// keep-together
@@ -1818,7 +1834,7 @@ public final class FOPropertyMapping imp
m.useGeneric(genericKeep);
m.setInherited(true);
m.setDefault("auto");
- m.addShorthand(s_generics[PR_PAGE_BREAK_INSIDE]);
+ m.addShorthand(generics[PR_PAGE_BREAK_INSIDE]);
addPropertyMaker("keep-together", m);
// keep-with-next
@@ -1826,7 +1842,7 @@ public final class FOPropertyMapping imp
m.useGeneric(genericKeep);
m.setInherited(false);
m.setDefault("auto");
- m.addShorthand(s_generics[PR_PAGE_BREAK_AFTER]);
+ m.addShorthand(generics[PR_PAGE_BREAK_AFTER]);
addPropertyMaker("keep-with-next", m);
// keep-with-previous
@@ -1834,7 +1850,7 @@ public final class FOPropertyMapping imp
m.useGeneric(genericKeep);
m.setInherited(false);
m.setDefault("auto");
- m.addShorthand(s_generics[PR_PAGE_BREAK_BEFORE]);
+ m.addShorthand(generics[PR_PAGE_BREAK_BEFORE]);
addPropertyMaker("keep-with-previous", m);
// orphans
@@ -2240,7 +2256,8 @@ public final class FOPropertyMapping imp
m.setInherited(false);
m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
m.addEnum("paginate", getEnumProperty(EN_PAGINATE, "PAGINATE"));
- m.addEnum("bounded-in-one-dimension", getEnumProperty(EN_BOUNDED_IN_ONE_DIMENSION, "BOUNDED_IN_ONE_DIMENSION"));
+ m.addEnum("bounded-in-one-dimension", getEnumProperty(EN_BOUNDED_IN_ONE_DIMENSION,
+ "BOUNDED_IN_ONE_DIMENSION"));
m.addEnum("unbounded", getEnumProperty(EN_UNBOUNDED, "UNBOUNDED"));
m.setDefault("auto");
addPropertyMaker("media-usage", m);
@@ -2330,7 +2347,7 @@ public final class FOPropertyMapping imp
// border-separation
m = new LengthPairProperty.Maker(PR_BORDER_SEPARATION);
m.setInherited(true);
- m.addShorthand(s_generics[PR_BORDER_SPACING]);
+ m.addShorthand(generics[PR_BORDER_SPACING]);
sub = new LengthProperty.Maker(CP_BLOCK_PROGRESSION_DIRECTION);
sub.setDefault("0pt");
@@ -2577,7 +2594,7 @@ public final class FOPropertyMapping imp
addPropertyMaker("z-index", m);
}
- private void createShorthandProperties() {
+ private void createShorthandProperties() { // CSOK: MethodLength
PropertyMaker m;
// background
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOText.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOText.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOText.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOText.java Tue Aug 17 18:57:04 2010
@@ -489,10 +489,10 @@ public class FOText extends FONode imple
private class TextCharIterator extends CharIterator {
- int currentPosition = 0;
+ private int currentPosition = 0;
- boolean canRemove = false;
- boolean canReplace = false;
+ private boolean canRemove = false;
+ private boolean canReplace = false;
/** {@inheritDoc} */
public boolean hasNext() {
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FObj.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FObj.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FObj.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FObj.java Tue Aug 17 18:57:04 2010
@@ -44,7 +44,7 @@ import org.apache.fop.fo.properties.Prop
public abstract class FObj extends FONode implements Constants {
/** the list of property makers */
- private static final PropertyMaker[] propertyListTable
+ private static final PropertyMaker[] PROPERTY_LIST_TABLE
= FOPropertyMapping.getGenericMappings();
/**
@@ -108,7 +108,7 @@ public abstract class FObj extends FONod
* @return the requested Property Maker
*/
public static PropertyMaker getPropertyMakerFor(int propId) {
- return propertyListTable[propId];
+ return PROPERTY_LIST_TABLE[propId];
}
/** {@inheritDoc} */
@@ -255,7 +255,7 @@ public abstract class FObj extends FONod
/**
* Check if this formatting object generates reference areas.
* @return true if generates reference areas
- * @todo see if needed
+ * @asf.todo see if needed
*/
public boolean generatesReferenceAreas() {
return false;
@@ -610,7 +610,7 @@ public abstract class FObj extends FONod
return (super.toString() + "[@id=" + this.id + "]");
}
- /** Basic {@link FONodeIterator} implementation */
+ /** Basic {@link FONode.FONodeIterator} implementation */
public class FObjIterator implements FONodeIterator {
private static final int F_NONE_ALLOWED = 0;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/NullCharIterator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/NullCharIterator.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/NullCharIterator.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/NullCharIterator.java Tue Aug 17 18:57:04 2010
@@ -28,6 +28,10 @@ public class NullCharIterator extends Ch
private static CharIterator instance;
+ /**
+ * Obtain the singleton instance of the null character iterator.
+ * @return the char iterator
+ */
public static CharIterator getInstance() {
if (instance == null) {
instance = new NullCharIterator();
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/PropertyListMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/PropertyListMaker.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/PropertyListMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/PropertyListMaker.java Tue Aug 17 18:57:04 2010
@@ -23,6 +23,13 @@ package org.apache.fop.fo;
* A PropertyListMaker is a factory that creates PropertyLists.
*/
public interface PropertyListMaker {
+
+ /**
+ * Make a property list.
+ * @param fobj the FO from which the new property list is associated
+ * @param parentPropertyList the parent property list
+ * @return the new property list
+ */
PropertyList make(FObj fobj, PropertyList parentPropertyList);
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/StaticPropertyList.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/StaticPropertyList.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/StaticPropertyList.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/StaticPropertyList.java Tue Aug 17 18:57:04 2010
@@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+/* $Id$ */
+
package org.apache.fop.fo;
import org.apache.fop.fo.expr.PropertyException;
@@ -62,14 +65,14 @@ public class StaticPropertyList extends
/**
* Override PropertyList.get() and provides fast caching of previously
* retrieved property values.
- * @param propId The property ID
+ * {@inheritDoc}
*/
public Property get(int propId, boolean bTryInherit, boolean bTryDefault)
- throws PropertyException
- {
+ throws PropertyException {
Property p = values[propId];
if (p == null) {
- p = values[propId] = super.get(propId, bTryInherit, bTryDefault);
+ p = super.get(propId, bTryInherit, bTryDefault);
+ values[propId] = p;
}
return p;
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ValidationException.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ValidationException.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ValidationException.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ValidationException.java Tue Aug 17 18:57:04 2010
@@ -26,10 +26,20 @@ import org.xml.sax.Locator;
* Exception thrown during FO tree validation.
*/
public class ValidationException extends FOPException {
+
+ /**
+ * Construct a validation exception instance.
+ * @param message a message
+ */
public ValidationException(String message) {
super(message);
}
+ /**
+ * Construct a validation exception instance.
+ * @param message a message
+ * @param locator a locator
+ */
public ValidationException(String message, Locator locator) {
super(message, locator);
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/expr/BodyStartFunction.java?rev=986451&r1=986450&r2=986451&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/expr/BodyStartFunction.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/expr/BodyStartFunction.java Tue Aug 17 18:57:04 2010
@@ -47,8 +47,9 @@ public class BodyStartFunction extends F
*/
public Property eval(Property[] args,
PropertyInfo pInfo) throws PropertyException {
- Numeric distance =
- pInfo.getPropertyList().get(Constants.PR_PROVISIONAL_DISTANCE_BETWEEN_STARTS).getNumeric();
+ Numeric distance
+ = pInfo.getPropertyList()
+ .get(Constants.PR_PROVISIONAL_DISTANCE_BETWEEN_STARTS).getNumeric();
PropertyList pList = pInfo.getPropertyList();
while (pList != null && !(pList.getFObj() instanceof ListItem)) {
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org