#! /bin/sh /usr/share/dpatch/dpatch-run
## 02_BASE64_no_Sunism.dpatch by Rene Engelhard <rene@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: remove Sunism

@DPATCH@
diff -urNad writer2latex-0.5~/build.xml writer2latex-0.5/build.xml
--- writer2latex-0.5~/build.xml	2006-11-02 11:15:42.000000000 +0100
+++ writer2latex-0.5/build.xml	2007-11-20 21:17:21.000000000 +0100
@@ -85,7 +85,7 @@
                 <attribute name="Main-Class" value="writer2latex.Application"/>
                 <!-- OOo needs this to register the filter: -->
                 <attribute name="RegistrationClassName" value="writer2latex.filter.W2LExportFilter" />
-                <attribute name="Class-Path" value="jaxp.jar parser.jar"/>
+                <attribute name="Class-Path" value="jaxp.jar jaxp_parser_impl.jar"/>
             </manifest>
         </jar>
     </target>
diff -urNad writer2latex-0.5~/source/writer2latex/office/ImageLoader.java writer2latex-0.5/source/writer2latex/office/ImageLoader.java
--- writer2latex-1.0~beta2/source/java/writer2latex/office/ImageLoader.java	2007-04-17 09:30:42.000000000 +0200
+++ writer2latex-1.0~beta2/source/java/writer2latex/office/ImageLoader.java	2007-11-20 21:18:32.000000000 +0100
@@ -107,8 +107,8 @@
                 }
                 // TODO: Use another base64 decoder. This one is "nonstandard"
                 try {
-                    blob = new sun.misc.BASE64Decoder().decodeBuffer(buf.toString());
-                } catch (IOException e) {
+		    blob = org.apache.xerces.impl.dv.util.Base64.decode(buf.toString());  
+                } catch (Exception e) {
                     System.err.println("Oops - error converting base64");
                 }
                 sMIME = MIMETypes.getMagicMIMEType(blob);
