diff options
author | Glen Mazza <gmazza@apache.org> | 2004-05-12 23:19:53 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2004-05-12 23:19:53 +0000 |
commit | f6064f69f4c9c001d9ab0db3d82f00e92a4359b0 (patch) | |
tree | f3729a95932f2a42c07bba8bd380a63a6a354578 /src/java/org/apache/fop/render/pdf/PDFXMLHandler.java | |
parent | 240bcc0c6d3af5ce0e8f9d2c2ca40f0d546f5b9f (diff) | |
download | xmlgraphics-fop-f6064f69f4c9c001d9ab0db3d82f00e92a4359b0.tar.gz xmlgraphics-fop-f6064f69f4c9c001d9ab0db3d82f00e92a4359b0.zip |
Removed the getLogger() and setLogger() from FOUserAgent; replaced with Commons Logging
equivalents in places where previously used.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197591 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/pdf/PDFXMLHandler.java')
-rw-r--r-- | src/java/org/apache/fop/render/pdf/PDFXMLHandler.java | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java b/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java index 38d28e90b..a1debb513 100644 --- a/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java +++ b/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java @@ -32,8 +32,13 @@ import org.apache.fop.svg.PDFGraphics2D; import org.apache.fop.svg.SVGUserAgent; import org.apache.fop.fonts.FontInfo; +// Commons-Logging +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + + /* org.w3c.dom.Document is not imported to avoid conflict with - org.apache.fop.control.Document */ + org.apache.fop.apps.Document */ import java.io.OutputStream; @@ -55,6 +60,12 @@ import java.awt.geom.AffineTransform; * The properties from the PDF renderer are subject to change. */ public class PDFXMLHandler implements XMLHandler { + + /** + * logging instance + */ + private Log log = LogFactory.getLog(PDFXMLHandler.class); + /** * The PDF document that is being drawn into. */ @@ -220,8 +231,7 @@ public class PDFXMLHandler implements XMLHandler { int yOffset = pdfInfo.currentYPosition; SVGUserAgent ua - = new SVGUserAgent(context.getUserAgent().getLogger(), - context.getUserAgent().getPixelUnitToMillimeter(), + = new SVGUserAgent(context.getUserAgent().getPixelUnitToMillimeter(), new AffineTransform()); GVTBuilder builder = new GVTBuilder(); @@ -240,7 +250,7 @@ public class PDFXMLHandler implements XMLHandler { try { root = builder.build(ctx, doc); } catch (Exception e) { - context.getUserAgent().getLogger().error("svg graphic could not be built: " + log.error("svg graphic could not be built: " + e.getMessage(), e); return; } @@ -298,7 +308,7 @@ public class PDFXMLHandler implements XMLHandler { root.paint(graphics); pdfInfo.currentStream.add(graphics.getString()); } catch (Exception e) { - context.getUserAgent().getLogger().error("svg graphic could not be rendered: " + log.error("svg graphic could not be rendered: " + e.getMessage(), e); } |