Index: TXM/trunk/bundles/org.txm.utils.core/src/org/txm/utils/treetagger/TreeTagger.java
===================================================================
--- TXM/trunk/bundles/org.txm.utils.core/src/org/txm/utils/treetagger/TreeTagger.java	(revision 3895)
+++ TXM/trunk/bundles/org.txm.utils.core/src/org/txm/utils/treetagger/TreeTagger.java	(revision 3896)
@@ -217,24 +217,6 @@
 		this.isnounknown = false;
 	}
 
-	// Look up unknown capitalized words in the list of lower-case words
-	/** The iscapheuristics. */
-	private Boolean iscapheuristics = false;
-
-	/**
-	 * Setcapheuristics.
-	 */
-	public void setcapheuristics() {
-		this.iscapheuristics = true;
-	}
-
-	/**
-	 * Unsetcapheuristics.
-	 */
-	public void unsetcapheuristics() {
-		this.iscapheuristics = false;
-	}
-
 	// Turn on the heuristics fur guessing the parts of speech of unknown
 	// hyphenated words
 	/** The ishyphenheuristics. */
@@ -481,8 +463,6 @@
 			args.add("-ignore-prefix"); //$NON-NLS-1$
 		if (isnounknown)
 			args.add("-no-unknown"); //$NON-NLS-1$
-		if (iscapheuristics)
-			args.add("-cap-heuristics"); //$NON-NLS-1$
 		if (ishyphenheuristics)
 			args.add("-hyphen-heuristics"); //$NON-NLS-1$
 		if (isquiet)
