* Apache xmlgraphics stack upgraded to the latest versions : 81/17281/3
Clément DAVID [Mon, 5 Oct 2015 08:12:39 +0000 (10:12 +0200)]
  - xmlgraphics-commons 2.0.1
  - Batik 1.8
  - FOP 2.0

Change-Id: I29c091f9f779823a5a6a0a45869532bd7ca33359

scilab/CHANGES_6.0.X
scilab/configure
scilab/configure.ac
scilab/etc/classpath.xml.vc
scilab/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java
scilab/modules/graphic_export/src/java/org/scilab/modules/graphic_export/Export.java
scilab/modules/helptools/helptools.iss
scilab/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java
scilab/scilab-lib-doc.properties.vc

index f2179fd..3b5ce73 100644 (file)
@@ -31,6 +31,15 @@ For a high-level overview of the changes in this release, please consult the "Wh
 
 * Bug #14257 fixed - English spelling in messages and in comments.
 
+* Bug #14257 fixed - English spelling in messages and in comments.
+
+Dependencies
+=============
+
+* Apache xmlgraphics stack upgraded to the latest versions :
+  - xmlgraphics-commons 2.0.1
+  - Batik 1.8
+  - FOP 2.0
 
         Changes between version 6.0.0-alpha-1 and 6.0.0-alpha-2
         =======================================================
index 638360c..d506f71 100755 (executable)
@@ -18665,7 +18665,7 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker batik-all org.apache.batik.Version $jar_resolved getVersion 1.7 "
+    cmd="$JAVA conftestSharedChecker batik-all org.apache.batik.Version $jar_resolved getVersion 1.8 "
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
         PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
@@ -18884,7 +18884,7 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker batik org.apache.batik.Version $jar_resolved getVersion 1.7 "
+    cmd="$JAVA conftestSharedChecker batik org.apache.batik.Version $jar_resolved getVersion 1.8 "
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
         PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
index be869c4..918e4c0 100644 (file)
@@ -1054,12 +1054,14 @@ interface for JOGL2 - or libGL (OpenGL library) are installed and if the version
                 fi
 
                 # xml.apache.org SVG Library (under mandriva for example)
-                AC_JAVA_CHECK_JAR([batik-all],[org.apache.batik.Version],[Apache SVG Library],"yes",[getVersion],[1.7])
+                AC_JAVA_CHECK_JAR([batik-all],[org.apache.batik.Version],
+                                  [Apache SVG Library],"yes",[getVersion],[1.8])
                 BATIK=$PACKAGE_JAR_FILE
 
                 if test -z "$BATIK"; then
                    # Other other distribs
-                   AC_JAVA_CHECK_JAR([batik],[org.apache.batik.Version],[Apache SVG Library],[],[getVersion],[1.7])
+                   AC_JAVA_CHECK_JAR([batik],[org.apache.batik.Version],
+                                     [Apache SVG Library],[],[getVersion],[1.8])
                    BATIK=$PACKAGE_JAR_FILE
                 fi
                 AC_SUBST(BATIK)
index ea3b2dd..78493d6 100644 (file)
@@ -98,7 +98,7 @@ The option is "disableUnderMode" and can be:
     <path value="$SCILAB/thirdparty/saxon9he.jar" load="onUse">
         <load on="documentationGeneration"/>
     </path>
-    <path value="$SCILAB/thirdparty/batik-all-1.7.jar" load="onUse">
+    <path value="$SCILAB/thirdparty/batik-all.jar" load="onUse">
         <load on="documentationGeneration"/>
         <load on="graphics_mathml_textrendering"/>
         <load on="svg_graphic_export"/>
@@ -120,7 +120,7 @@ The option is "disableUnderMode" and can be:
     </path>
 
     <!-- PDF doc generation (dep of jeuclid) -->
