changeset 323:a88e15972c72

Updated Batik library to 1.7 gnv-artifacts/trunk@386 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 30 Nov 2009 15:04:26 +0000
parents 57a2bf630854
children e6e172a4915e
files gnv-artifacts/ChangeLog gnv-artifacts/pom.xml gnv-artifacts/src/main/java/de/intevation/gnv/exports/ChartExportHelper.java
diffstat 3 files changed, 15 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Mon Nov 30 14:19:23 2009 +0000
+++ b/gnv-artifacts/ChangeLog	Mon Nov 30 15:04:26 2009 +0000
@@ -1,3 +1,11 @@
+2009-11-30  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	* pom.xml: Updated batik dependencies to 1.7
+
+	* src/main/java/de/intevation/gnv/exports/ChartExportHelper.java: Use
+	  java native DOMImplementation instead of Batik's SVGDOMImplementation,
+	  which is not present in batik 1.7 libs.
+
 2009-11-30  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	* doc/conf/products/horizontalcrosssection/conf_mesh.xml,
--- a/gnv-artifacts/pom.xml	Mon Nov 30 14:19:23 2009 +0000
+++ b/gnv-artifacts/pom.xml	Mon Nov 30 15:04:26 2009 +0000
@@ -79,14 +79,14 @@
       <version>1.0.15</version>
     </dependency>
     <dependency>
-      <groupId>batik</groupId>
+      <groupId>org.apache.xmlgraphics</groupId>
       <artifactId>batik-dom</artifactId>
-      <version>1.6-1</version>
+      <version>1.7</version>
     </dependency> 
     <dependency>
-      <groupId>batik</groupId>
+      <groupId>org.apache.xmlgraphics</groupId>
       <artifactId>batik-svggen</artifactId>
-      <version>1.6-1</version>
+      <version>1.7</version>
     </dependency> 
     <dependency>
       <groupId>com.lowagie</groupId>
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/exports/ChartExportHelper.java	Mon Nov 30 14:19:23 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/exports/ChartExportHelper.java	Mon Nov 30 15:04:26 2009 +0000
@@ -18,13 +18,14 @@
 import java.io.UnsupportedEncodingException;
 import javax.imageio.ImageIO;
 
-import org.apache.batik.dom.svg.SVGDOMImplementation;
 import org.apache.batik.svggen.SVGGraphics2D;
 import org.apache.batik.svggen.SVGGraphics2DIOException;
 import org.apache.log4j.Logger;
 
 import org.jfree.chart.JFreeChart;
 
+import de.intevation.artifactdatabase.XMLUtils;
+
 
 /**
  * @author Ingo Weinzierl <ingo.weinzierl@intevation.de>
@@ -69,8 +70,7 @@
         if (encoding == null)
             encoding = DEFAULT_ENCODING;
 
-        SVGDOMImplementation svgDom   = new SVGDOMImplementation();
-        org.w3c.dom.Document document = svgDom.createDocument(null,"svg",null);
+        org.w3c.dom.Document document = XMLUtils.newDocument();
         SVGGraphics2D        graphics = new SVGGraphics2D(document);
 
         chart.draw(graphics, new Rectangle2D.Double(0.0D, 0.0D,width,height));

http://dive4elements.wald.intevation.org