diff options
author | Glen Mazza <gmazza@apache.org> | 2004-03-31 10:55:07 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2004-03-31 10:55:07 +0000 |
commit | a054ab3b7e22af6c163b5d68c04bf5868958a59e (patch) | |
tree | 158b4e54cf28f6dd1926de530309ffc2b1ceb3d4 /src/java/org/apache/fop/image | |
parent | b0ef412c716311de35850f0d6ae56a1b7f7d8acf (diff) | |
download | xmlgraphics-fop-a054ab3b7e22af6c163b5d68c04bf5868958a59e.tar.gz xmlgraphics-fop-a054ab3b7e22af6c163b5d68c04bf5868958a59e.zip |
PR:
Obtained from:
Submitted by:
Reviewed by:
Conversion of Avalon to Commons-Logger. (Will still need to update the
examples, which I will take care of next; Jeremias will be modifying
the PDF libraries for more efficient use of the CL loggers.)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197474 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/image')
-rw-r--r-- | src/java/org/apache/fop/image/AbstractFopImage.java | 10 | ||||
-rw-r--r-- | src/java/org/apache/fop/image/BmpImage.java | 4 | ||||
-rw-r--r-- | src/java/org/apache/fop/image/FopImage.java | 6 | ||||
-rw-r--r-- | src/java/org/apache/fop/image/GifImage.java | 4 | ||||
-rw-r--r-- | src/java/org/apache/fop/image/ImageFactory.java | 7 | ||||
-rw-r--r-- | src/java/org/apache/fop/image/JimiImage.java | 9 | ||||
-rw-r--r-- | src/java/org/apache/fop/image/JpegImage.java | 4 | ||||
-rw-r--r-- | src/java/org/apache/fop/image/analyser/SVGReader.java | 5 |
8 files changed, 23 insertions, 26 deletions
diff --git a/src/java/org/apache/fop/image/AbstractFopImage.java b/src/java/org/apache/fop/image/AbstractFopImage.java index e34ada6b1..818768226 100644 --- a/src/java/org/apache/fop/image/AbstractFopImage.java +++ b/src/java/org/apache/fop/image/AbstractFopImage.java @@ -25,7 +25,7 @@ import java.io.InputStream; import java.awt.Color; // FOP -import org.apache.avalon.framework.logger.Logger; +import org.apache.commons.logging.Log; /** * Base class to implement the FopImage interface. @@ -125,7 +125,7 @@ public abstract class AbstractFopImage implements FopImage { * @param ua the user agent for handling logging etc. * @return true if the loading was successful */ - public synchronized boolean load(int type, Logger logger) { + public synchronized boolean load(int type, Log logger) { if ((loaded & type) != 0) { return true; } @@ -161,7 +161,7 @@ public abstract class AbstractFopImage implements FopImage { * @param ua the user agent * @return true if the loading was successful */ - protected boolean loadDimensions(Logger logger) { + protected boolean loadDimensions(Log logger) { return false; } @@ -173,7 +173,7 @@ public abstract class AbstractFopImage implements FopImage { * @param ua the user agent * @return true if the loading was successful */ - protected boolean loadBitmap(Logger logger) { + protected boolean loadBitmap(Log logger) { return false; } @@ -185,7 +185,7 @@ public abstract class AbstractFopImage implements FopImage { * @param ua the user agent * @return true if the loading was successful */ - protected boolean loadOriginalData(Logger logger) { + protected boolean loadOriginalData(Log logger) { return false; } diff --git a/src/java/org/apache/fop/image/BmpImage.java b/src/java/org/apache/fop/image/BmpImage.java index 3ea3b9a69..c3bbea192 100644 --- a/src/java/org/apache/fop/image/BmpImage.java +++ b/src/java/org/apache/fop/image/BmpImage.java @@ -23,7 +23,7 @@ import java.io.IOException; import java.awt.color.ColorSpace; // FOP -import org.apache.avalon.framework.logger.Logger; +import org.apache.commons.logging.Log; /** * Bitmap image. @@ -50,7 +50,7 @@ public class BmpImage extends AbstractFopImage { * @param ua the user agent * @return true if it was loaded successfully */ - protected boolean loadBitmap(Logger logger) { + protected boolean loadBitmap(Log logger) { int wpos = 18; int hpos = 22; // offset positioning for w and height in bmp files int[] headermap = new int[54]; diff --git a/src/java/org/apache/fop/image/FopImage.java b/src/java/org/apache/fop/image/FopImage.java index 27f088c26..c1b4aaa86 100644 --- a/src/java/org/apache/fop/image/FopImage.java +++ b/src/java/org/apache/fop/image/FopImage.java @@ -23,7 +23,7 @@ import java.awt.color.ColorSpace; import java.awt.color.ICC_Profile; import java.awt.Color; -import org.apache.avalon.framework.logger.Logger; +import org.apache.commons.logging.Log; /** * Fop image interface for loading images. @@ -61,10 +61,10 @@ public interface FopImage { * the information. * * @param type the type of loading required - * @param logger the Avalon logger + * @param logger the Commons-logging component * @return boolean true if the information could be loaded */ - boolean load(int type, Logger logger); + boolean load(int type, Log logger); /** * Returns the image width. diff --git a/src/java/org/apache/fop/image/GifImage.java b/src/java/org/apache/fop/image/GifImage.java index 257c03b6a..8a23a7d0c 100644 --- a/src/java/org/apache/fop/image/GifImage.java +++ b/src/java/org/apache/fop/image/GifImage.java @@ -29,7 +29,7 @@ import java.io.IOException; import java.net.URLConnection; // FOP -import org.apache.avalon.framework.logger.Logger; +import org.apache.commons.logging.Log; /** * FopImage object for GIF images, using Java native classes. @@ -58,7 +58,7 @@ public class GifImage extends AbstractFopImage { * @param ua the user agent for loading * @return True if the load process succeeded */ - protected boolean loadBitmap(Logger logger) { + protected boolean loadBitmap(Log logger) { int[] tmpMap = null; try { URLConnection con = new DummyConnection(inputStream); diff --git a/src/java/org/apache/fop/image/ImageFactory.java b/src/java/org/apache/fop/image/ImageFactory.java index 45aef78c5..93253240a 100644 --- a/src/java/org/apache/fop/image/ImageFactory.java +++ b/src/java/org/apache/fop/image/ImageFactory.java @@ -29,8 +29,7 @@ import java.util.Set; import java.util.Collections; import java.util.Iterator; -// Avalon -import org.apache.avalon.framework.logger.Logger; +import org.apache.commons.logging.Log; // FOP import org.apache.fop.image.analyser.ImageReaderFactory; @@ -130,7 +129,7 @@ public class ImageFactory { * @return the fop image instance */ public static FopImage loadImage(String href, FOUserAgent ua) { - Logger log = ua.getLogger(); + Log log = ua.getLogger(); InputStream in = openStream(href, ua); @@ -215,7 +214,7 @@ public class ImageFactory { * @return a new FopImage object */ protected static InputStream openStream(String href, FOUserAgent ua) { - Logger log = ua.getLogger(); + Log log = ua.getLogger(); // Get the absolute URL URL absoluteURL = null; InputStream in = null; diff --git a/src/java/org/apache/fop/image/JimiImage.java b/src/java/org/apache/fop/image/JimiImage.java index c64055d45..ab07e8ecf 100644 --- a/src/java/org/apache/fop/image/JimiImage.java +++ b/src/java/org/apache/fop/image/JimiImage.java @@ -28,8 +28,7 @@ import java.awt.Color; // Jimi import com.sun.jimi.core.Jimi; -// Avalon -import org.apache.avalon.framework.logger.Logger; +import org.apache.commons.logging.Log; /** * FopImage object for several images types, using Jimi. @@ -49,7 +48,7 @@ public class JimiImage extends AbstractFopImage { } } - protected boolean loadDimensions(Logger logger) { + protected boolean loadDimensions(Log logger) { if (this.bitmaps == null) { loadImage(logger); } @@ -60,7 +59,7 @@ public class JimiImage extends AbstractFopImage { /** * @see org.apache.fop.image.AbstractFopImage#loadBitmap(Logger) */ - protected boolean loadBitmap(Logger logger) { + protected boolean loadBitmap(Log logger) { if (this.bitmaps == null) { loadImage(logger); } @@ -68,7 +67,7 @@ public class JimiImage extends AbstractFopImage { return this.bitmaps != null; } - protected void loadImage(Logger log) { + protected void loadImage(Log log) { int[] tmpMap = null; try { ImageProducer ip = diff --git a/src/java/org/apache/fop/image/JpegImage.java b/src/java/org/apache/fop/image/JpegImage.java index c0146c840..3ce3ed13e 100644 --- a/src/java/org/apache/fop/image/JpegImage.java +++ b/src/java/org/apache/fop/image/JpegImage.java @@ -24,7 +24,7 @@ import java.awt.color.ColorSpace; import java.awt.color.ICC_Profile; // FOP -import org.apache.avalon.framework.logger.Logger; +import org.apache.commons.logging.Log; import org.apache.fop.util.CMYKColorSpace; /** @@ -55,7 +55,7 @@ public class JpegImage extends AbstractFopImage { * @param ua the user agent * @return true if loaded false for any error */ - protected boolean loadOriginalData(Logger logger) { + protected boolean loadOriginalData(Log logger) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream iccStream = new ByteArrayOutputStream(); int index = 0; diff --git a/src/java/org/apache/fop/image/analyser/SVGReader.java b/src/java/org/apache/fop/image/analyser/SVGReader.java index c7382f3f1..2a3bade9d 100644 --- a/src/java/org/apache/fop/image/analyser/SVGReader.java +++ b/src/java/org/apache/fop/image/analyser/SVGReader.java @@ -27,8 +27,7 @@ import java.awt.geom.AffineTransform; import org.w3c.dom.Element; import org.w3c.dom.svg.SVGDocument; -// Avalon -import org.apache.avalon.framework.logger.Logger; +import org.apache.commons.logging.Log; // Batik import org.apache.batik.dom.svg.SAXSVGDocumentFactory; @@ -108,7 +107,7 @@ public class SVGReader implements ImageReader { */ class Loader { private FopImage.ImageInfo getImage(String uri, InputStream fis, - Logger logger, float pixelUnitToMM) { + Log logger, float pixelUnitToMM) { // parse document and get the size attributes of the svg element try { |