-    <path value="$SCILAB/thirdparty/xmlgraphics-commons-1.4.jar" load="onUse">
+    <path value="$SCILAB/thirdparty/xmlgraphics-commons.jar" load="onUse">
         <load on="documentationGeneration"/>
         <load on="graphics_mathml_textrendering"/>
         <load on="pdf_ps_eps_graphic_export"/>
index ddf6d1b..3613193 100644 (file)
@@ -28,7 +28,7 @@ import org.apache.batik.bridge.DocumentLoader;
 import org.apache.batik.bridge.GVTBuilder;
 import org.apache.batik.bridge.UserAgent;
 import org.apache.batik.bridge.UserAgentAdapter;
-import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
+import org.apache.batik.anim.dom.SAXSVGDocumentFactory;
 import org.apache.batik.gvt.GraphicsNode;
 import org.apache.batik.util.XMLResourceDescriptor;
 import org.scilab.forge.jlatexmath.ParseException;
index 68a1cf9..5c90cee 100644 (file)
@@ -857,7 +857,7 @@ public class Export {
                     }
 
                     @Override
-                    public int processShape(Shape s) throws IOException {
+                    public int processShape(Shape s, boolean b) throws IOException {
                         if (s instanceof Ellipse2D.Double) {
                             Ellipse2D.Double ell = (Ellipse2D.Double) s;
                             if (ell.height == ell.width) {
@@ -880,10 +880,10 @@ public class Export {
                                     buffer.append("[").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1]));
                                     it.next();
                                 } else {
-                                    return super.processShape(s);
+                                    return super.processShape(s, b);
                                 }
                             } else {
-                                return super.processShape(s);
+                                return super.processShape(s, b);
                             }
 
                             for (; !it.isDone(); it.next()) {
@@ -891,7 +891,7 @@ public class Export {
                                 if (type == PathIterator.SEG_LINETO) {
                                     buffer.append(" ").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1]));
                                 } else {
-                                    return super.processShape(s);
+                                    return super.processShape(s, b);
                                 }
                             }
                             buffer.append("] DP");
@@ -899,7 +899,7 @@ public class Export {
                             return PathIterator.WIND_NON_ZERO;
                         }
 
-                        return super.processShape(s);
+                        return super.processShape(s, b);
                     }
                 };
                 g2d.setGraphicContext(new GraphicContext());
@@ -1029,7 +1029,7 @@ public class Export {
                     }
 
                     @Override
-                    public int processShape(Shape s) throws IOException {
+                    public int processShape(Shape s, boolean b) throws IOException {
                         if (s instanceof Ellipse2D.Double) {
                             Ellipse2D.Double ell = (Ellipse2D.Double) s;
                             if (ell.height == ell.width) {
@@ -1052,10 +1052,10 @@ public class Export {
                                     buffer.append("[").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1]));
                                     it.next();
                                 } else {
-                                    return super.processShape(s);
+                                    return super.processShape(s, b);
                                 }
                             } else {
-                                return super.processShape(s);
+                                return super.processShape(s, b);
                             }
 
                             for (; !it.isDone(); it.next()) {
@@ -1063,7 +1063,7 @@ public class Export {
                                 if (type == PathIterator.SEG_LINETO) {
                                     buffer.append(" ").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1]));
                                 } else {
-                                    return super.processShape(s);
+                                    return super.processShape(s, b);
                                 }
                             }
                             buffer.append("] DP");
@@ -1071,7 +1071,7 @@ public class Export {
                             return PathIterator.WIND_NON_ZERO;
                         }
 
-                        return super.processShape(s);
+                        return super.processShape(s, b);
                     }
 
                 };
