1 diff -Naur misc/build/JLanguageTool-1.7.0/build.xml misc/build/JLanguageTool-1.7.0_patched/build.xml
2 --- misc/build/JLanguageTool-1.7.0/build.xml 2012-06-25 08:22:35.000000000 +0200
3 +++ misc/build/JLanguageTool-1.7.0_patched/build.xml 2012-06-25 09:27:39.077442000 +0200
5 <pathelement location="${ext.CJFtransform.lib}" />
6 <pathelement location="${ext.commons-validator.lib}" />
8 - <pathelement location="${ext.ooo.juh.lib}" />
9 + <pathelement location="${ext.junit.lib}"/>
11 + <pathelement location="${ext.ooo.juh.lib}" />
12 <pathelement location="${ext.ooo.unoil.lib}" />
13 <pathelement location="${ext.ooo.ridl.lib}" />
14 <pathelement location="${ext.ooo.jurt.lib}" />
16 <!-- ================================================================== -->
18 <target name="dist" depends="ooo-internal" description="Builds one ZIP for both OpenOffice.org and stand-alone use">
19 -<zip compress="yes" destfile="${dist.dir}/LanguageTool-${version}.oxt" basedir="${dist.dir}" includes="**" excludes="deploy.sh,undeploy.sh,turn.sh,printlocales.jar" />
20 +<zip compress="yes" destfile="${dist.dir}/LanguageTool.oxt" basedir="${dist.dir}" includes="**" excludes="deploy.sh,undeploy.sh,turn.sh,printlocales.jar" />
23 <target name="fast" depends="ooo-internal" description="like dist, but without ZIP compression (for development only)">
24 -<zip compress="no" destfile="${dist.dir}/LanguageTool-${version}.oxt" basedir="${dist.dir}" includes="**" excludes="deploy.sh,undeploy.sh,turn.sh,printlocales.jar" />
25 +<zip compress="no" destfile="${dist.dir}/LanguageTool.oxt" basedir="${dist.dir}" includes="**" excludes="deploy.sh,undeploy.sh,turn.sh,printlocales.jar" />
28 <target name="common" depends="clean,init,build,ooo-build">
30 <copy file="${resource.dir}/ast/asturian.dict" todir="${dist.dir}/resource/ast" />
31 <copy file="${resource.dir}/ast/asturian.info" todir="${dist.dir}/resource/ast" />
33 - <copy file="${resource.dir}/xx/dummy.dict" tofile="${dist.dir}/resource/cs/czech.dict" />
34 <copy todir="${dist.dir}/rules">
35 <fileset dir="src/rules" excludes="CVS" />
39 <filter filtersFile="ooolocales.properties" />
40 <copy filtering="true" encoding="${encoding}" todir="${dist.dir}/">
41 - <fileset dir="openoffice/" includes="description.xml,*.xcu,Options.xdl,META-INF/**" />
42 + <fileset dir="openoffice/" includes="components.rdb,description.xml,*.xcu,Options.xdl,META-INF/**" />
44 <copy todir="${dist.dir}/">
45 <fileset dir="openoffice/" includes="images/**,help/**" />
46 diff -Naur misc/build/JLanguageTool-1.7.0/openoffice/components.rdb misc/build/JLanguageTool-1.7.0_patched/openoffice/components.rdb
47 --- misc/build/JLanguageTool-1.7.0/openoffice/components.rdb 1970-01-01 01:00:00.000000000 +0100
48 +++ misc/build/JLanguageTool-1.7.0_patched/openoffice/components.rdb 2012-06-25 10:26:23.183633100 +0200
50 +<?xml version="1.0"?>
51 +<components xmlns="http://openoffice.org/2010/uno-components">
52 + <component loader="com.sun.star.loader.Java2" uri="./LanguageTool.uno.jar">
53 + <implementation name="org.languagetool.openoffice.Main">
54 + <service name="com.sun.star.linguistic2.Proofreader"/>
55 + <service name="org.languagetool.openoffice.Main"/>
59 diff -Naur misc/build/JLanguageTool-1.7.0/openoffice/META-INF/manifest.xml misc/build/JLanguageTool-1.7.0_patched/openoffice/META-INF/manifest.xml
60 --- misc/build/JLanguageTool-1.7.0/openoffice/META-INF/manifest.xml 2012-06-25 08:22:34.000000000 +0200
61 +++ misc/build/JLanguageTool-1.7.0_patched/openoffice/META-INF/manifest.xml 2012-06-25 09:39:56.751738000 +0200
64 <manifest:file-entry manifest:full-path="Addons.xcu"
65 manifest:media-type="application/vnd.sun.star.configuration-data" />
66 - <manifest:file-entry manifest:full-path="LanguageTool.uno.jar"
67 - manifest:media-type="application/vnd.sun.star.uno-component;type=Java" />
68 + <manifest:file-entry manifest:full-path="components.rdb"
69 + manifest:media-type="application/vnd.sun.star.uno-components" />
71 manifest:media-type="application/vnd.sun.star.configuration-data"
72 manifest:full-path="Linguistic.xcu" />
73 diff -Naur misc/build/JLanguageTool-1.7.0/openoffice/description.xml misc/build/JLanguageTool-1.7.0_patched/openoffice/description.xml
74 --- misc/build/JLanguageTool-1.7.0/openoffice/description.xml 2012-06-25 08:22:35.000000000 +0200
75 +++ misc/build/JLanguageTool-1.7.0_patched/openoffice/description.xml 2012-06-25 10:29:48.520591800 +0200
77 <name lang="zh">LanguageTool. 开源的语言检查工具</name>
78 <name lang="br">LanguageTool. Reizher reizhskrivadurel frank.</name>
80 - <version value="@version@" />
81 + <version value="1.7.1" />
83 <src xlink:href="CHANGES.txt" lang="en" />
85 diff -Naur misc/build/JLanguageTool-1.7.0/src/java/org/languagetool/gui/Configuration.java misc/build/JLanguageTool-1.7.0_patched/src/java/org/languagetool/gui/Configuration.java
86 --- misc/build/JLanguageTool-1.7.0/src/java/org/languagetool/gui/Configuration.java 2012-06-25 08:21:31.000000000 +0200
87 +++ misc/build/JLanguageTool-1.7.0_patched/src/java/org/languagetool/gui/Configuration.java 2012-06-25 09:31:40.737466400 +0200
89 import java.io.FileNotFoundException;
90 import java.io.FileOutputStream;
91 import java.io.IOException;
92 +import java.lang.ClassLoader;
95 import org.languagetool.Language;
98 final String motherTongueStr = (String) props.get(MOTHER_TONGUE_CONFIG_KEY);
99 if (motherTongueStr != null) {
100 - motherTongue = Language.getLanguageForShortName(motherTongueStr);
101 + // FIXME: hack to disable the functionality for JRE 1.5
102 + // javax.xml.bind.JAXBException is part of JRE 1.6
103 + boolean isJRE15 = false;
105 + ClassLoader cl = ClassLoader.getSystemClassLoader();
106 + cl.loadClass("javax.xml.bind.JAXBException");
107 + } catch (ClassNotFoundException e) {
111 + motherTongue = Language.getLanguageForShortName(motherTongueStr);
115 final String autoDetectStr = (String) props.get(AUTO_DETECT_CONFIG_KEY);
116 diff -Naur misc/build/JLanguageTool-1.7.0/src/java/org/languagetool/openoffice/Main.java misc/build/JLanguageTool-1.7.0_patched/src/java/org/languagetool/openoffice/Main.java
117 --- misc/build/JLanguageTool-1.7.0/src/java/org/languagetool/openoffice/Main.java 2012-06-25 08:21:28.000000000 +0200
118 +++ misc/build/JLanguageTool-1.7.0_patched/src/java/org/languagetool/openoffice/Main.java 2012-06-25 09:36:03.778528700 +0200
120 * @author Marcin Miłkowski
123 +import java.lang.ClassLoader;
124 import java.util.ArrayList;
125 import java.util.Arrays;
126 import java.util.Comparator;
130 public final Locale[] getLocales() {
131 + // FIXME: hack to disable the functionality for JRE 1.5
132 + // javax.xml.bind.JAXBException is part of JRE 1.6
134 + ClassLoader cl = ClassLoader.getSystemClassLoader();
135 + cl.loadClass("javax.xml.bind.JAXBException");
136 + } catch (ClassNotFoundException e) {
137 + return new Locale[0];
141 for (final Language element : Language.LANGUAGES) {