Index: TXM/trunk/bundles/org.txm.core/src/java/org/txm/importer/ConvertDocument.java
===================================================================
--- TXM/trunk/bundles/org.txm.core/src/java/org/txm/importer/ConvertDocument.java	(revision 3895)
+++ TXM/trunk/bundles/org.txm.core/src/java/org/txm/importer/ConvertDocument.java	(revision 3896)
@@ -1,146 +0,0 @@
-package org.txm.importer;
-import java.io.File;
-import java.util.Arrays;
-import java.util.List;
-
-import org.jodconverter.core.office.OfficeException;
-import org.jodconverter.core.office.OfficeManager;
-import org.jodconverter.local.JodConverter;
-import org.jodconverter.local.office.LocalOfficeManager;
-
-public class ConvertDocument {
-
-	boolean DEBUG = false;
-	List<String> supportedInput = Arrays.asList("odt", "doc", "docx", "html", "pdf"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-	List<String> supportedOutput = Arrays.asList("odt", "doc", "pdf"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-	OfficeManager officeManager = null;
-
-	public ConvertDocument(String officeHome) throws OfficeException {
-	    //officeManager.setConnectionProtocol(OfficeConnectionProtocol.PIPE);
-	    //officeManager.setPipeNames("office1", "office2");
-	    //officeManager.setTaskExecutionTimeout(30000L);
-		officeManager = LocalOfficeManager.builder().build();
-		
-		try {
-			officeManager.start();
-		} catch(Exception e) {
-			officeManager.stop();
-			org.txm.utils.logger.Log.printStackTrace(e);
-		}
-	}
-	
-	public ConvertDocument() throws OfficeException {
-		
-		officeManager = LocalOfficeManager.builder().build();
-		try {
-			officeManager.start();
-		} catch(Exception e) {
-			officeManager.stop();
-			org.txm.utils.logger.Log.printStackTrace(e);
-		}
-	}
-
-	public void setDebug(boolean b) {
-		DEBUG = b;
-	}
-	
-	public void stop() throws OfficeException {
-		officeManager.stop();
-	}
-
-	public File toODT(File document, File outdir) throws Exception {
-		return auto(document, outdir, "odt"); //$NON-NLS-1$
-	}
-
-	public File toDOC(File document, File outdir) throws Exception {
-		return auto(document, outdir, "doc"); //$NON-NLS-1$
-	}
-
-	public File toPDF(File document, File outdir) throws Exception {
-		return auto(document, outdir, "pdf"); //$NON-NLS-1$
-	}
-
-	public File auto(File document, File outdir, String ext) throws Exception {
-		
-		//get filename without ext
-		int idx = document.getName().lastIndexOf("."); //$NON-NLS-1$
-		if (idx == -1) return null;
-		String name = document.getName().substring(0, idx-1);
-		
-		File outfile = new File(outdir, name+".odt"); //$NON-NLS-1$
-		try {
-			return autoFile(document, outfile, ext);
-		} catch(Exception e) {
-			if (e instanceof OfficeException) {
-				OfficeException oe = (OfficeException) e;
-				if (oe.getMessage().contains("officeHome not set")) {
-					throw new OfficeException("Could not find LibreOffice or OpenOffice 3.x installation. Reason="+e.getMessage());
-				} else if (oe.getMessage().contains("is already running")) {
-					String pid = oe.getMessage();
-					if (pid.indexOf("pid") > 0) {
-						pid = pid.substring(pid.indexOf("pid"));
-					}
-					throw new OfficeException("Could not run LibreOffice or OpenOffice because a 'soffice' process is already running (process id="+pid+"). Please kill the process and restart. Reason="+e.getMessage());
-				} else
-					throw e;
-			} else
-				throw e;
-		}
-	}
-
-	public File autoFile(File document, File outdir, String ext) throws Exception {
-		
-		ConvertDocument converter = new ConvertDocument();
-		if ("doc".equals(ext.toLowerCase())) {
-			return converter.toDOC(document, outdir);
-		} else if ("odt".equals(ext.toLowerCase())) {
-			return converter.toODT(document, outdir);
-		} if ("pdf".equals(ext.toLowerCase())) {
-			return converter.toPDF(document, outdir);
-		} else {
-			return null;
-		}
-	}
-
-	/**
-	 * @param args
-	 * @throws OfficeException 
-	 */
-	public static void main(String[] args) throws OfficeException {
-		//converter.convert(infile, outfile, new )
-		//		String[] srcexts = { "doc" };
-		//		String[] exts = { "odt" };//, "odt", "doc", "docx", "html", "pdf"}; // html pdf
-		//		for(String srcext : srcexts) {
-		//			File infile = new File("/home/mdecorde/Bureau/matrice/témoignages/CONVERSIONS/orig."+srcext);
-		//			for(String ext : exts) {
-		//				System.out.println("Convert from "+srcext+" to "+ext);
-		//				OfficeManager officeManager = null;
-		//				try {
-		//					officeManager = new DefaultOfficeManagerConfiguration().buildOfficeManager();
-		//					officeManager.start();
-		//
-		//					OfficeDocumentConverter converter = new OfficeDocumentConverter(officeManager);
-		//					System.out.println(converter.getFormatRegistry().getClass());
-		//					File outfile = new File("/home/mdecorde/Bureau/matrice/témoignages/CONVERSIONS/jod/"+srcext+"."+ext);
-		//					converter.convert(infile, outfile, converter.getFormatRegistry().getFormatByExtension(ext));
-		//
-		//				} catch(Exception e) {
-		//					System.out.println(e.getLocalizedMessage());
-		//				} finally {
-		//					officeManager.stop();
-		//				}
-		//			}
-		//		}
-
-		File infile = new File("/home/mdecorde/TEMP/Corpus_Riverains_TXM/EP27_txm.doc"); //$NON-NLS-1$
-		File outdir = new File("/home/mdecorde/TEMP"); //$NON-NLS-1$
-		JodConverter.convert(infile).to(new File(outdir, "test.odt"));
-		//System.out.println("result: "+ConvertDocument.toODT(infile, outdir));
-		ConvertDocument convert = new ConvertDocument();
-		try {
-			System.out.println("result: "+convert.toODT(infile, outdir)); //$NON-NLS-1$
-		} catch(Exception e) { org.txm.utils.logger.Log.printStackTrace(e);}
-		convert.stop();
-	}
-
-}
Index: TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/clix/treetagger-wrapper-definition.xml
===================================================================
--- TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/clix/treetagger-wrapper-definition.xml	(revision 3895)
+++ TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/clix/treetagger-wrapper-definition.xml	(revision 3896)
@@ -1,4 +1,4 @@
-<?xml version="1.0">
+<?xml version="1.0"?>
 <application name="TreeTagger" version="0.0.0" desc="Tag files">
 	<progs>
 		<prog exec="tree-tagger" version="0.4.6" desc="Tag">
@@ -10,7 +10,6 @@
 				<arg state="optional" type="none" name="prob" desc="Print tag probabilities"/>
 				<arg state="optional" type="none" name="ignore-prefix" desc=" Ignore prefix when guessing pos for unknown words"/>
 				<arg state="optional" type="none" name="no-unknown" desc="Print the token rather than [unknown] for unknown lemma"/>
-				<arg state="optional" type="none" name="cap-heuristics" desc="Look up unknown capitalized words in the list of lower-case words"/>
 				<arg state="optional" type="none" name="hyphen-heuristics" desc="Turn on the heuristics fur guessing the parts of speech of unknown hyphenated words"/>
 				<arg state="optional" type="none" name="quiet" desc="quiet mode"/>
 				<arg state="optional" type="none" name="pt-with-prob" desc="pretagging with probabilities"/>
Index: TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/doc/docLoader.groovy
===================================================================
--- TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/doc/docLoader.groovy	(revision 3895)
+++ TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/doc/docLoader.groovy	(revision 3896)
@@ -133,21 +133,21 @@
 	if (infile.isDirectory()) {
 		File unzipDir = new File(docfiles, infile.getName())
 		infile.renameTo(unzipDir)
-
+		
 		//println "zipdir "+unzipDir
 		StylesToCSS converter = new StylesToCSS(unzipDir);
 		if (!converter.process(new File(unzipDir, "style.css"))) {
 			println "WARNING: Failed to build css file of $unzipDir"
 		}
 		// and get the soft page breaks and styles parents
-		def parentStyles = converter.parentStyles;
+		def parentStyles = converter.parentStyles
 		def beforebreaks = converter.beforebreaks
 		def afterbreaks = converter.afterbreaks
-
+		
 		//println "BEFORES: "+beforebreaks
 		//println "AFTERS: "+afterbreaks
 		//println "PARENTS: "+parentStyles
-
+		
 		// se servir de ça pour insérer <pb/> et remplacer styles automatiques
 		File xmlFile = new File(txmDir, unzipDir.getName().substring(6))
 		//println "PATCH : $xmlFile"
Index: TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/doc/DocumentToTei.groovy
===================================================================
--- TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/doc/DocumentToTei.groovy	(revision 3895)
+++ TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/doc/DocumentToTei.groovy	(revision 3896)
@@ -30,9 +30,9 @@
 import java.io.File;
 
 import org.txm.importer.ApplyXsl2;
-import org.txm.importer.ConvertDocument;
 import org.txm.utils.zip.Zip
 import org.txm.utils.FileUtils
+import org.txm.libs.jodconverter.ConvertDocument
 
 /**
  * The Class DocumentToTei.
@@ -49,7 +49,6 @@
 		if (!xsldir.exists()) { println "XslDir does not exists: "+xsldir; return false;}
 		if (!xslOdtTei.exists()) { println "xslOdtTei file does not exists: "+xslOdtTei; return false;}
 
-		ConvertDocument converter;
 		for (File file : files) {
 			print "."
 			String name = file.getName();
@@ -69,9 +68,7 @@
 				File odtFile = File.createTempFile("workflowdocx", "sfsdf.odt", outdir);
 				
 				try {
-					converter = new ConvertDocument();
-					converter.setDebug(DEBUG)
-					converter.autoFile(file, odtFile, "odt")
+					ConvertDocument.convert(file, odtFile)
 					if (!new DocumentToTei().run(odtFile, xslOdtTei, teifile)) {
 						println "Docx to Odt to Tei failed: "+file
 						odtFile.delete();
@@ -79,7 +76,6 @@
 				} catch(Exception e) { println "DOCX to ODT to TEI failed: $file: $e"; }
 				finally { 
 					odtFile.delete();
-					if (converter != null) converter.stop();
 				}
 				
 			} else if (FileUtils.isExtension(file, "doc")) {
@@ -88,9 +84,7 @@
 				File odtFile = File.createTempFile("workflowdoc", "sfsdf.odt", outdir);
 				
 				try {
-					converter = new ConvertDocument();
-					converter.setDebug(DEBUG)
-					converter.autoFile(file, odtFile, "odt")
+					ConvertDocument.convert(file, odtFile)
 					if (!new DocumentToTei().run(odtFile, xslOdtTei, teifile)) {
 						println "DOC to ODT to TEI failed: "+file
 						odtFile.delete();
@@ -98,9 +92,7 @@
 				} catch(Exception e) { println "DOC to ODT to TEI failed: $file: $e"; }
 				finally {
 					odtFile.delete();
-					if (converter != null) converter.stop();
 				}
-				
 			}
 		}
 
Index: TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/doc/Workflow.groovy
===================================================================
--- TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/doc/Workflow.groovy	(revision 3895)
+++ TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/doc/Workflow.groovy	(revision 3896)
@@ -32,7 +32,7 @@
 //
 package org.txm.scripts.doc
 
-import org.txm.importer.ConvertDocument;
+import org.txm.libs.jodconverter.ConvertDocument
 
 // TODO: Auto-generated Javadoc
 /* (non-Javadoc)
@@ -55,7 +55,6 @@
 
 println "start"
 for (File file : srcdir.listFiles()) {
-	ConvertDocument converter = new ConvertDocument();
 	try {
 		File teifile = new File(outdir, file.getName()+".xml");
 		if (file.getName().endsWith(".odt")) {
@@ -66,7 +65,7 @@
 		} else if (file.getName().endsWith(".docx")) {
 			File odtFile = File.createTempFile("workflowodt", "sfsdf.odt", srcdir);
 			// convert doc to odt
-			converter.autoFile(file, odtFile, "odt")
+			ConvertDocument.convert(file, odtFile)
 			if (!new DocumentToTei().run(odtFile, xslOdtTei, teifile)) {
 				println "Docx to Odt to Tei failed: "+file
 				odtFile.delete();
@@ -76,7 +75,7 @@
 		} else if (file.getName().endsWith(".doc")) {
 			File odtFile = File.createTempFile("workflowodt", "sfsdf.odt", srcdir);
 			// convert doc to odt
-			converter.autoFile(file, odtFile, "odt")
+			ConvertDocument.convert(file, odtFile)
 			if (!new DocumentToTei().run(odtFile, xslOdtTei, teifile)) {
 				println "Doc to Odt to Tei failed: "+file
 				odtFile.delete();
@@ -86,7 +85,7 @@
 		}
 	}
 	catch(Exception e) { e.printStackTrace() }
-	finally { converter.stop(); }
+	finally { }
 }
 
 println "--Done"
\ No newline at end of file
Index: TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/TextTranscription2TRS.groovy
===================================================================
--- TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/TextTranscription2TRS.groovy	(revision 3895)
+++ TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/TextTranscription2TRS.groovy	(revision 3896)
@@ -36,7 +36,6 @@
 
 import org.txm.scripts.importer.*;
 import org.xml.sax.Attributes;
-import org.txm.importer.ConvertDocument;
 import org.txm.importer.scripts.filters.*;
 
 import java.io.File;
@@ -56,6 +55,8 @@
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import org.txm.libs.jodconverter.ConvertDocument
+
 /**
  * BUGS:
  * - n'a pas repéré les timings autour des commentaires
@@ -68,7 +69,6 @@
 	boolean debug = false;
 	boolean isDirectory = false;
 	File outDir;
-	ConvertDocument converter;
 	def monitor
 
 	TextTranscription2TRS(File outDir, boolean debug, def monitor) {
@@ -95,7 +95,6 @@
 		boolean ret = true
 		try {
 			println "* Processing $dir directory"
-			converter = new ConvertDocument();
 			def files = dir.listFiles()
 			def okfiles = [];
 			if (files != null)
@@ -129,7 +128,6 @@
 			println "Error while processing directory: "+e;
 			if (debug) e.printStackTrace();
 		}
-		if (converter != null) converter.stop();
 		return ret;
 	}
 
@@ -198,71 +196,14 @@
 	boolean DOCtoTXT(File docFile, File txtFile) {
 		println "*** ODT -> TXT"
 		try {
-			if (!isDirectory) converter = new ConvertDocument();
-			converter.setDebug(debug)
-			converter.autoFile(docFile, txtFile, "txt")
+			ConvertDocument.convert(docFile, txtFile)
 		} catch(Exception e) {
 			println "Error while converting $docFile : $e"
 			if (debug) e.printStackTrace()
-		} finally {
-			if (!isDirectory && converter != null) converter.stop()
 		}
 		return txtFile.exists() && txtFile.length() > 0
 	}
 
-//	boolean HTMLtoHTMLforTidy(File htmlFile, File htmlFile2) {
-//		println "*** HTML -> HTML for tidy"
-//		try {
-//			println "replace TABS with 4 spaces"
-//			String text2 = htmlFile.getText("UTF-8")
-//			text2 = text2.replaceAll("&nbsp;", " ")
-//			text2 = text2.replaceAll("’", "'")
-//			text2 = text2.replaceAll("&rsquo;", "'")
-//			text2 = text2.replaceAll("\t", "&nbsp;&nbsp;&nbsp;&nbsp;")
-//			text2 = text2.replaceAll("\n", '&nbsp;')
-//			text2 = text2.replaceAll("\r\n", '&nbsp;')
-//			htmlFile2.withWriter("UTF-8") { writer ->
-//				writer.write(text2);
-//			}
-//		} catch(Exception e) {
-//			println "Error while preparing HTML of $htmlFile : $e"
-//			if (debug) e.printStackTrace()
-//		}
-//		return htmlFile2.exists() && htmlFile2.length() > 0
-//	}
-//
-//	boolean HTMLtoXHTML(File htmlFile2, File xhtmlFile) {
-//		println "*** HTML for tidy -> XHTML"
-//		try {
-//			Tidy tidy = new Tidy(); // obtain a new Tidy instance
-//			tidy.setXHTML(true); // set desired config options using tidy setters
-//			tidy.setInputEncoding("UTF-8")
-//			tidy.setOutputEncoding("UTF-8")
-//			tidy.setShowErrors(100)
-//			tidy.setShowWarnings(debug)
-//			tidy.setTabsize(10)
-//			tidy.setWraplen(9999)
-//			tidy.setForceOutput(true) // Tidy won't stop if error are found
-//			xhtmlFile.withWriter("UTF-8") { out ->
-//				def input = new InputStreamReader(htmlFile2.toURI().toURL().newInputStream(), "UTF-8")
-//				tidy.parse(input, out); // run tidy, providing an input and output stream
-//			}
-//			if (xhtmlFile.exists()) {
-//				// JTidy produced a "0x0" char. removing them
-//				// fix separated < and / ???
-//				def c = Character.toChars(0)[0]
-//				String txttmp = xhtmlFile.getText("UTF-8");
-//				xhtmlFile.withWriter("UTF-8") { out ->
-//					out.write(txttmp.replace("<\n/", "</").replace("<\r\n/", "</"))
-//				}
-//			}
-//		} catch(Exception e) {
-//			println "Error while applying JTidy: "+e
-//			if (debug) e.printStackTrace()
-//		}
-//		return xhtmlFile.exists() && xhtmlFile.length() > 0
-//	}
-
 	boolean TXTtoTRS(File txtFile, File trsFile) {
 		println "*** TXT -> TRS"
 		try {
Index: TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/Transana2TRS.groovy
===================================================================
--- TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/Transana2TRS.groovy	(revision 3895)
+++ TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/Transana2TRS.groovy	(revision 3896)
@@ -58,13 +58,14 @@
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import org.txm.libs.jodconverter.ConvertDocument
 
 class Transana2TRS {
+	
 	boolean debug = false;
 	boolean isDirectory = false;
 	File outDir;
 	File dtd;
-	ConvertDocument converter;
 	def monitor
 
 	Transana2TRS(File outDir, File dtd, boolean debug, def monitor) {
@@ -92,7 +93,6 @@
 		boolean ret = true
 		try {
 			println "* Processing $dir directory"
-			converter = new ConvertDocument();
 			def files = dir.listFiles()
 			def okfiles = [];
 			if (files != null)
@@ -126,7 +126,6 @@
 			println "Error while processing directory: "+e;
 			if (debug) e.printStackTrace();
 		}
-		if (converter != null) converter.stop();
 		return ret;
 	}
 
@@ -202,14 +201,11 @@
 	boolean DOCtoHTML(File docFile, File htmlFile) {
 		println "*** ODT -> HTML"
 		try {
-			if (!isDirectory) converter = new ConvertDocument();
-			converter.setDebug(debug)
-			converter.autoFile(docFile, htmlFile, "html")
+			ConvertDocument.convert(docFile, htmlFile)
 		} catch(Exception e) {
 			println "Error while converting $docFile : $e"
 			if (debug) e.printStackTrace()
 		} finally {
-			if (!isDirectory && converter != null) converter.stop()
 		}
 		return htmlFile.exists() && htmlFile.length() > 0
 	}
Index: TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/text/Text2TXTMacro.groovy
===================================================================
--- TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/text/Text2TXTMacro.groovy	(revision 3895)
+++ TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/text/Text2TXTMacro.groovy	(revision 3896)
@@ -1,11 +1,8 @@
 package org.txm.macro.text;
 // STANDARD DECLARATIONS
 
-import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcp.swt.widget.parameters.*
-import org.txm.doc.*;
-import org.txm.importer.*;
+import org.txm.libs.jodconverter.ConvertDocument
 
 // BEGINNING OF PARAMETERS
 @Field @Option(name="inputDirectory", usage="the directory containing the DOC/ODT/RTF files to convert", widget="Folder", required=true, def="")
@@ -19,22 +16,19 @@
 
 boolean debug = false;
 
-ConvertDocument converter;
 def files = []
 try {
-	converter = new ConvertDocument();
 	inputDirectory.eachFileMatch(~/.+\.$extension/) { docFile ->
 		String name = docFile.getName()
 		name = name.substring(0, name.lastIndexOf("."))
 		def txtFile = new File(docFile.getParentFile(), name+".txt")
-		converter.autoFile(docFile, txtFile, "txt")
+		ConvertDocument.convert(docFile, txtFile)
 		files << docFile
 	}
 } catch(Exception e) {
 	println "Error while processing directory: "+e;
 	if (debug) e.printStackTrace();
 }
-if (converter != null) converter.stop();
 
 println "Processed directory: $inputDirectory"
 println "files: "+files
\ No newline at end of file
Index: TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/text/SetOfficeMacro.groovy
===================================================================
--- TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/text/SetOfficeMacro.groovy	(revision 0)
+++ TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/text/SetOfficeMacro.groovy	(revision 3896)
@@ -0,0 +1,44 @@
+// STANDARD DECLARATIONS
+package org.txm.macro.office
+
+import org.kohsuke.args4j.*
+import groovy.transform.Field
+import org.txm.rcp.swt.widget.parameters.*
+import org.txm.libs.jodconverter.ConvertDocument
+
+// BEGINNING OF PARAMETERS
+
+@Field @Option(name="office_path", usage="Path to LibreOffice or OpenOffice installation directory", widget="Folder", required=false, def="libreoffice or openoffice install directory")
+def office_path
+
+// Open the parameters input dialog box
+if (!ParametersDialog.open(this)) return;
+
+// END OF PARAMETERS
+
+if (office_path == null) {
+	println "No path to office directory given."
+	return
+}
+
+if (!office_path.exists()) {
+	println "'$office_path' directory not found."
+	return
+}
+
+if (!office_path.isDirectory()) {
+	println "'$office_path' exists but is not a directory."
+	return
+}
+
+if (!office_path.canExecute()) {
+	println "'$office_path' exists but has not sufficent rights to be used."
+	return
+}
+
+def old = System.getProperty("office.home")
+ConvertDocument.setOfficeHome(office_path.getAbsolutePath())
+println "Office path set to '"+System.getProperty("office.home")+"'."
+if (old != null) {
+	println "	Previous path was '${old}'."
+}
\ No newline at end of file
Index: TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/export/office/SetOfficeMacro.groovy
===================================================================
--- TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/export/office/SetOfficeMacro.groovy	(revision 3895)
+++ TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/export/office/SetOfficeMacro.groovy	(revision 3896)
@@ -1,43 +0,0 @@
-// STANDARD DECLARATIONS
-package org.txm.macro.office
-
-import org.kohsuke.args4j.*
-import groovy.transform.Field
-import org.txm.rcp.swt.widget.parameters.*
-
-// BEGINNING OF PARAMETERS
-
-@Field @Option(name="office_path", usage="Path to LibreOffice or OpenOffice installation directory", widget="Folder", required=false, def="libreoffice or openoffice install directory")
-def office_path
-
-// Open the parameters input dialog box
-if (!ParametersDialog.open(this)) return;
-
-// END OF PARAMETERS
-
-if (office_path == null) {
-	println "No path to office directory given."
-	return
-}
-
-if (!office_path.exists()) {
-	println "'$office_path' directory not found."
-	return
-}
-
-if (!office_path.isDirectory()) {
-	println "'$office_path' exists but is not a directory."
-	return
-}
-
-if (!office_path.canExecute()) {
-	println "'$office_path' exists but has not sufficent rights to be used."
-	return
-}
-
-def old = System.getProperty("office.home")
-System.setProperty("office.home", office_path.getAbsolutePath())
-println "Office path set to '"+System.getProperty("office.home")+"'."
-if (old != null) {
-	println "	Previous path was '${old}'."
-}
\ No newline at end of file
Index: TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/ImportWizard.java
===================================================================
--- TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/ImportWizard.java	(revision 3895)
+++ TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/ImportWizard.java	(revision 3896)
@@ -105,12 +105,12 @@
 					project.setAnnotate(e.isRunning());
 				}
 				
-				if (project.getAnnotate()) {
-					Log.info(TXMUIMessages.TheAnnotateImportParameterHasBeenActivatedSinceTreeTaggerIsInstalled);
-				}
-				else {
-					Log.info(TXMUIMessages.TheAnnotateImportParameterWasNotActivatedSinceTreeTaggerIsNotInstalled);
-				}
+//				if (project.getAnnotate()) {
+//					Log.info(TXMUIMessages.TheAnnotateImportParameterHasBeenActivatedSinceTreeTaggerIsInstalled);
+//				}
+//				else {
+//					Log.info(TXMUIMessages.TheAnnotateImportParameterWasNotActivatedSinceTreeTaggerIsNotInstalled);
+//				}
 				
 				File importxml = new File(path, "import.xml"); //$NON-NLS-1$
 				if (importxml.exists()) {
@@ -132,8 +132,6 @@
 //					Log.info(TXMUIMessages.abort);
 //					return false;
 //				}
-				
-				
 			}
 			
 			// if (!project.hasEditionDefinition("default")) {
Index: TXM/trunk/bundles/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/preferences/TreeTaggerPreferencePage.java
===================================================================
--- TXM/trunk/bundles/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/preferences/TreeTaggerPreferencePage.java	(revision 3895)
+++ TXM/trunk/bundles/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/preferences/TreeTaggerPreferencePage.java	(revision 3896)
@@ -71,7 +71,6 @@
 		runOptions.setLayout(new GridLayout(3, false));
 		
 		this.addField(new BooleanFieldEditor(TreeTaggerPreferences.OPTIONS_UNKNOWN, "Print the token rather than <unknown> for unknown lemma", runOptions));
-		this.addField(new BooleanFieldEditor(TreeTaggerPreferences.OPTIONS_CAPHEURISTIC, "Look up unknown capitalized words in the list of lower-case words", runOptions));
 		this.addField(new BooleanFieldEditor(TreeTaggerPreferences.OPTIONS_HYPHENHEURISTIC, "Turn on the heuristics fur guessing the parts of speech of unknown hyphenated words", runOptions));
 		this.addField(new BooleanFieldEditor(TreeTaggerPreferences.OPTIONS_PROB, "Print tag probabilities", runOptions));
 		this.addField(new FileFieldEditor(TreeTaggerPreferences.OPTIONS_LEX, "Read auxiliary lexicon entries from a file", runOptions));
Index: TXM/trunk/bundles/org.txm.libs.jodconverter/src/org/txm/libs/jodconverter/ConvertDocument.java
===================================================================
--- TXM/trunk/bundles/org.txm.libs.jodconverter/src/org/txm/libs/jodconverter/ConvertDocument.java	(revision 3895)
+++ TXM/trunk/bundles/org.txm.libs.jodconverter/src/org/txm/libs/jodconverter/ConvertDocument.java	(revision 3896)
@@ -7,56 +7,52 @@
 import org.jodconverter.core.office.OfficeUtils;
 import org.jodconverter.local.JodConverter;
 import org.jodconverter.local.office.LocalOfficeManager;
+import org.jodconverter.local.office.LocalOfficeManager.Builder;
 
 public class ConvertDocument {
 	
-	public static void test2(File inputFile, File outputFile) throws OfficeException {
-		// Create an office manager using the default configuration.
-		// The default port is 2002. Note that when an office manager
-		// is installed, it will be the one used by default when
-		// a converter is created.
-		final LocalOfficeManager officeManager = LocalOfficeManager.install(); 
+	public static void convert(File inputFile, File outputFile) throws OfficeException {
+		convert(inputFile, outputFile, null);
+	}
+	
+	public static void convert(File inputFile, File outputFile, String officePath) throws OfficeException {
+		
+		Builder builder = LocalOfficeManager.builder().install();
+		if (officePath != null && officePath.length() > 0) {
+			builder.officeHome(officePath);
+		}
+		OfficeManager officeManager = builder.build();
 		try {
-
-		    // Start an office process and connect to the started instance (on port 2002).
-		    officeManager.start();
-
-		    // Convert
-		    JodConverter
-		             .convert(inputFile)
-		             .to(outputFile)
-		             .execute();
+			// Start an office process and connect to the started instance (on port 2002).
+			officeManager.start();
+			// Convert
+			JodConverter
+			.convert(inputFile)
+			.to(outputFile)
+			.execute();
 		} finally {
-		    // Stop the office process
-		    OfficeUtils.stopQuietly(officeManager);
+			// Stop the office process
+			OfficeUtils.stopQuietly(officeManager);
 		}
 	}
 	
-	public static void test1(File inputFile, File outputFile) throws OfficeException {
+	public static void setOfficeHome(String officeHome) {
 		
-		 OfficeManager officeManager = LocalOfficeManager.builder()
-	                .install()
-	                .officeHome("/opt/libreoffice7.5")
-	                .build();
-	        try {
-	            // Start an office process and connect to the started instance (on port 2002).
-	            officeManager.start();
-	            // Convert
-	            JodConverter
-	                    .convert(inputFile)
-	                    .to(outputFile)
-	                    .execute();
-	        } finally {
-	            // Stop the office process
-	            OfficeUtils.stopQuietly(officeManager);
-	        }
+		if (officeHome == null) {
+			System.setProperty("office.home", "");
+		} else {
+			System.setProperty("office.home", officeHome);
+			
+			Builder builder = LocalOfficeManager.builder().install();
+			builder.officeHome(officeHome);
+		}
 	}
 	
 	public static void main(String[] args) throws OfficeException {
 		
-		File inputFile = new File("/home/mdecorde/Documents/FICHE d'inscription à une formation ENS - DECORDE.doc");
-		File outputFile = new File("/home/mdecorde/Documents/FICHE d'inscription à une formation ENS - DECORDE.odt");
+		File inputFile = new File("/home/mdecorde/xml/doc/Formulaire_SFT 2022 - Decorde.docx");
+		File outputFile = new File("/home/mdecorde/xml/doc/Formulaire_SFT 2022 - Decorde.odt");
 		
-		test2(inputFile, outputFile);
+		convert(inputFile, outputFile);
 	}
 }
Index: TXM/trunk/bundles/org.txm.libs.jodconverter/META-INF/MANIFEST.MF
===================================================================
--- TXM/trunk/bundles/org.txm.libs.jodconverter/META-INF/MANIFEST.MF	(revision 3895)
+++ TXM/trunk/bundles/org.txm.libs.jodconverter/META-INF/MANIFEST.MF	(revision 3896)
@@ -15,7 +15,8 @@
  org.jodconverter.local.office,
  org.jodconverter.local.office.utils,
  org.jodconverter.local.process,
- org.jodconverter.local.task
+ org.jodconverter.local.task,
+ org.txm.libs.jodconverter
 Require-Bundle: org.txm.libs.gson;bundle-version="2.8.6"
 Bundle-Vendor: JodConverter
 Automatic-Module-Name: org.txm.libs.jodconverter
Index: TXM/trunk/features/org.txm.core.feature/feature.xml
===================================================================
--- TXM/trunk/features/org.txm.core.feature/feature.xml	(revision 3895)
+++ TXM/trunk/features/org.txm.core.feature/feature.xml	(revision 3896)
@@ -192,4 +192,11 @@
          version="0.0.0"
          unpack="false"/>
 
+   <plugin
+         id="org.txm.libs.jodconverter"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
 </feature>