index e260293..6b7ee90 100644 (file)
@@ -29,23 +29,10 @@ Source: thirdparty\docbook\*.*;DestDir: {app}\thirdparty\docbook; Flags: recurse
 ;
 Source: thirdparty\jhall.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 Source: thirdparty\avalon-framework.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\avalon-framework.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\avalon-framework.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\batik.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\batik.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 Source: thirdparty\commons-io.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\commons-io.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\commons-io.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 Source: thirdparty\commons-logging.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\commons-logging.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\commons-logging.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 Source: thirdparty\docbook-xsl-saxon.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\fop-hyph.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\fop-hyph.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\fop-hyph.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 Source: thirdparty\fop.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\fop.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\fop.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 Source: thirdparty\jeuclid-core.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 Source: thirdparty\jeuclid.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 Source: thirdparty\jeuclid.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
@@ -54,10 +41,8 @@ Source: thirdparty\saxon.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_
 Source: thirdparty\saxon.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 Source: thirdparty\xml-apis.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 Source: thirdparty\xml-apis-ext.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\xmlgraphics-commons-1.4.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\xmlgraphics-commons.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\xmlgraphics-commons.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: thirdparty\batik-all-1.7.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
+Source: thirdparty\xmlgraphics-commons.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
+Source: thirdparty\batik-all.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 ;
 Source: modules\{#HELPTOOLS}\license.txt; DestDir: {app}\modules\{#HELPTOOLS}; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 ;
index c34f4aa..ad0ebb9 100644 (file)
@@ -43,10 +43,10 @@ public class FopConverter extends ContainerConverter {
         String fileName = outputDirectory + "/" + baseName + "." + format.name().toLowerCase();
 
         try {
-            FopFactory fopFactory = FopFactory.newInstance();
+            final File configuration = new File(System.getenv("SCI") + "/modules/helptools/etc/fopconf.xml");
+            FopFactory fopFactory = FopFactory.newInstance(configuration);
             fopFactory.addElementMapping(new JLaTeXMathElementMapping());
             fopFactory.getXMLHandlerRegistry().addXMLHandler(new JLaTeXMathXMLHandler());
-            fopFactory.setUserConfig(new File(System.getenv("SCI") + "/modules/helptools/etc/fopconf.xml"));
 
             // Step 3: Construct fop with desired output format
             OutputStream out = new BufferedOutputStream(new FileOutputStream(fileName));
index bf8afd3..59c4bc9 100644 (file)
@@ -114,11 +114,10 @@ public class CodeExporter extends FOCodeConverter {
      * @param format the page format
      */
     public void convert(String code, int[] lineNumberArray, String fileName, String type, String title, PageFormat format) {
-        FopFactory fopFactory = FopFactory.newInstance();
         OutputStream out = null;
 
         try {
-            fopFactory.setUserConfig(new File(ScilabConstants.SCI + "/modules/helptools/etc/fopconf.xml"));
+            FopFactory fopFactory = FopFactory.newInstance(new File(ScilabConstants.SCI + "/modules/helptools/etc/fopconf.xml"));
             FOUserAgent userAgent = fopFactory.newFOUserAgent();
             userAgent.setProducer(CREATOR);
             userAgent.setTitle(title);
index 46d23f6..9016d60 100644 (file)
@@ -3,7 +3,7 @@
 xml_apis_ext.jar =${thirdparty.dir}/xml_apis_ext.jar
 
 ; xml.apache.org SVG Library
-batik.jar=${thirdparty.dir}/batik-all-1.7.jar
+batik.jar=${thirdparty.dir}/batik-all.jar
 
 ; The Saxon XSLT Processor
 saxon.jar=${thirdparty.dir}/saxon.jar
@@ -17,7 +17,7 @@ jlatexmath-fop.jar=${thirdparty.dir}/jlatexmath-fop-1.0.2.jar
 ; A complete MathML rendering solution
 jeuclid-core.jar=${thirdparty.dir}/jeuclid-core.jar
 
-xmlgraphics-commons.jar=${thirdparty.dir}/xmlgraphics-commons-1.4.jar
+xmlgraphics-commons.jar=${thirdparty.dir}/xmlgraphics-commons.jar
 
 library.helptools.dir=${modules.dir}/helptools/${build.jar.dir}/
 library.helptools.name=org.scilab.modules.helptools.jar