Index: tmp/org.txm.jodconverter.core/.classpath
===================================================================
--- tmp/org.txm.jodconverter.core/.classpath	(revision 2405)
+++ tmp/org.txm.jodconverter.core/.classpath	(revision 2406)
@@ -1,44 +1,44 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	  <classpathentry kind="src" output="target/classes" path="src/main/java">
-		    <attributes>
-			      <attribute name="optional" value="true"/>
-			      <attribute name="maven.pomderived" value="true"/>
-		    </attributes>
-	  </classpathentry>
-	  <classpathentry excluding="**"
-                   kind="src"
-                   output="target/classes"
-                   path="src/main/resources">
-		    <attributes>
-			      <attribute name="maven.pomderived" value="true"/>
-		    </attributes>
-	  </classpathentry>
-	  <classpathentry kind="src" output="target/test-classes" path="src/test/java">
-		    <attributes>
-			      <attribute name="optional" value="true"/>
-			      <attribute name="maven.pomderived" value="true"/>
-			      <attribute name="test" value="true"/>
-		    </attributes>
-	  </classpathentry>
-	  <classpathentry excluding="**"
-                   kind="src"
-                   output="target/test-classes"
-                   path="src/test/resources">
-		    <attributes>
-			      <attribute name="maven.pomderived" value="true"/>
-			      <attribute name="test" value="true"/>
-		    </attributes>
-	  </classpathentry>
-	  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
-		    <attributes>
-			      <attribute name="maven.pomderived" value="true"/>
-		    </attributes>
-	  </classpathentry>
-	  <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
-		    <attributes>
-			      <attribute name="maven.pomderived" value="true"/>
-		    </attributes>
-	  </classpathentry>
-	  <classpathentry kind="output" path="target/classes"/>
+	<classpathentry kind="src" output="target/classes"
+		path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true" />
+			<attribute name="maven.pomderived" value="true" />
+		</attributes>
+	</classpathentry>
+	<classpathentry excluding="**" kind="src"
+		output="target/classes" path="src/main/resources">
+		<attributes>
+			<attribute name="maven.pomderived" value="true" />
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes"
+		path="src/test/java">
+		<attributes>
+			<attribute name="optional" value="true" />
+			<attribute name="maven.pomderived" value="true" />
+			<attribute name="test" value="true" />
+		</attributes>
+	</classpathentry>
+	<classpathentry excluding="**" kind="src"
+		output="target/test-classes" path="src/test/resources">
+		<attributes>
+			<attribute name="maven.pomderived" value="true" />
+			<attribute name="test" value="true" />
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con"
+		path="org.eclipse.jdt.launching.JRE_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true" />
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con"
+		path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true" />
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes" />
 </classpath>
\ No newline at end of file
Index: tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/OfficeDocumentConverterFunctionalTest.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/OfficeDocumentConverterFunctionalTest.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/OfficeDocumentConverterFunctionalTest.java	(revision 2406)
@@ -27,40 +27,42 @@
 import org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration;
 import org.testng.annotations.Test;
 
-@Test(groups="functional")
+@Test(groups = "functional")
 public class OfficeDocumentConverterFunctionalTest {
-
-    public void runAllPossibleConversions() throws IOException {
-        OfficeManager officeManager = new DefaultOfficeManagerConfiguration().buildOfficeManager();
-        OfficeDocumentConverter converter = new OfficeDocumentConverter(officeManager);
-        DocumentFormatRegistry formatRegistry = converter.getFormatRegistry();
-        
-        officeManager.start();
-        try {
-            File dir = new File("src/test/resources/documents");
-            File[] files = dir.listFiles(new FilenameFilter() {
-            	public boolean accept(File dir, String name) {
-            		return !name.startsWith(".");
-            	}
-            });
+	
+	public void runAllPossibleConversions() throws IOException {
+		OfficeManager officeManager = new DefaultOfficeManagerConfiguration().buildOfficeManager();
+		OfficeDocumentConverter converter = new OfficeDocumentConverter(officeManager);
+		DocumentFormatRegistry formatRegistry = converter.getFormatRegistry();
+		
+		officeManager.start();
+		try {
+			File dir = new File("src/test/resources/documents");
+			File[] files = dir.listFiles(new FilenameFilter() {
+				
+				public boolean accept(File dir, String name) {
+					return !name.startsWith(".");
+				}
+			});
 			for (File inputFile : files) {
-                String inputExtension = FilenameUtils.getExtension(inputFile.getName());
-                DocumentFormat inputFormat = formatRegistry.getFormatByExtension(inputExtension);
-                assertNotNull(inputFormat, "unknown input format: " + inputExtension);
-                Set<DocumentFormat> outputFormats = formatRegistry.getOutputFormats(inputFormat.getInputFamily());
-                for (DocumentFormat outputFormat : outputFormats) {
-                    File outputFile = File.createTempFile("test", "." + outputFormat.getExtension());
-                    outputFile.deleteOnExit();
-                    System.out.printf("-- converting %s to %s... ", inputFormat.getExtension(), outputFormat.getExtension());
-                    converter.convert(inputFile, outputFile, outputFormat);
-                    System.out.printf("done.\n");
-                    assertTrue(outputFile.isFile() && outputFile.length() > 0);
-                    //TODO use file detection to make sure outputFile is in the expected format
-                }
-            }
-        } finally {
-            officeManager.stop();
-        }
-    }
-
+				String inputExtension = FilenameUtils.getExtension(inputFile.getName());
+				DocumentFormat inputFormat = formatRegistry.getFormatByExtension(inputExtension);
+				assertNotNull(inputFormat, "unknown input format: " + inputExtension);
+				Set<DocumentFormat> outputFormats = formatRegistry.getOutputFormats(inputFormat.getInputFamily());
+				for (DocumentFormat outputFormat : outputFormats) {
+					File outputFile = File.createTempFile("test", "." + outputFormat.getExtension());
+					outputFile.deleteOnExit();
+					System.out.printf("-- converting %s to %s... ", inputFormat.getExtension(), outputFormat.getExtension());
+					converter.convert(inputFile, outputFile, outputFormat);
+					System.out.printf("done.\n");
+					assertTrue(outputFile.isFile() && outputFile.length() > 0);
+					// TODO use file detection to make sure outputFile is in the expected format
+				}
+			}
+		}
+		finally {
+			officeManager.stop();
+		}
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/ReflectionUtils.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/ReflectionUtils.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/ReflectionUtils.java	(revision 2406)
@@ -15,19 +15,19 @@
 import java.lang.reflect.Field;
 
 public class ReflectionUtils {
-
-    private ReflectionUtils() {
-        throw new AssertionError("utility class must not be instantiated");
-    }
-
-    public static Object getPrivateField(Object instance, String fieldName) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
-        return getPrivateField(instance.getClass(), instance, fieldName);
-    }
-
-    public static Object getPrivateField(Class<?> type, Object instance, String fieldName) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
-        Field field = type.getDeclaredField(fieldName);
-        field.setAccessible(true);
-        return field.get(instance);
-    }
-
+	
+	private ReflectionUtils() {
+		throw new AssertionError("utility class must not be instantiated");
+	}
+	
+	public static Object getPrivateField(Object instance, String fieldName) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
+		return getPrivateField(instance.getClass(), instance, fieldName);
+	}
+	
+	public static Object getPrivateField(Class<?> type, Object instance, String fieldName) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
+		Field field = type.getDeclaredField(fieldName);
+		field.setAccessible(true);
+		return field.get(instance);
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/office/MockOfficeTask.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/office/MockOfficeTask.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/office/MockOfficeTask.java	(revision 2406)
@@ -24,37 +24,38 @@
 import com.sun.star.util.XCloseable;
 
 public class MockOfficeTask implements OfficeTask {
-
-    private long delayTime = 0L;
-
-    private boolean completed = false;
-
-    public MockOfficeTask() {
-        // default
-    }
-
-    public MockOfficeTask(long delayTime) {
-        this.delayTime = delayTime;
-    }
-
-    public void execute(OfficeContext context) throws OfficeException {
-        XComponentLoader loader = cast(XComponentLoader.class, context.getService(SERVICE_DESKTOP));
-        assert loader != null : "desktop object is null";
-        try {
-            PropertyValue[] arguments = new PropertyValue[] { property("Hidden", true) };
-            XComponent document = loader.loadComponentFromURL("private:factory/swriter", "_blank", 0, arguments);
-            if (delayTime > 0) {
-                Thread.sleep(delayTime);
-            }
-            cast(XCloseable.class, document).close(true);
-            completed = true;
-        } catch (Exception exception) {
-            throw new OfficeException("failed to create document", exception);
-        }
-    }
-
-    public boolean isCompleted() {
-        return completed;
-    }
-
+	
+	private long delayTime = 0L;
+	
+	private boolean completed = false;
+	
+	public MockOfficeTask() {
+		// default
+	}
+	
+	public MockOfficeTask(long delayTime) {
+		this.delayTime = delayTime;
+	}
+	
+	public void execute(OfficeContext context) throws OfficeException {
+		XComponentLoader loader = cast(XComponentLoader.class, context.getService(SERVICE_DESKTOP));
+		assert loader != null : "desktop object is null";
+		try {
+			PropertyValue[] arguments = new PropertyValue[] { property("Hidden", true) };
+			XComponent document = loader.loadComponentFromURL("private:factory/swriter", "_blank", 0, arguments);
+			if (delayTime > 0) {
+				Thread.sleep(delayTime);
+			}
+			cast(XCloseable.class, document).close(true);
+			completed = true;
+		}
+		catch (Exception exception) {
+			throw new OfficeException("failed to create document", exception);
+		}
+	}
+	
+	public boolean isCompleted() {
+		return completed;
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/office/ExternalOfficeManagerTest.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/office/ExternalOfficeManagerTest.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/office/ExternalOfficeManagerTest.java	(revision 2406)
@@ -20,34 +20,34 @@
 import org.artofsolving.jodconverter.process.PureJavaProcessManager;
 import org.testng.annotations.Test;
 
-@Test(groups="integration")
+@Test(groups = "integration")
 public class ExternalOfficeManagerTest {
-
-    public void executeTask() throws Exception {
-        UnoUrl unoUrl = UnoUrl.socket(2002);
-        OfficeProcess officeProcess = new OfficeProcess(OfficeUtils.getDefaultOfficeHome(), unoUrl,
-            null, null, new File(System.getProperty("java.io.tmpdir")), new PureJavaProcessManager());
-        officeProcess.start();
-        Thread.sleep(2000);
-        Integer exitCode = officeProcess.getExitCode();
-        if (exitCode != null && exitCode.equals(Integer.valueOf(81))) {
-            officeProcess.start(true);
-            Thread.sleep(2000);
-        }
-        
-        ExternalOfficeManager manager = new ExternalOfficeManager(unoUrl, true);
-        manager.start();
-        
-        MockOfficeTask task = new MockOfficeTask();
-        manager.execute(task);
-        assertTrue(task.isCompleted());
-        
-        manager.stop();
-        //TODO replace when OfficeProcess has a forciblyTerminate()
-        Process process = (Process) ReflectionUtils.getPrivateField(officeProcess, "process");
-        process.destroy();
-    }
-
-    //TODO test auto-reconnection
-
+	
+	public void executeTask() throws Exception {
+		UnoUrl unoUrl = UnoUrl.socket(2002);
+		OfficeProcess officeProcess = new OfficeProcess(OfficeUtils.getDefaultOfficeHome(), unoUrl,
+				null, null, new File(System.getProperty("java.io.tmpdir")), new PureJavaProcessManager());
+		officeProcess.start();
+		Thread.sleep(2000);
+		Integer exitCode = officeProcess.getExitCode();
+		if (exitCode != null && exitCode.equals(Integer.valueOf(81))) {
+			officeProcess.start(true);
+			Thread.sleep(2000);
+		}
+		
+		ExternalOfficeManager manager = new ExternalOfficeManager(unoUrl, true);
+		manager.start();
+		
+		MockOfficeTask task = new MockOfficeTask();
+		manager.execute(task);
+		assertTrue(task.isCompleted());
+		
+		manager.stop();
+		// TODO replace when OfficeProcess has a forciblyTerminate()
+		Process process = (Process) ReflectionUtils.getPrivateField(officeProcess, "process");
+		process.destroy();
+	}
+	
+	// TODO test auto-reconnection
+	
 }
Index: tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/office/PooledOfficeManagerTest.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/office/PooledOfficeManagerTest.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/office/PooledOfficeManagerTest.java	(revision 2406)
@@ -21,7 +21,6 @@
 import java.util.concurrent.CancellationException;
 import java.util.concurrent.TimeoutException;
 
-
 import org.artofsolving.jodconverter.ReflectionUtils;
 import org.artofsolving.jodconverter.office.ManagedOfficeProcess;
 import org.artofsolving.jodconverter.office.PooledOfficeManager;
@@ -32,142 +31,146 @@
 import org.artofsolving.jodconverter.office.OfficeProcess;
 import org.testng.annotations.Test;
 
-@Test(groups="integration")
+@Test(groups = "integration")
 public class PooledOfficeManagerTest {
-
-    private static final UnoUrl CONNECTION_MODE = UnoUrl.socket(2002);
-    private static final long RESTART_WAIT_TIME = 2 * 1000;
-
-    public void executeTask() throws Exception {
-        PooledOfficeManager officeManager = new PooledOfficeManager(CONNECTION_MODE);
-        ManagedOfficeProcess managedOfficeProcess = (ManagedOfficeProcess) ReflectionUtils.getPrivateField(officeManager, "managedOfficeProcess");
-        OfficeProcess process = (OfficeProcess) ReflectionUtils.getPrivateField(managedOfficeProcess, "process");
-        OfficeConnection connection = (OfficeConnection) ReflectionUtils.getPrivateField(managedOfficeProcess, "connection");
-        
-        officeManager.start();
-        assertTrue(process.isRunning());
-        assertTrue(connection.isConnected());
-        
-        MockOfficeTask task = new MockOfficeTask();
-        officeManager.execute(task);
-        assertTrue(task.isCompleted());
-        
-        officeManager.stop();
-        assertFalse(connection.isConnected());
-        assertFalse(process.isRunning());
-        assertEquals(process.getExitCode(0, 0), 0);
-    }
-
-    public void restartAfterCrash() throws Exception {
-        final PooledOfficeManager officeManager = new PooledOfficeManager(CONNECTION_MODE);
-        ManagedOfficeProcess managedOfficeProcess = (ManagedOfficeProcess) ReflectionUtils.getPrivateField(officeManager, "managedOfficeProcess");
-        OfficeProcess process = (OfficeProcess) ReflectionUtils.getPrivateField(managedOfficeProcess, "process");
-        OfficeConnection connection = (OfficeConnection) ReflectionUtils.getPrivateField(managedOfficeProcess, "connection");
-        assertNotNull(connection);
-        
-        officeManager.start();
-        assertTrue(process.isRunning());
-        assertTrue(connection.isConnected());
-        
-        new Thread() {
-            public void run() {
-                MockOfficeTask badTask = new MockOfficeTask(10 * 1000);
-                try {
-                    officeManager.execute(badTask);
-                    fail("task should be cancelled");
-                    //FIXME being in a separate thread the test won't actually fail
-                } catch (OfficeException officeException) {
-                    assertTrue(officeException.getCause() instanceof CancellationException);
-                }
-            }
-        }.start();
-        Thread.sleep(500);
-        Process underlyingProcess = (Process) ReflectionUtils.getPrivateField(process, "process");
-        assertNotNull(underlyingProcess);
-        underlyingProcess.destroy();  // simulate crash
-
-        Thread.sleep(RESTART_WAIT_TIME);
-        assertTrue(process.isRunning());
-        assertTrue(connection.isConnected());
-
-        MockOfficeTask goodTask = new MockOfficeTask();
-        officeManager.execute(goodTask);
-        assertTrue(goodTask.isCompleted());
-
-        officeManager.stop();
-        assertFalse(connection.isConnected());
-        assertFalse(process.isRunning());
-        assertEquals(process.getExitCode(0, 0), 0);
-    }
-
-    public void restartAfterTaskTimeout() throws Exception {
-        PooledOfficeManagerSettings configuration = new PooledOfficeManagerSettings(CONNECTION_MODE);
-        configuration.setTaskExecutionTimeout(1500L);
-        final PooledOfficeManager officeManager = new PooledOfficeManager(configuration);
-        
-        ManagedOfficeProcess managedOfficeProcess = (ManagedOfficeProcess) ReflectionUtils.getPrivateField(officeManager, "managedOfficeProcess");
-        OfficeProcess process = (OfficeProcess) ReflectionUtils.getPrivateField(managedOfficeProcess, "process");
-        OfficeConnection connection = (OfficeConnection) ReflectionUtils.getPrivateField(managedOfficeProcess, "connection");
-        assertNotNull(connection);
-        
-        officeManager.start();
-        assertTrue(process.isRunning());
-        assertTrue(connection.isConnected());
-        
-        MockOfficeTask longTask = new MockOfficeTask(2000);
-        try {
-            officeManager.execute(longTask);
-            fail("task should be timed out");
-        } catch (OfficeException officeException) {
-            assertTrue(officeException.getCause() instanceof TimeoutException);
-        }
-
-        Thread.sleep(RESTART_WAIT_TIME);
-        assertTrue(process.isRunning());
-        assertTrue(connection.isConnected());
-
-        MockOfficeTask goodTask = new MockOfficeTask();
-        officeManager.execute(goodTask);
-        assertTrue(goodTask.isCompleted());
-
-        officeManager.stop();
-        assertFalse(connection.isConnected());
-        assertFalse(process.isRunning());
-        assertEquals(process.getExitCode(0, 0), 0);
-    }
-
-    public void restartWhenMaxTasksPerProcessReached() throws Exception {
-        PooledOfficeManagerSettings configuration = new PooledOfficeManagerSettings(CONNECTION_MODE);
-        configuration.setMaxTasksPerProcess(3);
-        final PooledOfficeManager officeManager = new PooledOfficeManager(configuration);
-        
-        ManagedOfficeProcess managedOfficeProcess = (ManagedOfficeProcess) ReflectionUtils.getPrivateField(officeManager, "managedOfficeProcess");
-        OfficeProcess process = (OfficeProcess) ReflectionUtils.getPrivateField(managedOfficeProcess, "process");
-        OfficeConnection connection = (OfficeConnection) ReflectionUtils.getPrivateField(managedOfficeProcess, "connection");
-        assertNotNull(connection);
-        
-        officeManager.start();
-        assertTrue(process.isRunning());
-        assertTrue(connection.isConnected());
-        
-        for (int i = 0; i < 3; i++) {
-            MockOfficeTask task = new MockOfficeTask();
-            officeManager.execute(task);
-            assertTrue(task.isCompleted());
-            int taskCount = (Integer) ReflectionUtils.getPrivateField(officeManager, "taskCount");
-            assertEquals(taskCount, i + 1);
-        }
-
-        MockOfficeTask task = new MockOfficeTask();
-        officeManager.execute(task);
-        assertTrue(task.isCompleted());
-        int taskCount = (Integer) ReflectionUtils.getPrivateField(officeManager, "taskCount");
-        assertEquals(taskCount, 0);  //FIXME should be 1 to be precise
-
-        officeManager.stop();
-        assertFalse(connection.isConnected());
-        assertFalse(process.isRunning());
-        assertEquals(process.getExitCode(0, 0), 0);
-    }
-
+	
+	private static final UnoUrl CONNECTION_MODE = UnoUrl.socket(2002);
+	
+	private static final long RESTART_WAIT_TIME = 2 * 1000;
+	
+	public void executeTask() throws Exception {
+		PooledOfficeManager officeManager = new PooledOfficeManager(CONNECTION_MODE);
+		ManagedOfficeProcess managedOfficeProcess = (ManagedOfficeProcess) ReflectionUtils.getPrivateField(officeManager, "managedOfficeProcess");
+		OfficeProcess process = (OfficeProcess) ReflectionUtils.getPrivateField(managedOfficeProcess, "process");
+		OfficeConnection connection = (OfficeConnection) ReflectionUtils.getPrivateField(managedOfficeProcess, "connection");
+		
+		officeManager.start();
+		assertTrue(process.isRunning());
+		assertTrue(connection.isConnected());
+		
+		MockOfficeTask task = new MockOfficeTask();
+		officeManager.execute(task);
+		assertTrue(task.isCompleted());
+		
+		officeManager.stop();
+		assertFalse(connection.isConnected());
+		assertFalse(process.isRunning());
+		assertEquals(process.getExitCode(0, 0), 0);
+	}
+	
+	public void restartAfterCrash() throws Exception {
+		final PooledOfficeManager officeManager = new PooledOfficeManager(CONNECTION_MODE);
+		ManagedOfficeProcess managedOfficeProcess = (ManagedOfficeProcess) ReflectionUtils.getPrivateField(officeManager, "managedOfficeProcess");
+		OfficeProcess process = (OfficeProcess) ReflectionUtils.getPrivateField(managedOfficeProcess, "process");
+		OfficeConnection connection = (OfficeConnection) ReflectionUtils.getPrivateField(managedOfficeProcess, "connection");
+		assertNotNull(connection);
+		
+		officeManager.start();
+		assertTrue(process.isRunning());
+		assertTrue(connection.isConnected());
+		
+		new Thread() {
+			
+			public void run() {
+				MockOfficeTask badTask = new MockOfficeTask(10 * 1000);
+				try {
+					officeManager.execute(badTask);
+					fail("task should be cancelled");
+					// FIXME being in a separate thread the test won't actually fail
+				}
+				catch (OfficeException officeException) {
+					assertTrue(officeException.getCause() instanceof CancellationException);
+				}
+			}
+		}.start();
+		Thread.sleep(500);
+		Process underlyingProcess = (Process) ReflectionUtils.getPrivateField(process, "process");
+		assertNotNull(underlyingProcess);
+		underlyingProcess.destroy();  // simulate crash
+		
+		Thread.sleep(RESTART_WAIT_TIME);
+		assertTrue(process.isRunning());
+		assertTrue(connection.isConnected());
+		
+		MockOfficeTask goodTask = new MockOfficeTask();
+		officeManager.execute(goodTask);
+		assertTrue(goodTask.isCompleted());
+		
+		officeManager.stop();
+		assertFalse(connection.isConnected());
+		assertFalse(process.isRunning());
+		assertEquals(process.getExitCode(0, 0), 0);
+	}
+	
+	public void restartAfterTaskTimeout() throws Exception {
+		PooledOfficeManagerSettings configuration = new PooledOfficeManagerSettings(CONNECTION_MODE);
+		configuration.setTaskExecutionTimeout(1500L);
+		final PooledOfficeManager officeManager = new PooledOfficeManager(configuration);
+		
+		ManagedOfficeProcess managedOfficeProcess = (ManagedOfficeProcess) ReflectionUtils.getPrivateField(officeManager, "managedOfficeProcess");
+		OfficeProcess process = (OfficeProcess) ReflectionUtils.getPrivateField(managedOfficeProcess, "process");
+		OfficeConnection connection = (OfficeConnection) ReflectionUtils.getPrivateField(managedOfficeProcess, "connection");
+		assertNotNull(connection);
+		
+		officeManager.start();
+		assertTrue(process.isRunning());
+		assertTrue(connection.isConnected());
+		
+		MockOfficeTask longTask = new MockOfficeTask(2000);
+		try {
+			officeManager.execute(longTask);
+			fail("task should be timed out");
+		}
+		catch (OfficeException officeException) {
+			assertTrue(officeException.getCause() instanceof TimeoutException);
+		}
+		
+		Thread.sleep(RESTART_WAIT_TIME);
+		assertTrue(process.isRunning());
+		assertTrue(connection.isConnected());
+		
+		MockOfficeTask goodTask = new MockOfficeTask();
+		officeManager.execute(goodTask);
+		assertTrue(goodTask.isCompleted());
+		
+		officeManager.stop();
+		assertFalse(connection.isConnected());
+		assertFalse(process.isRunning());
+		assertEquals(process.getExitCode(0, 0), 0);
+	}
+	
+	public void restartWhenMaxTasksPerProcessReached() throws Exception {
+		PooledOfficeManagerSettings configuration = new PooledOfficeManagerSettings(CONNECTION_MODE);
+		configuration.setMaxTasksPerProcess(3);
+		final PooledOfficeManager officeManager = new PooledOfficeManager(configuration);
+		
+		ManagedOfficeProcess managedOfficeProcess = (ManagedOfficeProcess) ReflectionUtils.getPrivateField(officeManager, "managedOfficeProcess");
+		OfficeProcess process = (OfficeProcess) ReflectionUtils.getPrivateField(managedOfficeProcess, "process");
+		OfficeConnection connection = (OfficeConnection) ReflectionUtils.getPrivateField(managedOfficeProcess, "connection");
+		assertNotNull(connection);
+		
+		officeManager.start();
+		assertTrue(process.isRunning());
+		assertTrue(connection.isConnected());
+		
+		for (int i = 0; i < 3; i++) {
+			MockOfficeTask task = new MockOfficeTask();
+			officeManager.execute(task);
+			assertTrue(task.isCompleted());
+			int taskCount = (Integer) ReflectionUtils.getPrivateField(officeManager, "taskCount");
+			assertEquals(taskCount, i + 1);
+		}
+		
+		MockOfficeTask task = new MockOfficeTask();
+		officeManager.execute(task);
+		assertTrue(task.isCompleted());
+		int taskCount = (Integer) ReflectionUtils.getPrivateField(officeManager, "taskCount");
+		assertEquals(taskCount, 0);  // FIXME should be 1 to be precise
+		
+		officeManager.stop();
+		assertFalse(connection.isConnected());
+		assertFalse(process.isRunning());
+		assertEquals(process.getExitCode(0, 0), 0);
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/office/OfficeUtilsTest.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/office/OfficeUtilsTest.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/office/OfficeUtilsTest.java	(revision 2406)
@@ -18,11 +18,11 @@
 import java.io.File;
 
 public class OfficeUtilsTest {
-
-    public void testToUrl() {
-        //TODO create separate tests for Windows
-        assertEquals(toUrl(new File("/tmp/document.odt")), "file:///tmp/document.odt");
-        assertEquals(toUrl(new File("/tmp/document with spaces.odt")), "file:///tmp/document%20with%20spaces.odt");
-    }
-
+	
+	public void testToUrl() {
+		// TODO create separate tests for Windows
+		assertEquals(toUrl(new File("/tmp/document.odt")), "file:///tmp/document.odt");
+		assertEquals(toUrl(new File("/tmp/document with spaces.odt")), "file:///tmp/document%20with%20spaces.odt");
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/document/DumpJsonDefaultDocumentFormatRegistry.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/document/DumpJsonDefaultDocumentFormatRegistry.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/document/DumpJsonDefaultDocumentFormatRegistry.java	(revision 2406)
@@ -17,7 +17,6 @@
 import java.util.List;
 import java.util.Map;
 
-
 import org.artofsolving.jodconverter.ReflectionUtils;
 import org.json.JSONArray;
 import org.json.JSONException;
@@ -27,63 +26,66 @@
  * Exectable class that dumps a JSON version of the {@link DefaultDocumentFormatRegistry}
  */
 class DumpJsonDefaultDocumentFormatRegistry {
-
-    private static class SortedJsonObject extends JSONObject {
-         public SortedJsonObject() {
-             try {
-                 Field field = JSONObject.class.getDeclaredField("myHashMap");
-                 field.setAccessible(true);
-                 field.set(this, new LinkedHashMap<String,Object>());
-             } catch (Exception exception) {
-                 // pass; will not be sorted
-             }
-        }
-    }
-
-    private static JSONObject toJson(DocumentFormat format) throws JSONException {
-        JSONObject jsonFormat = new SortedJsonObject();
-        jsonFormat.put("name", format.getName());
-        jsonFormat.put("extension", format.getExtension());
-        jsonFormat.put("mediaType", format.getMediaType());
-        if (format.getInputFamily() != null) {
-            jsonFormat.put("inputFamily", format.getInputFamily().name());
-        }
-        if (format.getLoadProperties() != null) {
-            jsonFormat.put("loadProperties", toJson(format.getLoadProperties()));
-        }
-        if (format.getStorePropertiesByFamily() != null) {
-            JSONObject jsonStorePropertiesByFamily = new SortedJsonObject();
-            for (Map.Entry<DocumentFamily,Map<String,?>> entry : format.getStorePropertiesByFamily().entrySet()) {
-                jsonStorePropertiesByFamily.put(entry.getKey().name(), toJson(entry.getValue()));
-            }
-            jsonFormat.put("storePropertiesByFamily", jsonStorePropertiesByFamily);
-        }
-        return jsonFormat;
-    }
-
-    @SuppressWarnings("unchecked")
-    private static JSONObject toJson(Map<String,?> properties) throws JSONException {
-        JSONObject jsonProperties = new SortedJsonObject();
-        for (Map.Entry<String,?> entry : properties.entrySet()) {
-            if (entry.getValue() instanceof Map) {
-                Map<String,?> jsonValue = (Map<String,?>) entry.getValue();
-                jsonProperties.put(entry.getKey(), toJson(jsonValue));
-            } else {
-                jsonProperties.put(entry.getKey(), entry.getValue());
-            }
-        }
-        return jsonProperties;
-    }
-
-    public static void main(String[] args) throws Exception {
-        DefaultDocumentFormatRegistry registry = new DefaultDocumentFormatRegistry();
-        @SuppressWarnings("unchecked")
-        List<DocumentFormat> formats = (List<DocumentFormat>) ReflectionUtils.getPrivateField(SimpleDocumentFormatRegistry.class, registry, "documentFormats");
-        JSONArray array = new JSONArray();
-        for (DocumentFormat format : formats) {
-            array.put(toJson(format));
-        }
-        System.out.println(array.toString(2));
-    }
-
+	
+	private static class SortedJsonObject extends JSONObject {
+		
+		public SortedJsonObject() {
+			try {
+				Field field = JSONObject.class.getDeclaredField("myHashMap");
+				field.setAccessible(true);
+				field.set(this, new LinkedHashMap<String, Object>());
+			}
+			catch (Exception exception) {
+				// pass; will not be sorted
+			}
+		}
+	}
+	
+	private static JSONObject toJson(DocumentFormat format) throws JSONException {
+		JSONObject jsonFormat = new SortedJsonObject();
+		jsonFormat.put("name", format.getName());
+		jsonFormat.put("extension", format.getExtension());
+		jsonFormat.put("mediaType", format.getMediaType());
+		if (format.getInputFamily() != null) {
+			jsonFormat.put("inputFamily", format.getInputFamily().name());
+		}
+		if (format.getLoadProperties() != null) {
+			jsonFormat.put("loadProperties", toJson(format.getLoadProperties()));
+		}
+		if (format.getStorePropertiesByFamily() != null) {
+			JSONObject jsonStorePropertiesByFamily = new SortedJsonObject();
+			for (Map.Entry<DocumentFamily, Map<String, ?>> entry : format.getStorePropertiesByFamily().entrySet()) {
+				jsonStorePropertiesByFamily.put(entry.getKey().name(), toJson(entry.getValue()));
+			}
+			jsonFormat.put("storePropertiesByFamily", jsonStorePropertiesByFamily);
+		}
+		return jsonFormat;
+	}
+	
+	@SuppressWarnings("unchecked")
+	private static JSONObject toJson(Map<String, ?> properties) throws JSONException {
+		JSONObject jsonProperties = new SortedJsonObject();
+		for (Map.Entry<String, ?> entry : properties.entrySet()) {
+			if (entry.getValue() instanceof Map) {
+				Map<String, ?> jsonValue = (Map<String, ?>) entry.getValue();
+				jsonProperties.put(entry.getKey(), toJson(jsonValue));
+			}
+			else {
+				jsonProperties.put(entry.getKey(), entry.getValue());
+			}
+		}
+		return jsonProperties;
+	}
+	
+	public static void main(String[] args) throws Exception {
+		DefaultDocumentFormatRegistry registry = new DefaultDocumentFormatRegistry();
+		@SuppressWarnings("unchecked")
+		List<DocumentFormat> formats = (List<DocumentFormat>) ReflectionUtils.getPrivateField(SimpleDocumentFormatRegistry.class, registry, "documentFormats");
+		JSONArray array = new JSONArray();
+		for (DocumentFormat format : formats) {
+			array.put(toJson(format));
+		}
+		System.out.println(array.toString(2));
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/document/JsonDocumentFormatRegistryTest.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/document/JsonDocumentFormatRegistryTest.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/document/JsonDocumentFormatRegistryTest.java	(revision 2406)
@@ -28,18 +28,19 @@
 
 @Test
 public class JsonDocumentFormatRegistryTest {
-
-    public void readJsonRegistry() throws JSONException, IOException {
-        InputStream input = getClass().getResourceAsStream("/document-formats.js");
-        DocumentFormatRegistry registry = null;
-        try {
-            registry = new JsonDocumentFormatRegistry(input);
-        } finally {
-            IOUtils.closeQuietly(input);
-        }
-        DocumentFormat odt = registry.getFormatByExtension("odt");
-        assertNotNull(odt);
-        assertNotNull(odt.getStoreProperties(DocumentFamily.TEXT));
-    }
-
+	
+	public void readJsonRegistry() throws JSONException, IOException {
+		InputStream input = getClass().getResourceAsStream("/document-formats.js");
+		DocumentFormatRegistry registry = null;
+		try {
+			registry = new JsonDocumentFormatRegistry(input);
+		}
+		finally {
+			IOUtils.closeQuietly(input);
+		}
+		DocumentFormat odt = registry.getFormatByExtension("odt");
+		assertNotNull(odt);
+		assertNotNull(odt.getStoreProperties(DocumentFamily.TEXT));
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/process/ProcessManagerTest.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/process/ProcessManagerTest.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/test/java/org/artofsolving/jodconverter/process/ProcessManagerTest.java	(revision 2406)
@@ -22,39 +22,39 @@
 
 @Test
 public class ProcessManagerTest {
-
-    public void linuxProcessManager() throws Exception {
-        if (!PlatformUtils.isLinux()) {
-            throw new SkipException("LinuxProcessManager can only be tested on Linux");
-        }
-
-        ProcessManager processManager = new LinuxProcessManager();
-        Process process = new ProcessBuilder("sleep", "5s").start();
-        ProcessQuery query = new ProcessQuery("sleep", "5s");
-        
-        long pid = processManager.findPid(query);
-        assertFalse(pid == ProcessManager.PID_NOT_FOUND);
-        Integer javaPid = (Integer) ReflectionUtils.getPrivateField(process, "pid");
-        assertEquals(pid, javaPid.longValue());
-        
-        processManager.kill(process, pid);
-        assertEquals(processManager.findPid(query), ProcessManager.PID_NOT_FOUND);
-    }
-
-    public void sigarProcessManager() throws Exception {
-        ProcessManager processManager = new SigarProcessManager();
-        Process process = new ProcessBuilder("sleep", "5s").start();
-        ProcessQuery query = new ProcessQuery("sleep", "5s");
-        
-        long pid = processManager.findPid(query);
-        assertFalse(pid == ProcessManager.PID_NOT_FOUND);
-        if (PlatformUtils.isLinux()) {
-            Integer javaPid = (Integer) ReflectionUtils.getPrivateField(process, "pid");
-            assertEquals(pid, javaPid.longValue());
-        }
-
-        processManager.kill(process, pid);
-        assertEquals(processManager.findPid(query), ProcessManager.PID_NOT_FOUND);
-    }
-
+	
+	public void linuxProcessManager() throws Exception {
+		if (!PlatformUtils.isLinux()) {
+			throw new SkipException("LinuxProcessManager can only be tested on Linux");
+		}
+		
+		ProcessManager processManager = new LinuxProcessManager();
+		Process process = new ProcessBuilder("sleep", "5s").start();
+		ProcessQuery query = new ProcessQuery("sleep", "5s");
+		
+		long pid = processManager.findPid(query);
+		assertFalse(pid == ProcessManager.PID_NOT_FOUND);
+		Integer javaPid = (Integer) ReflectionUtils.getPrivateField(process, "pid");
+		assertEquals(pid, javaPid.longValue());
+		
+		processManager.kill(process, pid);
+		assertEquals(processManager.findPid(query), ProcessManager.PID_NOT_FOUND);
+	}
+	
+	public void sigarProcessManager() throws Exception {
+		ProcessManager processManager = new SigarProcessManager();
+		Process process = new ProcessBuilder("sleep", "5s").start();
+		ProcessQuery query = new ProcessQuery("sleep", "5s");
+		
+		long pid = processManager.findPid(query);
+		assertFalse(pid == ProcessManager.PID_NOT_FOUND);
+		if (PlatformUtils.isLinux()) {
+			Integer javaPid = (Integer) ReflectionUtils.getPrivateField(process, "pid");
+			assertEquals(pid, javaPid.longValue());
+		}
+		
+		processManager.kill(process, pid);
+		assertEquals(processManager.findPid(query), ProcessManager.PID_NOT_FOUND);
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/util/PlatformUtils.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/util/PlatformUtils.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/util/PlatformUtils.java	(revision 2406)
@@ -13,23 +13,23 @@
 package org.artofsolving.jodconverter.util;
 
 public class PlatformUtils {
-
-    private static final String OS_NAME = System.getProperty("os.name").toLowerCase();
-    
-    private PlatformUtils() {
-        throw new AssertionError("utility class must not be instantiated");
-    }
-
-    public static boolean isLinux() {
-        return OS_NAME.startsWith("linux");
-    }
-
-    public static boolean isMac() {
-        return OS_NAME.startsWith("mac");
-    }
-
-    public static boolean isWindows() {
-        return OS_NAME.startsWith("windows");
-    }
-
+	
+	private static final String OS_NAME = System.getProperty("os.name").toLowerCase();
+	
+	private PlatformUtils() {
+		throw new AssertionError("utility class must not be instantiated");
+	}
+	
+	public static boolean isLinux() {
+		return OS_NAME.startsWith("linux");
+	}
+	
+	public static boolean isMac() {
+		return OS_NAME.startsWith("mac");
+	}
+	
+	public static boolean isWindows() {
+		return OS_NAME.startsWith("windows");
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/DefaultDocumentFormatRegistry.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/DefaultDocumentFormatRegistry.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/DefaultDocumentFormatRegistry.java	(revision 2406)
@@ -17,7 +17,7 @@
 import java.util.Map;
 
 public class DefaultDocumentFormatRegistry extends SimpleDocumentFormatRegistry {
-
+	
 	public DefaultDocumentFormatRegistry() {
 		DocumentFormat pdf = new DocumentFormat("Portable Document Format", "pdf", "application/pdf");
 		pdf.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "writer_pdf_Export"));
@@ -32,15 +32,15 @@
 		addFormat(swf);
 		
 		// disabled because it's not always available
-		//DocumentFormat xhtml = new DocumentFormat("XHTML", "xhtml", "application/xhtml+xml");
-		//xhtml.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "XHTML Writer File"));
-		//xhtml.setStoreProperties(DocumentFamily.SPREADSHEET, Collections.singletonMap("FilterName", "XHTML Calc File"));
-		//xhtml.setStoreProperties(DocumentFamily.PRESENTATION, Collections.singletonMap("FilterName", "XHTML Impress File"));
-		//addFormat(xhtml);
-
+		// DocumentFormat xhtml = new DocumentFormat("XHTML", "xhtml", "application/xhtml+xml");
+		// xhtml.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "XHTML Writer File"));
+		// xhtml.setStoreProperties(DocumentFamily.SPREADSHEET, Collections.singletonMap("FilterName", "XHTML Calc File"));
+		// xhtml.setStoreProperties(DocumentFamily.PRESENTATION, Collections.singletonMap("FilterName", "XHTML Impress File"));
+		// addFormat(xhtml);
+		
 		DocumentFormat html = new DocumentFormat("HTML", "html", "text/html");
-        // HTML is treated as Text when supplied as input, but as an output it is also
-        // available for exporting Spreadsheet and Presentation formats
+		// HTML is treated as Text when supplied as input, but as an output it is also
+		// available for exporting Spreadsheet and Presentation formats
 		html.setInputFamily(DocumentFamily.TEXT);
 		html.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "HTML (StarWriter)"));
 		html.setStoreProperties(DocumentFamily.SPREADSHEET, Collections.singletonMap("FilterName", "HTML (StarCalc)"));
@@ -51,107 +51,107 @@
 		odt.setInputFamily(DocumentFamily.TEXT);
 		odt.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "writer8"));
 		addFormat(odt);
-
+		
 		DocumentFormat sxw = new DocumentFormat("OpenOffice.org 1.0 Text Document", "sxw", "application/vnd.sun.xml.writer");
 		sxw.setInputFamily(DocumentFamily.TEXT);
 		sxw.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "StarOffice XML (Writer)"));
 		addFormat(sxw);
-
+		
 		DocumentFormat doc = new DocumentFormat("Microsoft Word", "doc", "application/msword");
 		doc.setInputFamily(DocumentFamily.TEXT);
 		doc.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "MS Word 97"));
 		addFormat(doc);
-
+		
 		DocumentFormat docx = new DocumentFormat("Microsoft Word 2007 XML", "docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
 		docx.setInputFamily(DocumentFamily.TEXT);
-        addFormat(docx);
-
+		addFormat(docx);
+		
 		DocumentFormat rtf = new DocumentFormat("Rich Text Format", "rtf", "text/rtf");
 		rtf.setInputFamily(DocumentFamily.TEXT);
 		rtf.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "Rich Text Format"));
 		addFormat(rtf);
-
+		
 		DocumentFormat wpd = new DocumentFormat("WordPerfect", "wpd", "application/wordperfect");
 		wpd.setInputFamily(DocumentFamily.TEXT);
 		addFormat(wpd);
-
+		
 		DocumentFormat txt = new DocumentFormat("Plain Text", "txt", "text/plain");
 		txt.setInputFamily(DocumentFamily.TEXT);
-		Map<String,Object> txtLoadAndStoreProperties = new LinkedHashMap<String,Object>();
+		Map<String, Object> txtLoadAndStoreProperties = new LinkedHashMap<String, Object>();
 		txtLoadAndStoreProperties.put("FilterName", "Text (encoded)");
 		txtLoadAndStoreProperties.put("FilterOptions", "utf8");
 		txt.setLoadProperties(txtLoadAndStoreProperties);
 		txt.setStoreProperties(DocumentFamily.TEXT, txtLoadAndStoreProperties);
 		addFormat(txt);
-
-        DocumentFormat wikitext = new DocumentFormat("MediaWiki wikitext", "wiki", "text/x-wiki");
-        wikitext.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "MediaWiki"));
-        //addFormat(wikitext);
 		
+		DocumentFormat wikitext = new DocumentFormat("MediaWiki wikitext", "wiki", "text/x-wiki");
+		wikitext.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "MediaWiki"));
+		// addFormat(wikitext);
+		
 		DocumentFormat ods = new DocumentFormat("OpenDocument Spreadsheet", "ods", "application/vnd.oasis.opendocument.spreadsheet");
 		ods.setInputFamily(DocumentFamily.SPREADSHEET);
 		ods.setStoreProperties(DocumentFamily.SPREADSHEET, Collections.singletonMap("FilterName", "calc8"));
 		addFormat(ods);
-
+		
 		DocumentFormat sxc = new DocumentFormat("OpenOffice.org 1.0 Spreadsheet", "sxc", "application/vnd.sun.xml.calc");
 		sxc.setInputFamily(DocumentFamily.SPREADSHEET);
 		sxc.setStoreProperties(DocumentFamily.SPREADSHEET, Collections.singletonMap("FilterName", "StarOffice XML (Calc)"));
 		addFormat(sxc);
-
+		
 		DocumentFormat xls = new DocumentFormat("Microsoft Excel", "xls", "application/vnd.ms-excel");
 		xls.setInputFamily(DocumentFamily.SPREADSHEET);
 		xls.setStoreProperties(DocumentFamily.SPREADSHEET, Collections.singletonMap("FilterName", "MS Excel 97"));
 		addFormat(xls);
-
+		
 		DocumentFormat xlsx = new DocumentFormat("Microsoft Excel 2007 XML", "xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
 		xlsx.setInputFamily(DocumentFamily.SPREADSHEET);
-        addFormat(xlsx);
-
-        DocumentFormat csv = new DocumentFormat("Comma Separated Values", "csv", "text/csv");
-        csv.setInputFamily(DocumentFamily.SPREADSHEET);
-        Map<String,Object> csvLoadAndStoreProperties = new LinkedHashMap<String,Object>();
-        csvLoadAndStoreProperties.put("FilterName", "Text - txt - csv (StarCalc)");
-        csvLoadAndStoreProperties.put("FilterOptions", "44,34,0");  // Field Separator: ','; Text Delimiter: '"' 
-        csv.setLoadProperties(csvLoadAndStoreProperties);
-        csv.setStoreProperties(DocumentFamily.SPREADSHEET, csvLoadAndStoreProperties);
-        addFormat(csv);
-
-        DocumentFormat tsv = new DocumentFormat("Tab Separated Values", "tsv", "text/tab-separated-values");
-        tsv.setInputFamily(DocumentFamily.SPREADSHEET);
-        Map<String,Object> tsvLoadAndStoreProperties = new LinkedHashMap<String,Object>();
-        tsvLoadAndStoreProperties.put("FilterName", "Text - txt - csv (StarCalc)");
-        tsvLoadAndStoreProperties.put("FilterOptions", "9,34,0");  // Field Separator: '\t'; Text Delimiter: '"' 
-        tsv.setLoadProperties(tsvLoadAndStoreProperties);
-        tsv.setStoreProperties(DocumentFamily.SPREADSHEET, tsvLoadAndStoreProperties);
-        addFormat(tsv);
-
+		addFormat(xlsx);
+		
+		DocumentFormat csv = new DocumentFormat("Comma Separated Values", "csv", "text/csv");
+		csv.setInputFamily(DocumentFamily.SPREADSHEET);
+		Map<String, Object> csvLoadAndStoreProperties = new LinkedHashMap<String, Object>();
+		csvLoadAndStoreProperties.put("FilterName", "Text - txt - csv (StarCalc)");
+		csvLoadAndStoreProperties.put("FilterOptions", "44,34,0");  // Field Separator: ','; Text Delimiter: '"'
+		csv.setLoadProperties(csvLoadAndStoreProperties);
+		csv.setStoreProperties(DocumentFamily.SPREADSHEET, csvLoadAndStoreProperties);
+		addFormat(csv);
+		
+		DocumentFormat tsv = new DocumentFormat("Tab Separated Values", "tsv", "text/tab-separated-values");
+		tsv.setInputFamily(DocumentFamily.SPREADSHEET);
+		Map<String, Object> tsvLoadAndStoreProperties = new LinkedHashMap<String, Object>();
+		tsvLoadAndStoreProperties.put("FilterName", "Text - txt - csv (StarCalc)");
+		tsvLoadAndStoreProperties.put("FilterOptions", "9,34,0");  // Field Separator: '\t'; Text Delimiter: '"'
+		tsv.setLoadProperties(tsvLoadAndStoreProperties);
+		tsv.setStoreProperties(DocumentFamily.SPREADSHEET, tsvLoadAndStoreProperties);
+		addFormat(tsv);
+		
 		DocumentFormat odp = new DocumentFormat("OpenDocument Presentation", "odp", "application/vnd.oasis.opendocument.presentation");
 		odp.setInputFamily(DocumentFamily.PRESENTATION);
 		odp.setStoreProperties(DocumentFamily.PRESENTATION, Collections.singletonMap("FilterName", "impress8"));
 		addFormat(odp);
-
+		
 		DocumentFormat sxi = new DocumentFormat("OpenOffice.org 1.0 Presentation", "sxi", "application/vnd.sun.xml.impress");
 		sxi.setInputFamily(DocumentFamily.PRESENTATION);
 		sxi.setStoreProperties(DocumentFamily.PRESENTATION, Collections.singletonMap("FilterName", "StarOffice XML (Impress)"));
 		addFormat(sxi);
-
+		
 		DocumentFormat ppt = new DocumentFormat("Microsoft PowerPoint", "ppt", "application/vnd.ms-powerpoint");
 		ppt.setInputFamily(DocumentFamily.PRESENTATION);
 		ppt.setStoreProperties(DocumentFamily.PRESENTATION, Collections.singletonMap("FilterName", "MS PowerPoint 97"));
 		addFormat(ppt);
-
+		
 		DocumentFormat pptx = new DocumentFormat("Microsoft PowerPoint 2007 XML", "pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation");
 		pptx.setInputFamily(DocumentFamily.PRESENTATION);
-        addFormat(pptx);
-        
-        DocumentFormat odg = new DocumentFormat("OpenDocument Drawing", "odg", "application/vnd.oasis.opendocument.graphics");
-        odg.setInputFamily(DocumentFamily.DRAWING);
-        odg.setStoreProperties(DocumentFamily.DRAWING, Collections.singletonMap("FilterName", "draw8"));
-        addFormat(odg);
-        
-        DocumentFormat svg = new DocumentFormat("Scalable Vector Graphics", "svg", "image/svg+xml");
-        svg.setStoreProperties(DocumentFamily.DRAWING, Collections.singletonMap("FilterName", "draw_svg_Export"));
-        addFormat(svg);
-  	}
-
+		addFormat(pptx);
+		
+		DocumentFormat odg = new DocumentFormat("OpenDocument Drawing", "odg", "application/vnd.oasis.opendocument.graphics");
+		odg.setInputFamily(DocumentFamily.DRAWING);
+		odg.setStoreProperties(DocumentFamily.DRAWING, Collections.singletonMap("FilterName", "draw8"));
+		addFormat(odg);
+		
+		DocumentFormat svg = new DocumentFormat("Scalable Vector Graphics", "svg", "image/svg+xml");
+		svg.setStoreProperties(DocumentFamily.DRAWING, Collections.singletonMap("FilterName", "draw_svg_Export"));
+		addFormat(svg);
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/DocumentFormat.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/DocumentFormat.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/DocumentFormat.java	(revision 2406)
@@ -16,84 +16,89 @@
 import java.util.Map;
 
 public class DocumentFormat {
-
-    private String name;
-    private String extension;
-    private String mediaType;
-    private DocumentFamily inputFamily;
-    private Map<String,?> loadProperties;
-    private Map<DocumentFamily,Map<String,?>> storePropertiesByFamily;
-
-    public DocumentFormat() {
-        // default
-    }
-
-    public DocumentFormat(String name, String extension, String mediaType) {
-        this.name = name;
-        this.extension = extension;
-        this.mediaType = mediaType;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getExtension() {
-        return extension;
-    }
-
-    public void setExtension(String extension) {
-        this.extension = extension;
-    }
-
-    public String getMediaType() {
-        return mediaType;
-    }
-
-    public void setMediaType(String mediaType) {
-        this.mediaType = mediaType;
-    }
-
-    public DocumentFamily getInputFamily() {
-        return inputFamily;
-    }
-
-    public void setInputFamily(DocumentFamily documentFamily) {
-        this.inputFamily = documentFamily;
-    }
-
-    public Map<String, ?> getLoadProperties() {
-        return loadProperties;
-    }
-
-    public void setLoadProperties(Map<String,?> loadProperties) {
-        this.loadProperties = loadProperties;
-    }
-
-    public Map<DocumentFamily, Map<String, ?>> getStorePropertiesByFamily() {
-        return storePropertiesByFamily;
-    }
-
-    public void setStorePropertiesByFamily(Map<DocumentFamily, Map<String,?>> storePropertiesByFamily) {
-        this.storePropertiesByFamily = storePropertiesByFamily;
-    }
-
-    public void setStoreProperties(DocumentFamily family, Map<String,?> storeProperties) {
-        if (storePropertiesByFamily == null) {
-            storePropertiesByFamily = new HashMap<DocumentFamily,Map<String,?>>();
-        }
-        storePropertiesByFamily.put(family, storeProperties);
-    }
-
-    public Map<String,?> getStoreProperties(DocumentFamily family) {
-        if (storePropertiesByFamily == null) {
-            return null;
-        }
-        return storePropertiesByFamily.get(family);
-    }
-
+	
+	private String name;
+	
+	private String extension;
+	
+	private String mediaType;
+	
+	private DocumentFamily inputFamily;
+	
+	private Map<String, ?> loadProperties;
+	
+	private Map<DocumentFamily, Map<String, ?>> storePropertiesByFamily;
+	
+	public DocumentFormat() {
+		// default
+	}
+	
+	public DocumentFormat(String name, String extension, String mediaType) {
+		this.name = name;
+		this.extension = extension;
+		this.mediaType = mediaType;
+	}
+	
+	public String getName() {
+		return name;
+	}
+	
+	public void setName(String name) {
+		this.name = name;
+	}
+	
+	public String getExtension() {
+		return extension;
+	}
+	
+	public void setExtension(String extension) {
+		this.extension = extension;
+	}
+	
+	public String getMediaType() {
+		return mediaType;
+	}
+	
+	public void setMediaType(String mediaType) {
+		this.mediaType = mediaType;
+	}
+	
+	public DocumentFamily getInputFamily() {
+		return inputFamily;
+	}
+	
+	public void setInputFamily(DocumentFamily documentFamily) {
+		this.inputFamily = documentFamily;
+	}
+	
+	public Map<String, ?> getLoadProperties() {
+		return loadProperties;
+	}
+	
+	public void setLoadProperties(Map<String, ?> loadProperties) {
+		this.loadProperties = loadProperties;
+	}
+	
+	public Map<DocumentFamily, Map<String, ?>> getStorePropertiesByFamily() {
+		return storePropertiesByFamily;
+	}
+	
+	public void setStorePropertiesByFamily(Map<DocumentFamily, Map<String, ?>> storePropertiesByFamily) {
+		this.storePropertiesByFamily = storePropertiesByFamily;
+	}
+	
+	public void setStoreProperties(DocumentFamily family, Map<String, ?> storeProperties) {
+		if (storePropertiesByFamily == null) {
+			storePropertiesByFamily = new HashMap<DocumentFamily, Map<String, ?>>();
+		}
+		storePropertiesByFamily.put(family, storeProperties);
+	}
+	
+	public Map<String, ?> getStoreProperties(DocumentFamily family) {
+		if (storePropertiesByFamily == null) {
+			return null;
+		}
+		return storePropertiesByFamily.get(family);
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/JsonDocumentFormatRegistry.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/JsonDocumentFormatRegistry.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/JsonDocumentFormatRegistry.java	(revision 2406)
@@ -23,51 +23,52 @@
 import org.json.JSONObject;
 
 public class JsonDocumentFormatRegistry extends SimpleDocumentFormatRegistry {
-
-    public JsonDocumentFormatRegistry(InputStream input) throws JSONException, IOException {
-        readJsonArray(IOUtils.toString(input));
-    }
-
-    public JsonDocumentFormatRegistry(String source) throws JSONException {
-        readJsonArray(source);
-    }
-
-    private void readJsonArray(String source) throws JSONException {
-        JSONArray array = new JSONArray(source);
-        for (int i = 0; i < array.length(); i++) {
-            JSONObject jsonFormat = array.getJSONObject(i);
-            DocumentFormat format = new DocumentFormat();
-            format.setName(jsonFormat.getString("name"));
-            format.setExtension(jsonFormat.getString("extension"));
-            format.setMediaType(jsonFormat.getString("mediaType"));
-            if (jsonFormat.has("inputFamily")) {
-                format.setInputFamily(DocumentFamily.valueOf(jsonFormat.getString("inputFamily")));
-            }
-            if (jsonFormat.has("loadProperties")) {
-                format.setLoadProperties(toJavaMap(jsonFormat.getJSONObject("loadProperties")));
-            }
-            if (jsonFormat.has("storePropertiesByFamily")) {
-                JSONObject jsonStorePropertiesByFamily = jsonFormat.getJSONObject("storePropertiesByFamily");
-                for (String key : JSONObject.getNames(jsonStorePropertiesByFamily)) {
-                    Map<String,?> storeProperties = toJavaMap(jsonStorePropertiesByFamily.getJSONObject(key));
-                    format.setStoreProperties(DocumentFamily.valueOf(key), storeProperties);
-                }
-            }
-            addFormat(format);
-        }
-    }
-
-    private Map<String,?> toJavaMap(JSONObject jsonMap) throws JSONException {
-        Map<String,Object> map = new HashMap<String,Object>();
-        for (String key : JSONObject.getNames(jsonMap)) {
-            Object value = jsonMap.get(key);
-            if (value instanceof JSONObject) {
-                map.put(key, toJavaMap((JSONObject) value));
-            } else {
-                map.put(key, value);
-            }
-        }
-        return map;
-    }
-
+	
+	public JsonDocumentFormatRegistry(InputStream input) throws JSONException, IOException {
+		readJsonArray(IOUtils.toString(input));
+	}
+	
+	public JsonDocumentFormatRegistry(String source) throws JSONException {
+		readJsonArray(source);
+	}
+	
+	private void readJsonArray(String source) throws JSONException {
+		JSONArray array = new JSONArray(source);
+		for (int i = 0; i < array.length(); i++) {
+			JSONObject jsonFormat = array.getJSONObject(i);
+			DocumentFormat format = new DocumentFormat();
+			format.setName(jsonFormat.getString("name"));
+			format.setExtension(jsonFormat.getString("extension"));
+			format.setMediaType(jsonFormat.getString("mediaType"));
+			if (jsonFormat.has("inputFamily")) {
+				format.setInputFamily(DocumentFamily.valueOf(jsonFormat.getString("inputFamily")));
+			}
+			if (jsonFormat.has("loadProperties")) {
+				format.setLoadProperties(toJavaMap(jsonFormat.getJSONObject("loadProperties")));
+			}
+			if (jsonFormat.has("storePropertiesByFamily")) {
+				JSONObject jsonStorePropertiesByFamily = jsonFormat.getJSONObject("storePropertiesByFamily");
+				for (String key : JSONObject.getNames(jsonStorePropertiesByFamily)) {
+					Map<String, ?> storeProperties = toJavaMap(jsonStorePropertiesByFamily.getJSONObject(key));
+					format.setStoreProperties(DocumentFamily.valueOf(key), storeProperties);
+				}
+			}
+			addFormat(format);
+		}
+	}
+	
+	private Map<String, ?> toJavaMap(JSONObject jsonMap) throws JSONException {
+		Map<String, Object> map = new HashMap<String, Object>();
+		for (String key : JSONObject.getNames(jsonMap)) {
+			Object value = jsonMap.get(key);
+			if (value instanceof JSONObject) {
+				map.put(key, toJavaMap((JSONObject) value));
+			}
+			else {
+				map.put(key, value);
+			}
+		}
+		return map;
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/SimpleDocumentFormatRegistry.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/SimpleDocumentFormatRegistry.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/SimpleDocumentFormatRegistry.java	(revision 2406)
@@ -18,19 +18,19 @@
 import java.util.Set;
 
 public class SimpleDocumentFormatRegistry implements DocumentFormatRegistry {
-
+	
 	private List<DocumentFormat> documentFormats = new ArrayList<DocumentFormat>();
-
+	
 	public void addFormat(DocumentFormat documentFormat) {
 		documentFormats.add(documentFormat);
 	}
-
+	
 	public DocumentFormat getFormatByExtension(String extension) {
-        if (extension == null) {
-            return null;
-        }
-        String lowerExtension = extension.toLowerCase();
-        //TODO keep a documentByExtension map instead
+		if (extension == null) {
+			return null;
+		}
+		String lowerExtension = extension.toLowerCase();
+		// TODO keep a documentByExtension map instead
 		for (DocumentFormat format : documentFormats) {
 			if (format.getExtension().equals(lowerExtension)) {
 				return format;
@@ -38,28 +38,28 @@
 		}
 		return null;
 	}
-
+	
 	public DocumentFormat getFormatByMediaType(String mediaType) {
-        if (mediaType == null) {
-            return null;
-        }
-        //TODO keep a documentByMediaType map instead
-        for (DocumentFormat format : documentFormats) {
-            if (format.getMediaType().equals(mediaType)) {
-                return format;
-            }
-        }
-	    return null;
+		if (mediaType == null) {
+			return null;
+		}
+		// TODO keep a documentByMediaType map instead
+		for (DocumentFormat format : documentFormats) {
+			if (format.getMediaType().equals(mediaType)) {
+				return format;
+			}
+		}
+		return null;
 	}
-
+	
 	public Set<DocumentFormat> getOutputFormats(DocumentFamily family) {
-	    Set<DocumentFormat> formats = new HashSet<DocumentFormat>();
-        for (DocumentFormat format : documentFormats) {
-            if (format.getStoreProperties(family) != null) {
-                formats.add(format);
-            }
-        }
-	    return formats;
+		Set<DocumentFormat> formats = new HashSet<DocumentFormat>();
+		for (DocumentFormat format : documentFormats) {
+			if (format.getStoreProperties(family) != null) {
+				formats.add(format);
+			}
+		}
+		return formats;
 	}
-
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/DocumentFamily.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/DocumentFamily.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/DocumentFamily.java	(revision 2406)
@@ -13,7 +13,7 @@
 package org.artofsolving.jodconverter.document;
 
 public enum DocumentFamily {
+	
+	TEXT, SPREADSHEET, PRESENTATION, DRAWING
 
-    TEXT, SPREADSHEET, PRESENTATION, DRAWING
-
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/DocumentFormatRegistry.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/DocumentFormatRegistry.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/document/DocumentFormatRegistry.java	(revision 2406)
@@ -15,11 +15,11 @@
 import java.util.Set;
 
 public interface DocumentFormatRegistry {
-
-    public DocumentFormat getFormatByExtension(String extension);
-
-    public DocumentFormat getFormatByMediaType(String mediaType);
-
-    public Set<DocumentFormat> getOutputFormats(DocumentFamily family); 
-
+	
+	public DocumentFormat getFormatByExtension(String extension);
+	
+	public DocumentFormat getFormatByMediaType(String mediaType);
+	
+	public Set<DocumentFormat> getOutputFormats(DocumentFamily family);
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/SigarProcessManager.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/SigarProcessManager.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/SigarProcessManager.java	(revision 2406)
@@ -29,43 +29,47 @@
  * for documentation and downloads.
  */
 public class SigarProcessManager implements ProcessManager {
-
-    public long findPid(ProcessQuery query) throws IOException {
-        Sigar sigar = new Sigar();
-        try {
-            long[] pids = ProcessFinder.find(sigar, "State.Name.eq=" + query.getCommand());
-            for (int i = 0; i < pids.length; i++) {
-                String[] arguments = sigar.getProcArgs(pids[i]);
-                if (arguments != null && argumentMatches(arguments, query.getArgument())) {
-                    return pids[i];
-                }
-            }
-            return PID_NOT_FOUND;
-        } catch (SigarException sigarException) {
-            throw new IOException("findPid failed", sigarException);
-        } finally {
-            sigar.close();
-        }
-    }
-
-    public void kill(Process process, long pid) throws IOException {
-        Sigar sigar = new Sigar();
-        try {
-            sigar.kill(pid, Sigar.getSigNum("KILL"));
-        } catch (SigarException sigarException) {
-            throw new IOException("kill failed", sigarException);
-        } finally {
-            sigar.close();
-        }
-    }
-
-    private boolean argumentMatches(String[] arguments, String expected) {
-        for (String argument : arguments) {
-            if (argument.contains(expected)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
+	
+	public long findPid(ProcessQuery query) throws IOException {
+		Sigar sigar = new Sigar();
+		try {
+			long[] pids = ProcessFinder.find(sigar, "State.Name.eq=" + query.getCommand());
+			for (int i = 0; i < pids.length; i++) {
+				String[] arguments = sigar.getProcArgs(pids[i]);
+				if (arguments != null && argumentMatches(arguments, query.getArgument())) {
+					return pids[i];
+				}
+			}
+			return PID_NOT_FOUND;
+		}
+		catch (SigarException sigarException) {
+			throw new IOException("findPid failed", sigarException);
+		}
+		finally {
+			sigar.close();
+		}
+	}
+	
+	public void kill(Process process, long pid) throws IOException {
+		Sigar sigar = new Sigar();
+		try {
+			sigar.kill(pid, Sigar.getSigNum("KILL"));
+		}
+		catch (SigarException sigarException) {
+			throw new IOException("kill failed", sigarException);
+		}
+		finally {
+			sigar.close();
+		}
+	}
+	
+	private boolean argumentMatches(String[] arguments, String expected) {
+		for (String argument : arguments) {
+			if (argument.contains(expected)) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/ProcessQuery.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/ProcessQuery.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/ProcessQuery.java	(revision 2406)
@@ -13,21 +13,22 @@
 package org.artofsolving.jodconverter.process;
 
 public class ProcessQuery {
-
-    private final String command;
-    private final String argument;
-
-    public ProcessQuery(String command, String argument) {
-        this.command = command;
-        this.argument = argument;
-    }
-
-    public String getCommand() {
-        return command;
-    }
-
-    public String getArgument() {
-        return argument;
-    }
-
+	
+	private final String command;
+	
+	private final String argument;
+	
+	public ProcessQuery(String command, String argument) {
+		this.command = command;
+		this.argument = argument;
+	}
+	
+	public String getCommand() {
+		return command;
+	}
+	
+	public String getArgument() {
+		return argument;
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/PureJavaProcessManager.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/PureJavaProcessManager.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/PureJavaProcessManager.java	(revision 2406)
@@ -13,13 +13,13 @@
 package org.artofsolving.jodconverter.process;
 
 public class PureJavaProcessManager implements ProcessManager {
-
-    public long findPid(ProcessQuery query) {
-        return PID_UNKNOWN;
-    }
-
-    public void kill(Process process, long pid) {
-        process.destroy();
-    }
-
+	
+	public long findPid(ProcessQuery query) {
+		return PID_UNKNOWN;
+	}
+	
+	public void kill(Process process, long pid) {
+		process.destroy();
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/LinuxProcessManager.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/LinuxProcessManager.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/LinuxProcessManager.java	(revision 2406)
@@ -28,55 +28,56 @@
  * {@link #findPid(String)}.
  */
 public class LinuxProcessManager implements ProcessManager {
-
-    private static final Pattern PS_OUTPUT_LINE = Pattern.compile("^\\s*(\\d+)\\s+(.*)$"); 
-
-    private String[] runAsArgs;
-
-    public void setRunAsArgs(String... runAsArgs) {
+	
+	private static final Pattern PS_OUTPUT_LINE = Pattern.compile("^\\s*(\\d+)\\s+(.*)$");
+	
+	private String[] runAsArgs;
+	
+	public void setRunAsArgs(String... runAsArgs) {
 		this.runAsArgs = runAsArgs;
 	}
-
-    protected String[] psCommand() {
-        return new String[] { "/bin/ps", "-e", "-o", "pid,args" };
-    }
-
-    public long findPid(ProcessQuery query) throws IOException {
-        String regex = Pattern.quote(query.getCommand()) + ".*" + Pattern.quote(query.getArgument());
-        Pattern commandPattern = Pattern.compile(regex);
-        for (String line : execute(psCommand())) {
-            Matcher lineMatcher = PS_OUTPUT_LINE.matcher(line);
-            if (lineMatcher.matches()) {
-                String command = lineMatcher.group(2);
-                Matcher commandMatcher = commandPattern.matcher(command);
-                if (commandMatcher.find()) {
-                    return Long.parseLong(lineMatcher.group(1));
-                }
-            }
-        }
-        return PID_NOT_FOUND;
-    }
-
-    public void kill(Process process, long pid) throws IOException {
-    	if (pid <= 0) {
-    		throw new IllegalArgumentException("invalid pid: " + pid);
-    	}
-        execute("/bin/kill", "-KILL", Long.toString(pid));
-    }
-
-    private List<String> execute(String... args) throws IOException {
-    	String[] command;
-    	if (runAsArgs != null) {
-    		command = new String[runAsArgs.length + args.length];
-    		System.arraycopy(runAsArgs, 0, command, 0, runAsArgs.length);
-    		System.arraycopy(args, 0, command, runAsArgs.length, args.length);
-    	} else {
-    		command = args;
-    	}
-        Process process = new ProcessBuilder(command).start();
-        @SuppressWarnings("unchecked")
-        List<String> lines = IOUtils.readLines(process.getInputStream());
-        return lines;
-    }
-
+	
+	protected String[] psCommand() {
+		return new String[] { "/bin/ps", "-e", "-o", "pid,args" };
+	}
+	
+	public long findPid(ProcessQuery query) throws IOException {
+		String regex = Pattern.quote(query.getCommand()) + ".*" + Pattern.quote(query.getArgument());
+		Pattern commandPattern = Pattern.compile(regex);
+		for (String line : execute(psCommand())) {
+			Matcher lineMatcher = PS_OUTPUT_LINE.matcher(line);
+			if (lineMatcher.matches()) {
+				String command = lineMatcher.group(2);
+				Matcher commandMatcher = commandPattern.matcher(command);
+				if (commandMatcher.find()) {
+					return Long.parseLong(lineMatcher.group(1));
+				}
+			}
+		}
+		return PID_NOT_FOUND;
+	}
+	
+	public void kill(Process process, long pid) throws IOException {
+		if (pid <= 0) {
+			throw new IllegalArgumentException("invalid pid: " + pid);
+		}
+		execute("/bin/kill", "-KILL", Long.toString(pid));
+	}
+	
+	private List<String> execute(String... args) throws IOException {
+		String[] command;
+		if (runAsArgs != null) {
+			command = new String[runAsArgs.length + args.length];
+			System.arraycopy(runAsArgs, 0, command, 0, runAsArgs.length);
+			System.arraycopy(args, 0, command, runAsArgs.length, args.length);
+		}
+		else {
+			command = args;
+		}
+		Process process = new ProcessBuilder(command).start();
+		@SuppressWarnings("unchecked")
+		List<String> lines = IOUtils.readLines(process.getInputStream());
+		return lines;
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/ProcessManager.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/ProcessManager.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/process/ProcessManager.java	(revision 2406)
@@ -15,18 +15,19 @@
 import java.io.IOException;
 
 public interface ProcessManager {
-
-    public static final long PID_NOT_FOUND = -2;
-    public static final long PID_UNKNOWN = -1;
-
-    void kill(Process process, long pid) throws IOException;
-
-    /**
-     * @param query
-     * @return the pid if found, {@link #PID_NOT_FOUND} if not,
-     *   or {@link #PID_UNKNOWN} if this implementation is unable to find out
-     * @throws IOException
-     */
-    long findPid(ProcessQuery query) throws IOException;
-
+	
+	public static final long PID_NOT_FOUND = -2;
+	
+	public static final long PID_UNKNOWN = -1;
+	
+	void kill(Process process, long pid) throws IOException;
+	
+	/**
+	 * @param query
+	 * @return the pid if found, {@link #PID_NOT_FOUND} if not,
+	 *         or {@link #PID_UNKNOWN} if this implementation is unable to find out
+	 * @throws IOException
+	 */
+	long findPid(ProcessQuery query) throws IOException;
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/OfficeDocumentConverter.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/OfficeDocumentConverter.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/OfficeDocumentConverter.java	(revision 2406)
@@ -26,50 +26,51 @@
 import com.sun.star.document.UpdateDocMode;
 
 public class OfficeDocumentConverter {
-
-    private final OfficeManager officeManager;
-    private final DocumentFormatRegistry formatRegistry;
-
-    private Map<String,?> defaultLoadProperties = createDefaultLoadProperties();
-
-    public OfficeDocumentConverter(OfficeManager officeManager) {
-        this(officeManager, new DefaultDocumentFormatRegistry());
-    }
-
-    public OfficeDocumentConverter(OfficeManager officeManager, DocumentFormatRegistry formatRegistry) {
-        this.officeManager = officeManager;
-        this.formatRegistry = formatRegistry;
-    }
-
-    private Map<String,Object> createDefaultLoadProperties() {
-        Map<String,Object> loadProperties = new HashMap<String,Object>();
-        loadProperties.put("Hidden", true);
-        loadProperties.put("ReadOnly", true);
-        loadProperties.put("UpdateDocMode", UpdateDocMode.QUIET_UPDATE);
-        return loadProperties;
-    }
-
-    public void setDefaultLoadProperties(Map<String, ?> defaultLoadProperties) {
-        this.defaultLoadProperties = defaultLoadProperties;
-    }
-
-    public DocumentFormatRegistry getFormatRegistry() {
-        return formatRegistry;
-    }
-
-    public void convert(File inputFile, File outputFile) throws OfficeException {
-        String outputExtension = FilenameUtils.getExtension(outputFile.getName());
-        DocumentFormat outputFormat = formatRegistry.getFormatByExtension(outputExtension);
-        convert(inputFile, outputFile, outputFormat);
-    }
-
-    public void convert(File inputFile, File outputFile, DocumentFormat outputFormat) throws OfficeException {
-        String inputExtension = FilenameUtils.getExtension(inputFile.getName());
-        DocumentFormat inputFormat = formatRegistry.getFormatByExtension(inputExtension);
-        StandardConversionTask conversionTask = new StandardConversionTask(inputFile, outputFile, outputFormat);
-        conversionTask.setDefaultLoadProperties(defaultLoadProperties);
-        conversionTask.setInputFormat(inputFormat);
-        officeManager.execute(conversionTask);
-    }
-
+	
+	private final OfficeManager officeManager;
+	
+	private final DocumentFormatRegistry formatRegistry;
+	
+	private Map<String, ?> defaultLoadProperties = createDefaultLoadProperties();
+	
+	public OfficeDocumentConverter(OfficeManager officeManager) {
+		this(officeManager, new DefaultDocumentFormatRegistry());
+	}
+	
+	public OfficeDocumentConverter(OfficeManager officeManager, DocumentFormatRegistry formatRegistry) {
+		this.officeManager = officeManager;
+		this.formatRegistry = formatRegistry;
+	}
+	
+	private Map<String, Object> createDefaultLoadProperties() {
+		Map<String, Object> loadProperties = new HashMap<String, Object>();
+		loadProperties.put("Hidden", true);
+		loadProperties.put("ReadOnly", true);
+		loadProperties.put("UpdateDocMode", UpdateDocMode.QUIET_UPDATE);
+		return loadProperties;
+	}
+	
+	public void setDefaultLoadProperties(Map<String, ?> defaultLoadProperties) {
+		this.defaultLoadProperties = defaultLoadProperties;
+	}
+	
+	public DocumentFormatRegistry getFormatRegistry() {
+		return formatRegistry;
+	}
+	
+	public void convert(File inputFile, File outputFile) throws OfficeException {
+		String outputExtension = FilenameUtils.getExtension(outputFile.getName());
+		DocumentFormat outputFormat = formatRegistry.getFormatByExtension(outputExtension);
+		convert(inputFile, outputFile, outputFormat);
+	}
+	
+	public void convert(File inputFile, File outputFile, DocumentFormat outputFormat) throws OfficeException {
+		String inputExtension = FilenameUtils.getExtension(inputFile.getName());
+		DocumentFormat inputFormat = formatRegistry.getFormatByExtension(inputExtension);
+		StandardConversionTask conversionTask = new StandardConversionTask(inputFile, outputFile, outputFormat);
+		conversionTask.setDefaultLoadProperties(defaultLoadProperties);
+		conversionTask.setInputFormat(inputFormat);
+		officeManager.execute(conversionTask);
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/cli/Convert.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/cli/Convert.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/cli/Convert.java	(revision 2406)
@@ -36,91 +36,101 @@
  * Command line interface executable.
  */
 public class Convert {
-
-    public static final int STATUS_OK = 0;
-    public static final int STATUS_MISSING_INPUT_FILE = 1;
-    public static final int STATUS_INVALID_ARGUMENTS = 255;
-
-    private static final Option OPTION_OUTPUT_FORMAT = new Option("o", "output-format", true, "output format (e.g. pdf)");
-    private static final Option OPTION_PORT = new Option("p", "port", true, "office socket port (optional; defaults to 2002)");
-    private static final Option OPTION_REGISTRY = new Option("r", "registry", true, "document formats registry configuration file (optional)");
-    private static final Option OPTION_TIMEOUT = new Option("t", "timeout", true, "maximum conversion time in seconds (optional; defaults to 120)");
-    private static final Option OPTION_USER_PROFILE = new Option("u", "user-profile", true, "use settings from the given user installation dir (optional)");
-    private static final Options OPTIONS = initOptions();
-
-    private static final int DEFAULT_OFFICE_PORT = 2002;
-
-    private static Options initOptions() {
-        Options options = new Options();
-        options.addOption(OPTION_OUTPUT_FORMAT);
-        options.addOption(OPTION_PORT);
-        options.addOption(OPTION_REGISTRY);
-        options.addOption(OPTION_TIMEOUT);
-        options.addOption(OPTION_USER_PROFILE);
-        return options;
-    }
-
-    public static void main(String[] arguments) throws ParseException, JSONException, IOException {
-        CommandLineParser commandLineParser = new PosixParser();
-        CommandLine commandLine = commandLineParser.parse(OPTIONS, arguments);
-
-        String outputFormat = null;
-        if (commandLine.hasOption(OPTION_OUTPUT_FORMAT.getOpt())) {
-            outputFormat = commandLine.getOptionValue(OPTION_OUTPUT_FORMAT.getOpt());
-        }
-
-        int port = DEFAULT_OFFICE_PORT;
-        if (commandLine.hasOption(OPTION_PORT.getOpt())) {
-            port = Integer.parseInt(commandLine.getOptionValue(OPTION_PORT.getOpt()));
-        }
-
-        String[] fileNames = commandLine.getArgs();
-        if ((outputFormat == null && fileNames.length != 2) || fileNames.length < 1) {
-            String syntax = "java -jar jodconverter-core.jar [options] input-file output-file\n"
-                    + "or [options] -o output-format input-file [input-file...]";
-            HelpFormatter helpFormatter = new HelpFormatter();
-            helpFormatter.printHelp(syntax, OPTIONS);
-//            System.exit(STATUS_INVALID_ARGUMENTS);
-        }
-
-        DocumentFormatRegistry registry;
-        if (commandLine.hasOption(OPTION_REGISTRY.getOpt())) {
-            File registryFile = new File(commandLine.getOptionValue(OPTION_REGISTRY.getOpt()));
-            registry = new JsonDocumentFormatRegistry(FileUtils.readFileToString(registryFile));
-        } else {
-            registry = new DefaultDocumentFormatRegistry();
-        }
-
-        DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration();
-        configuration.setPortNumber(port);
-        if (commandLine.hasOption(OPTION_TIMEOUT.getOpt())) {
-            int timeout = Integer.parseInt(commandLine.getOptionValue(OPTION_TIMEOUT.getOpt()));
-            configuration.setTaskExecutionTimeout(timeout * 1000);
-        }
-        if (commandLine.hasOption(OPTION_USER_PROFILE.getOpt())) {
-            String templateProfileDir = commandLine.getOptionValue(OPTION_USER_PROFILE.getOpt());
-            configuration.setTemplateProfileDir(new File(templateProfileDir));
-        }
-
-        OfficeManager officeManager = configuration.buildOfficeManager();
-        officeManager.start();
-        OfficeDocumentConverter converter = new OfficeDocumentConverter(officeManager, registry);
-        try {
-            if (outputFormat == null) {
-                File inputFile = new File(fileNames[0]);
-                File outputFile = new File(fileNames[1]);
-                converter.convert(inputFile, outputFile);
-            } else {
-                for (int i = 0; i < fileNames.length; i++) {
-                    File inputFile = new File(fileNames[i]);
-                    String outputName = FilenameUtils.getBaseName(fileNames[i]) + "." + outputFormat;
-                    File outputFile = new File(FilenameUtils.getFullPath(fileNames[i]) + outputName);
-                    converter.convert(inputFile, outputFile);
-                }
-            }
-        } finally {
-            officeManager.stop();
-        }
-    }
-    
+	
+	public static final int STATUS_OK = 0;
+	
+	public static final int STATUS_MISSING_INPUT_FILE = 1;
+	
+	public static final int STATUS_INVALID_ARGUMENTS = 255;
+	
+	private static final Option OPTION_OUTPUT_FORMAT = new Option("o", "output-format", true, "output format (e.g. pdf)");
+	
+	private static final Option OPTION_PORT = new Option("p", "port", true, "office socket port (optional; defaults to 2002)");
+	
+	private static final Option OPTION_REGISTRY = new Option("r", "registry", true, "document formats registry configuration file (optional)");
+	
+	private static final Option OPTION_TIMEOUT = new Option("t", "timeout", true, "maximum conversion time in seconds (optional; defaults to 120)");
+	
+	private static final Option OPTION_USER_PROFILE = new Option("u", "user-profile", true, "use settings from the given user installation dir (optional)");
+	
+	private static final Options OPTIONS = initOptions();
+	
+	private static final int DEFAULT_OFFICE_PORT = 2002;
+	
+	private static Options initOptions() {
+		Options options = new Options();
+		options.addOption(OPTION_OUTPUT_FORMAT);
+		options.addOption(OPTION_PORT);
+		options.addOption(OPTION_REGISTRY);
+		options.addOption(OPTION_TIMEOUT);
+		options.addOption(OPTION_USER_PROFILE);
+		return options;
+	}
+	
+	public static void main(String[] arguments) throws ParseException, JSONException, IOException {
+		CommandLineParser commandLineParser = new PosixParser();
+		CommandLine commandLine = commandLineParser.parse(OPTIONS, arguments);
+		
+		String outputFormat = null;
+		if (commandLine.hasOption(OPTION_OUTPUT_FORMAT.getOpt())) {
+			outputFormat = commandLine.getOptionValue(OPTION_OUTPUT_FORMAT.getOpt());
+		}
+		
+		int port = DEFAULT_OFFICE_PORT;
+		if (commandLine.hasOption(OPTION_PORT.getOpt())) {
+			port = Integer.parseInt(commandLine.getOptionValue(OPTION_PORT.getOpt()));
+		}
+		
+		String[] fileNames = commandLine.getArgs();
+		if ((outputFormat == null && fileNames.length != 2) || fileNames.length < 1) {
+			String syntax = "java -jar jodconverter-core.jar [options] input-file output-file\n"
+					+ "or [options] -o output-format input-file [input-file...]";
+			HelpFormatter helpFormatter = new HelpFormatter();
+			helpFormatter.printHelp(syntax, OPTIONS);
+			// System.exit(STATUS_INVALID_ARGUMENTS);
+		}
+		
+		DocumentFormatRegistry registry;
+		if (commandLine.hasOption(OPTION_REGISTRY.getOpt())) {
+			File registryFile = new File(commandLine.getOptionValue(OPTION_REGISTRY.getOpt()));
+			registry = new JsonDocumentFormatRegistry(FileUtils.readFileToString(registryFile));
+		}
+		else {
+			registry = new DefaultDocumentFormatRegistry();
+		}
+		
+		DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration();
+		configuration.setPortNumber(port);
+		if (commandLine.hasOption(OPTION_TIMEOUT.getOpt())) {
+			int timeout = Integer.parseInt(commandLine.getOptionValue(OPTION_TIMEOUT.getOpt()));
+			configuration.setTaskExecutionTimeout(timeout * 1000);
+		}
+		if (commandLine.hasOption(OPTION_USER_PROFILE.getOpt())) {
+			String templateProfileDir = commandLine.getOptionValue(OPTION_USER_PROFILE.getOpt());
+			configuration.setTemplateProfileDir(new File(templateProfileDir));
+		}
+		
+		OfficeManager officeManager = configuration.buildOfficeManager();
+		officeManager.start();
+		OfficeDocumentConverter converter = new OfficeDocumentConverter(officeManager, registry);
+		try {
+			if (outputFormat == null) {
+				File inputFile = new File(fileNames[0]);
+				File outputFile = new File(fileNames[1]);
+				converter.convert(inputFile, outputFile);
+			}
+			else {
+				for (int i = 0; i < fileNames.length; i++) {
+					File inputFile = new File(fileNames[i]);
+					String outputName = FilenameUtils.getBaseName(fileNames[i]) + "." + outputFormat;
+					File outputFile = new File(FilenameUtils.getFullPath(fileNames[i]) + outputName);
+					converter.convert(inputFile, outputFile);
+				}
+			}
+		}
+		finally {
+			officeManager.stop();
+		}
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/StandardConversionTask.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/StandardConversionTask.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/StandardConversionTask.java	(revision 2406)
@@ -26,49 +26,50 @@
 import com.sun.star.util.XRefreshable;
 
 public class StandardConversionTask extends AbstractConversionTask {
-
-    private final DocumentFormat outputFormat;
-
-    private Map<String,?> defaultLoadProperties;
-    private DocumentFormat inputFormat;
-
-    public StandardConversionTask(File inputFile, File outputFile, DocumentFormat outputFormat) {
-        super(inputFile, outputFile);
-        this.outputFormat = outputFormat;
-    }
-
-    public void setDefaultLoadProperties(Map<String, ?> defaultLoadProperties) {
-        this.defaultLoadProperties = defaultLoadProperties;
-    }
-
-    public void setInputFormat(DocumentFormat inputFormat) {
-        this.inputFormat = inputFormat;
-    }
-
-    @Override
-    protected void modifyDocument(XComponent document) throws OfficeException {
-        XRefreshable refreshable = cast(XRefreshable.class, document);
-        if (refreshable != null) {
-            refreshable.refresh();
-        }
-    }
-
-    @Override
-    protected Map<String,?> getLoadProperties(File inputFile) {
-        Map<String,Object> loadProperties = new HashMap<String,Object>();
-        if (defaultLoadProperties != null) {
-            loadProperties.putAll(defaultLoadProperties);
-        }
-        if (inputFormat != null && inputFormat.getLoadProperties() != null) {
-            loadProperties.putAll(inputFormat.getLoadProperties());
-        }
-        return loadProperties;
-    }
-
-    @Override
-    protected Map<String,?> getStoreProperties(File outputFile, XComponent document) {
-        DocumentFamily family = OfficeDocumentUtils.getDocumentFamily(document);
-        return outputFormat.getStoreProperties(family);
-    }
-
+	
+	private final DocumentFormat outputFormat;
+	
+	private Map<String, ?> defaultLoadProperties;
+	
+	private DocumentFormat inputFormat;
+	
+	public StandardConversionTask(File inputFile, File outputFile, DocumentFormat outputFormat) {
+		super(inputFile, outputFile);
+		this.outputFormat = outputFormat;
+	}
+	
+	public void setDefaultLoadProperties(Map<String, ?> defaultLoadProperties) {
+		this.defaultLoadProperties = defaultLoadProperties;
+	}
+	
+	public void setInputFormat(DocumentFormat inputFormat) {
+		this.inputFormat = inputFormat;
+	}
+	
+	@Override
+	protected void modifyDocument(XComponent document) throws OfficeException {
+		XRefreshable refreshable = cast(XRefreshable.class, document);
+		if (refreshable != null) {
+			refreshable.refresh();
+		}
+	}
+	
+	@Override
+	protected Map<String, ?> getLoadProperties(File inputFile) {
+		Map<String, Object> loadProperties = new HashMap<String, Object>();
+		if (defaultLoadProperties != null) {
+			loadProperties.putAll(defaultLoadProperties);
+		}
+		if (inputFormat != null && inputFormat.getLoadProperties() != null) {
+			loadProperties.putAll(inputFormat.getLoadProperties());
+		}
+		return loadProperties;
+	}
+	
+	@Override
+	protected Map<String, ?> getStoreProperties(File outputFile, XComponent document) {
+		DocumentFamily family = OfficeDocumentUtils.getDocumentFamily(document);
+		return outputFormat.getStoreProperties(family);
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/OfficeDocumentUtils.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/OfficeDocumentUtils.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/OfficeDocumentUtils.java	(revision 2406)
@@ -17,31 +17,34 @@
 import org.artofsolving.jodconverter.document.DocumentFamily;
 import org.artofsolving.jodconverter.office.OfficeException;
 
-
 import com.sun.star.lang.XComponent;
 import com.sun.star.lang.XServiceInfo;
 
 class OfficeDocumentUtils {
-
-    private OfficeDocumentUtils() {
-        throw new AssertionError("utility class must not be instantiated");
-    }
-
-    public static DocumentFamily getDocumentFamily(XComponent document) throws OfficeException {
-        XServiceInfo serviceInfo = cast(XServiceInfo.class, document);
-        if (serviceInfo.supportsService("com.sun.star.text.GenericTextDocument")) {
-            // NOTE: a GenericTextDocument is either a TextDocument, a WebDocument, or a GlobalDocument
-            // but this further distinction doesn't seem to matter for conversions
-            return DocumentFamily.TEXT;
-        } else if (serviceInfo.supportsService("com.sun.star.sheet.SpreadsheetDocument")) {
-            return DocumentFamily.SPREADSHEET;
-        } else if (serviceInfo.supportsService("com.sun.star.presentation.PresentationDocument")) {
-            return DocumentFamily.PRESENTATION;
-        } else if (serviceInfo.supportsService("com.sun.star.drawing.DrawingDocument")) {
-            return DocumentFamily.DRAWING;
-        } else {
-            throw new OfficeException("document of unknown family: " + serviceInfo.getImplementationName());
-        }
-    }
-
+	
+	private OfficeDocumentUtils() {
+		throw new AssertionError("utility class must not be instantiated");
+	}
+	
+	public static DocumentFamily getDocumentFamily(XComponent document) throws OfficeException {
+		XServiceInfo serviceInfo = cast(XServiceInfo.class, document);
+		if (serviceInfo.supportsService("com.sun.star.text.GenericTextDocument")) {
+			// NOTE: a GenericTextDocument is either a TextDocument, a WebDocument, or a GlobalDocument
+			// but this further distinction doesn't seem to matter for conversions
+			return DocumentFamily.TEXT;
+		}
+		else if (serviceInfo.supportsService("com.sun.star.sheet.SpreadsheetDocument")) {
+			return DocumentFamily.SPREADSHEET;
+		}
+		else if (serviceInfo.supportsService("com.sun.star.presentation.PresentationDocument")) {
+			return DocumentFamily.PRESENTATION;
+		}
+		else if (serviceInfo.supportsService("com.sun.star.drawing.DrawingDocument")) {
+			return DocumentFamily.DRAWING;
+		}
+		else {
+			throw new OfficeException("document of unknown family: " + serviceInfo.getImplementationName());
+		}
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/NamedThreadFactory.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/NamedThreadFactory.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/NamedThreadFactory.java	(revision 2406)
@@ -19,25 +19,26 @@
  * A {@link ThreadFactory} that allows for custom thread names
  */
 class NamedThreadFactory implements ThreadFactory {
-
-    private static final AtomicInteger threadIndex = new AtomicInteger(0);
-
-    private final String baseName;
-    private final boolean daemon;
-
-    public NamedThreadFactory(String baseName) {
-        this(baseName, true);
-    }
-
-    public NamedThreadFactory(String baseName, boolean daemon) {
-        this.baseName = baseName;
-        this.daemon = daemon;
-    }
-
-    public Thread newThread(Runnable runnable) {
-        Thread thread = new Thread(runnable, baseName + "-" + threadIndex.getAndIncrement());
-        thread.setDaemon(daemon);
-        return thread;
-    }
-
+	
+	private static final AtomicInteger threadIndex = new AtomicInteger(0);
+	
+	private final String baseName;
+	
+	private final boolean daemon;
+	
+	public NamedThreadFactory(String baseName) {
+		this(baseName, true);
+	}
+	
+	public NamedThreadFactory(String baseName, boolean daemon) {
+		this.baseName = baseName;
+		this.daemon = daemon;
+	}
+	
+	public Thread newThread(Runnable runnable) {
+		Thread thread = new Thread(runnable, baseName + "-" + threadIndex.getAndIncrement());
+		thread.setDaemon(daemon);
+		return thread;
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/SuspendableThreadPoolExecutor.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/SuspendableThreadPoolExecutor.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/SuspendableThreadPoolExecutor.java	(revision 2406)
@@ -20,40 +20,45 @@
 import java.util.concurrent.locks.ReentrantLock;
 
 class SuspendableThreadPoolExecutor extends ThreadPoolExecutor {
-
-    private boolean available = false;
-    private ReentrantLock suspendLock = new ReentrantLock();
-    private Condition availableCondition = suspendLock.newCondition();
-
-    public SuspendableThreadPoolExecutor(ThreadFactory threadFactory) {
-        super(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(), threadFactory);
-    }
-
-    @Override
-    protected void beforeExecute(Thread thread, Runnable task) {
-        super.beforeExecute(thread, task);
-        suspendLock.lock();
-        try {
-            while (!available) {
-                availableCondition.await();
-            }
-        } catch (InterruptedException interruptedException) {
-            thread.interrupt();
-        } finally {
-            suspendLock.unlock();
-        }
-    }
-
-    public void setAvailable(boolean available) {
-        suspendLock.lock();
-        try {
-            this.available = available;
-            if (available) {
-                availableCondition.signalAll();
-            }
-        } finally {
-            suspendLock.unlock();
-        }
-    }
-
+	
+	private boolean available = false;
+	
+	private ReentrantLock suspendLock = new ReentrantLock();
+	
+	private Condition availableCondition = suspendLock.newCondition();
+	
+	public SuspendableThreadPoolExecutor(ThreadFactory threadFactory) {
+		super(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(), threadFactory);
+	}
+	
+	@Override
+	protected void beforeExecute(Thread thread, Runnable task) {
+		super.beforeExecute(thread, task);
+		suspendLock.lock();
+		try {
+			while (!available) {
+				availableCondition.await();
+			}
+		}
+		catch (InterruptedException interruptedException) {
+			thread.interrupt();
+		}
+		finally {
+			suspendLock.unlock();
+		}
+	}
+	
+	public void setAvailable(boolean available) {
+		suspendLock.lock();
+		try {
+			this.available = available;
+			if (available) {
+				availableCondition.signalAll();
+			}
+		}
+		finally {
+			suspendLock.unlock();
+		}
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ManagedOfficeProcess.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ManagedOfficeProcess.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ManagedOfficeProcess.java	(revision 2406)
@@ -23,57 +23,63 @@
 import com.sun.star.lang.DisposedException;
 
 class ManagedOfficeProcess {
-
+	
 	private static final Integer EXIT_CODE_NEW_INSTALLATION = Integer.valueOf(81);
-
+	
 	private final ManagedOfficeProcessSettings settings;
-
+	
 	private final OfficeProcess process;
+	
 	private final OfficeConnection connection;
-
+	
 	private ExecutorService executor = Executors.newSingleThreadExecutor(new NamedThreadFactory("OfficeProcessThread"));
-
+	
 	private final Logger logger = Logger.getLogger(getClass().getName());
-
+	
 	public ManagedOfficeProcess(ManagedOfficeProcessSettings settings) throws OfficeException {
 		this.settings = settings;
 		process = new OfficeProcess(settings.getOfficeHome(), settings.getUnoUrl(), settings.getRunAsArgs(), settings.getTemplateProfileDir(), settings.getWorkDir(), settings
 				.getProcessManager());
 		connection = new OfficeConnection(settings.getUnoUrl());
 	}
-
+	
 	public OfficeConnection getConnection() {
 		return connection;
 	}
-
+	
 	public void startAndWait() throws OfficeException {
 		Future<?> future = executor.submit(new Runnable() {
+			
 			public void run() {
 				doStartProcessAndConnect();
 			}
 		});
 		try {
 			future.get();
-		} catch (Exception exception) {
+		}
+		catch (Exception exception) {
 			throw new OfficeException("failed to start and connect", exception);
 		}
 	}
-
+	
 	public void stopAndWait() throws OfficeException {
 		Future<?> future = executor.submit(new Runnable() {
+			
 			public void run() {
 				doStopProcess();
 			}
 		});
 		try {
 			future.get();
-		} catch (Exception exception) {
+		}
+		catch (Exception exception) {
 			throw new OfficeException("failed to start and connect", exception);
 		}
 	}
-
+	
 	public void restartAndWait() {
 		Future<?> future = executor.submit(new Runnable() {
+			
 			public void run() {
 				doStopProcess();
 				doStartProcessAndConnect();
@@ -81,96 +87,109 @@
 		});
 		try {
 			future.get();
-		} catch (Exception exception) {
+		}
+		catch (Exception exception) {
 			throw new OfficeException("failed to restart", exception);
 		}
 	}
-
+	
 	public void restartDueToTaskTimeout() {
 		executor.execute(new Runnable() {
+			
 			public void run() {
 				doTerminateProcess();
 				// will cause unexpected disconnection and subsequent restart
 			}
 		});
 	}
-
+	
 	public void restartDueToLostConnection() {
 		executor.execute(new Runnable() {
+			
 			public void run() {
 				try {
 					doEnsureProcessExited();
 					doStartProcessAndConnect();
-				} catch (OfficeException officeException) {
+				}
+				catch (OfficeException officeException) {
 					if (DefaultOfficeManagerConfiguration.DEBUG) logger.log(Level.SEVERE, "could not restart process", officeException);
 				}
 			}
 		});
 	}
-
+	
 	private void doStartProcessAndConnect() throws OfficeException {
 		try {
 			process.start();
 			new Retryable() {
+				
 				protected void attempt() throws TemporaryException, Exception {
 					try {
 						connection.connect();
-					} catch (ConnectException connectException) {
+					}
+					catch (ConnectException connectException) {
 						Integer exitCode = process.getExitCode();
 						if (exitCode == null) {
 							// process is running; retry later
 							throw new TemporaryException(connectException);
-						} else if (exitCode.equals(EXIT_CODE_NEW_INSTALLATION)) {
+						}
+						else if (exitCode.equals(EXIT_CODE_NEW_INSTALLATION)) {
 							// restart and retry later
 							// see http://code.google.com/p/jodconverter/issues/detail?id=84
 							if (DefaultOfficeManagerConfiguration.DEBUG) logger.log(Level.WARNING, "office process died with exit code 81; restarting it");
 							process.start(true);
 							throw new TemporaryException(connectException);
-						} else {
+						}
+						else {
 							throw new OfficeException("office process died with exit code " + exitCode);
 						}
 					}
 				}
 			}.execute(settings.getRetryInterval(), settings.getRetryTimeout());
-		} catch (Exception exception) {
+		}
+		catch (Exception exception) {
 			throw new OfficeException("could not establish connection", exception);
 		}
 	}
-
+	
 	private void doStopProcess() {
 		try {
 			XDesktop desktop = OfficeUtils.cast(XDesktop.class, connection.getService(OfficeUtils.SERVICE_DESKTOP));
 			desktop.terminate();
-		} catch (DisposedException disposedException) {
+		}
+		catch (DisposedException disposedException) {
 			// expected
-		} catch (Exception exception) {
+		}
+		catch (Exception exception) {
 			// in case we can't get hold of the desktop
 			doTerminateProcess();
 		}
 		doEnsureProcessExited();
 	}
-
+	
 	private void doEnsureProcessExited() throws OfficeException {
 		try {
 			int exitCode = process.getExitCode(settings.getRetryInterval(), settings.getRetryTimeout());
 			if (DefaultOfficeManagerConfiguration.DEBUG) logger.info("process exited with code " + exitCode);
-		} catch (RetryTimeoutException retryTimeoutException) {
+		}
+		catch (RetryTimeoutException retryTimeoutException) {
 			doTerminateProcess();
 		}
 		process.deleteProfileDir();
 	}
-
+	
 	private void doTerminateProcess() throws OfficeException {
 		try {
 			int exitCode = process.forciblyTerminate(settings.getRetryInterval(), settings.getRetryTimeout());
 			if (DefaultOfficeManagerConfiguration.DEBUG) logger.info("process forcibly terminated with code " + exitCode);
-		} catch (Exception exception) {
+		}
+		catch (Exception exception) {
 			throw new OfficeException("could not terminate process", exception);
 		}
 	}
-
+	
 	boolean isConnected() {
 		return connection.isConnected();
 	}
-
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/PooledOfficeManagerSettings.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/PooledOfficeManagerSettings.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/PooledOfficeManagerSettings.java	(revision 2406)
@@ -13,31 +13,33 @@
 package org.artofsolving.jodconverter.office;
 
 class PooledOfficeManagerSettings extends ManagedOfficeProcessSettings {
-
-    public static final long DEFAULT_TASK_EXECUTION_TIMEOUT = 120000L;
-    public static final int DEFAULT_MAX_TASKS_PER_PROCESS = 200;
-
-    private long taskExecutionTimeout = DEFAULT_TASK_EXECUTION_TIMEOUT;
-    private int maxTasksPerProcess = DEFAULT_MAX_TASKS_PER_PROCESS;
-
-    public PooledOfficeManagerSettings(UnoUrl unoUrl) {
-        super(unoUrl);
-    }
-
-    public long getTaskExecutionTimeout() {
-        return taskExecutionTimeout;
-    }
-
-    public void setTaskExecutionTimeout(long taskExecutionTimeout) {
-        this.taskExecutionTimeout = taskExecutionTimeout;
-    }
-
-    public int getMaxTasksPerProcess() {
-        return maxTasksPerProcess;
-    }
-
-    public void setMaxTasksPerProcess(int maxTasksPerProcess) {
-        this.maxTasksPerProcess = maxTasksPerProcess;
-    }
-
+	
+	public static final long DEFAULT_TASK_EXECUTION_TIMEOUT = 120000L;
+	
+	public static final int DEFAULT_MAX_TASKS_PER_PROCESS = 200;
+	
+	private long taskExecutionTimeout = DEFAULT_TASK_EXECUTION_TIMEOUT;
+	
+	private int maxTasksPerProcess = DEFAULT_MAX_TASKS_PER_PROCESS;
+	
+	public PooledOfficeManagerSettings(UnoUrl unoUrl) {
+		super(unoUrl);
+	}
+	
+	public long getTaskExecutionTimeout() {
+		return taskExecutionTimeout;
+	}
+	
+	public void setTaskExecutionTimeout(long taskExecutionTimeout) {
+		this.taskExecutionTimeout = taskExecutionTimeout;
+	}
+	
+	public int getMaxTasksPerProcess() {
+		return maxTasksPerProcess;
+	}
+	
+	public void setMaxTasksPerProcess(int maxTasksPerProcess) {
+		this.maxTasksPerProcess = maxTasksPerProcess;
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeException.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeException.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeException.java	(revision 2406)
@@ -13,14 +13,14 @@
 package org.artofsolving.jodconverter.office;
 
 public class OfficeException extends RuntimeException {
-
-    private static final long serialVersionUID = 1L;
-
-    public OfficeException(String message) {
-        super(message);
-    }
-
-    public OfficeException(String message, Throwable cause) {
+	
+	private static final long serialVersionUID = 1L;
+	
+	public OfficeException(String message) {
+		super(message);
+	}
+	
+	public OfficeException(String message, Throwable cause) {
 		super(message, cause);
 	}
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeConnection.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeConnection.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeConnection.java	(revision 2406)
@@ -32,86 +32,92 @@
 import com.sun.star.uno.XComponentContext;
 
 class OfficeConnection implements OfficeContext {
-
-    private static AtomicInteger bridgeIndex = new AtomicInteger();
-
-    private final UnoUrl unoUrl;
-
-    private XComponent bridgeComponent;
-    private XMultiComponentFactory serviceManager;
-    private XComponentContext componentContext;
-
-    private final List<OfficeConnectionEventListener> connectionEventListeners = new ArrayList<OfficeConnectionEventListener>();
-
-    private volatile boolean connected = false;
-
-    private XEventListener bridgeListener = new XEventListener() {
-        public void disposing(EventObject event) {
-            if (connected) {
-                connected = false;
-                if (DefaultOfficeManagerConfiguration.DEBUG) logger.info(String.format("disconnected: '%s'", unoUrl));
-                OfficeConnectionEvent connectionEvent = new OfficeConnectionEvent(OfficeConnection.this);
-                for (OfficeConnectionEventListener listener : connectionEventListeners) {
-                    listener.disconnected(connectionEvent);
-                }
-            }
-            // else we tried to connect to a server that doesn't speak URP
-        }
-    };
-
-    private final Logger logger = Logger.getLogger(getClass().getName());
-
-    public OfficeConnection(UnoUrl unoUrl) {
-        this.unoUrl = unoUrl;
-    }
-
-    public void addConnectionEventListener(OfficeConnectionEventListener connectionEventListener) {
-        connectionEventListeners.add(connectionEventListener);
-    }
-
-    public void connect() throws ConnectException {
-        logger.fine(String.format("connecting with connectString '%s'", unoUrl));
-        try {
-            XComponentContext localContext = Bootstrap.createInitialComponentContext(null);
-            XMultiComponentFactory localServiceManager = localContext.getServiceManager();
-            XConnector connector = OfficeUtils.cast(XConnector.class, localServiceManager.createInstanceWithContext("com.sun.star.connection.Connector", localContext));
-            XConnection connection = connector.connect(unoUrl.getConnectString());
-            XBridgeFactory bridgeFactory = OfficeUtils.cast(XBridgeFactory.class, localServiceManager.createInstanceWithContext("com.sun.star.bridge.BridgeFactory", localContext));
-            String bridgeName = "jodconverter_" + bridgeIndex.getAndIncrement();
-            XBridge bridge = bridgeFactory.createBridge(bridgeName, "urp", connection, null);
-            bridgeComponent = OfficeUtils.cast(XComponent.class, bridge);
-            bridgeComponent.addEventListener(bridgeListener);
-            serviceManager = OfficeUtils.cast(XMultiComponentFactory.class, bridge.getInstance("StarOffice.ServiceManager"));
-            XPropertySet properties = OfficeUtils.cast(XPropertySet.class, serviceManager);
-            componentContext = OfficeUtils.cast(XComponentContext.class, properties.getPropertyValue("DefaultContext"));
-            connected = true;
-            if (DefaultOfficeManagerConfiguration.DEBUG) logger.info(String.format("connected: '%s'", unoUrl));
-            OfficeConnectionEvent connectionEvent = new OfficeConnectionEvent(this);
-            for (OfficeConnectionEventListener listener : connectionEventListeners) {
-                listener.connected(connectionEvent);
-            }
-        } catch (NoConnectException connectException) {
-            throw new ConnectException(String.format("connection failed: '%s'; %s", unoUrl, connectException.getMessage()));
-        } catch (Exception exception) {
-            throw new OfficeException("connection failed: "+ unoUrl, exception);
-        }
-    }
-
-    public boolean isConnected() {
-        return connected;
-    }
-
-    public synchronized void disconnect() {
-        logger.fine(String.format("disconnecting: '%s'", unoUrl));
-        bridgeComponent.dispose();
-    }
-
-    public Object getService(String serviceName) {
-        try {
-            return serviceManager.createInstanceWithContext(serviceName, componentContext);
-        } catch (Exception exception) {
-            throw new OfficeException(String.format("failed to obtain service '%s'", serviceName), exception);
-        }
-    }
-
+	
+	private static AtomicInteger bridgeIndex = new AtomicInteger();
+	
+	private final UnoUrl unoUrl;
+	
+	private XComponent bridgeComponent;
+	
+	private XMultiComponentFactory serviceManager;
+	
+	private XComponentContext componentContext;
+	
+	private final List<OfficeConnectionEventListener> connectionEventListeners = new ArrayList<OfficeConnectionEventListener>();
+	
+	private volatile boolean connected = false;
+	
+	private XEventListener bridgeListener = new XEventListener() {
+		
+		public void disposing(EventObject event) {
+			if (connected) {
+				connected = false;
+				if (DefaultOfficeManagerConfiguration.DEBUG) logger.info(String.format("disconnected: '%s'", unoUrl));
+				OfficeConnectionEvent connectionEvent = new OfficeConnectionEvent(OfficeConnection.this);
+				for (OfficeConnectionEventListener listener : connectionEventListeners) {
+					listener.disconnected(connectionEvent);
+				}
+			}
+			// else we tried to connect to a server that doesn't speak URP
+		}
+	};
+	
+	private final Logger logger = Logger.getLogger(getClass().getName());
+	
+	public OfficeConnection(UnoUrl unoUrl) {
+		this.unoUrl = unoUrl;
+	}
+	
+	public void addConnectionEventListener(OfficeConnectionEventListener connectionEventListener) {
+		connectionEventListeners.add(connectionEventListener);
+	}
+	
+	public void connect() throws ConnectException {
+		logger.fine(String.format("connecting with connectString '%s'", unoUrl));
+		try {
+			XComponentContext localContext = Bootstrap.createInitialComponentContext(null);
+			XMultiComponentFactory localServiceManager = localContext.getServiceManager();
+			XConnector connector = OfficeUtils.cast(XConnector.class, localServiceManager.createInstanceWithContext("com.sun.star.connection.Connector", localContext));
+			XConnection connection = connector.connect(unoUrl.getConnectString());
+			XBridgeFactory bridgeFactory = OfficeUtils.cast(XBridgeFactory.class, localServiceManager.createInstanceWithContext("com.sun.star.bridge.BridgeFactory", localContext));
+			String bridgeName = "jodconverter_" + bridgeIndex.getAndIncrement();
+			XBridge bridge = bridgeFactory.createBridge(bridgeName, "urp", connection, null);
+			bridgeComponent = OfficeUtils.cast(XComponent.class, bridge);
+			bridgeComponent.addEventListener(bridgeListener);
+			serviceManager = OfficeUtils.cast(XMultiComponentFactory.class, bridge.getInstance("StarOffice.ServiceManager"));
+			XPropertySet properties = OfficeUtils.cast(XPropertySet.class, serviceManager);
+			componentContext = OfficeUtils.cast(XComponentContext.class, properties.getPropertyValue("DefaultContext"));
+			connected = true;
+			if (DefaultOfficeManagerConfiguration.DEBUG) logger.info(String.format("connected: '%s'", unoUrl));
+			OfficeConnectionEvent connectionEvent = new OfficeConnectionEvent(this);
+			for (OfficeConnectionEventListener listener : connectionEventListeners) {
+				listener.connected(connectionEvent);
+			}
+		}
+		catch (NoConnectException connectException) {
+			throw new ConnectException(String.format("connection failed: '%s'; %s", unoUrl, connectException.getMessage()));
+		}
+		catch (Exception exception) {
+			throw new OfficeException("connection failed: " + unoUrl, exception);
+		}
+	}
+	
+	public boolean isConnected() {
+		return connected;
+	}
+	
+	public synchronized void disconnect() {
+		logger.fine(String.format("disconnecting: '%s'", unoUrl));
+		bridgeComponent.dispose();
+	}
+	
+	public Object getService(String serviceName) {
+		try {
+			return serviceManager.createInstanceWithContext(serviceName, componentContext);
+		}
+		catch (Exception exception) {
+			throw new OfficeException(String.format("failed to obtain service '%s'", serviceName), exception);
+		}
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeUtils.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeUtils.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeUtils.java	(revision 2406)
@@ -21,100 +21,100 @@
 import com.sun.star.uno.UnoRuntime;
 
 public class OfficeUtils {
-
-    public static final String SERVICE_DESKTOP = "com.sun.star.frame.Desktop";
-
-    private OfficeUtils() {
-        throw new AssertionError("utility class must not be instantiated");
-    }
-
-    public static <T> T cast(Class<T> type, Object object) {
-        return (T) UnoRuntime.queryInterface(type, object);
-    }
-
-    public static PropertyValue property(String name, Object value) {
-        PropertyValue propertyValue = new PropertyValue();
-        propertyValue.Name = name;
-        propertyValue.Value = value;
-        return propertyValue;
-    }
-
-    @SuppressWarnings("unchecked")
-    public static PropertyValue[] toUnoProperties(Map<String,?> properties) {
-        PropertyValue[] propertyValues = new PropertyValue[properties.size()];
-        int i = 0;
-        for (Map.Entry<String,?> entry : properties.entrySet()) {
-            Object value = entry.getValue();
-            if (value instanceof Map) {
-                Map<String,Object> subProperties = (Map<String,Object>) value;
-                value = toUnoProperties(subProperties);
-            }
-            propertyValues[i++] = property((String) entry.getKey(), value);
-        }
-        return propertyValues;
-    }
-
-    public static String toUrl(File file) {
-        String path = file.toURI().getRawPath();
-        String url = path.startsWith("//") ? "file:" + path : "file://" + path;
-        return url.endsWith("/") ? url.substring(0, url.length() - 1) : url;
-    }
-
-    public static File getDefaultOfficeHome() {
-        if (System.getProperty("office.home") != null) {
-            return new File(System.getProperty("office.home"));
-        }
-        if (PlatformUtils.isWindows()) {
-            // %ProgramFiles(x86)% on 64-bit machines; %ProgramFiles% on 32-bit ones
-            String programFiles = System.getenv("ProgramFiles(x86)");
-            if (programFiles == null) {
-                programFiles = System.getenv("ProgramFiles");
-            }
-            return findOfficeHome(
-                programFiles + File.separator + "OpenOffice.org 3",
-                programFiles + File.separator + "OpenOffice 4",
-                programFiles + File.separator + "OpenOffice 5", // 
-                programFiles + File.separator + "OpenOffice",
-                programFiles + File.separator + "LibreOffice 3",
-                programFiles + File.separator + "LibreOffice 4",
-                programFiles + File.separator + "LibreOffice 5",
-                programFiles + File.separator + "LibreOffice"
-            );
-        } else if (PlatformUtils.isMac()) {
-            return findOfficeHome(
-                "/Applications/OpenOffice.org.app/Contents", // up to version 3
-                "/Applications/OpenOffice.app/Contents", // since version 4+
-                "/Applications/LibreOffice.app/Contents"
-            );
-        } else {
-            // Linux or other *nix variants
-            return findOfficeHome(
-                "/opt/openoffice.org3",
-                "/opt/openoffice.org3",
-                "/opt/libreoffice",
-                "/usr/lib/openoffice",
-                "/usr/lib/libreoffice"
-            );
-        }
-    }
-
-    private static File findOfficeHome(String... knownPaths) {
-    	//System.out.println("FIND OFFICE IN "+Arrays.toString(knownPaths));
-        for (String path : knownPaths) {
-            File home = new File(path);
-            if (getOfficeExecutable(home).isFile()) {
-                return home;
-            }
-        }
-        return null;
-    }
-
-    public static File getOfficeExecutable(File officeHome) {
-        if (PlatformUtils.isMac()) {
-            return new File(officeHome, "MacOS/soffice.bin");
-        } else {
-            return new File(officeHome, "program/soffice.bin");
-        }
-    }
-
+	
+	public static final String SERVICE_DESKTOP = "com.sun.star.frame.Desktop";
+	
+	private OfficeUtils() {
+		throw new AssertionError("utility class must not be instantiated");
+	}
+	
+	public static <T> T cast(Class<T> type, Object object) {
+		return (T) UnoRuntime.queryInterface(type, object);
+	}
+	
+	public static PropertyValue property(String name, Object value) {
+		PropertyValue propertyValue = new PropertyValue();
+		propertyValue.Name = name;
+		propertyValue.Value = value;
+		return propertyValue;
+	}
+	
+	@SuppressWarnings("unchecked")
+	public static PropertyValue[] toUnoProperties(Map<String, ?> properties) {
+		PropertyValue[] propertyValues = new PropertyValue[properties.size()];
+		int i = 0;
+		for (Map.Entry<String, ?> entry : properties.entrySet()) {
+			Object value = entry.getValue();
+			if (value instanceof Map) {
+				Map<String, Object> subProperties = (Map<String, Object>) value;
+				value = toUnoProperties(subProperties);
+			}
+			propertyValues[i++] = property((String) entry.getKey(), value);
+		}
+		return propertyValues;
+	}
+	
+	public static String toUrl(File file) {
+		String path = file.toURI().getRawPath();
+		String url = path.startsWith("//") ? "file:" + path : "file://" + path;
+		return url.endsWith("/") ? url.substring(0, url.length() - 1) : url;
+	}
+	
+	public static File getDefaultOfficeHome() {
+		if (System.getProperty("office.home") != null) {
+			return new File(System.getProperty("office.home"));
+		}
+		if (PlatformUtils.isWindows()) {
+			// %ProgramFiles(x86)% on 64-bit machines; %ProgramFiles% on 32-bit ones
+			String programFiles = System.getenv("ProgramFiles(x86)");
+			if (programFiles == null) {
+				programFiles = System.getenv("ProgramFiles");
+			}
+			return findOfficeHome(
+					programFiles + File.separator + "OpenOffice.org 3",
+					programFiles + File.separator + "OpenOffice 4",
+					programFiles + File.separator + "OpenOffice 5", //
+					programFiles + File.separator + "OpenOffice",
+					programFiles + File.separator + "LibreOffice 3",
+					programFiles + File.separator + "LibreOffice 4",
+					programFiles + File.separator + "LibreOffice 5",
+					programFiles + File.separator + "LibreOffice");
+		}
+		else if (PlatformUtils.isMac()) {
+			return findOfficeHome(
+					"/Applications/OpenOffice.org.app/Contents", // up to version 3
+					"/Applications/OpenOffice.app/Contents", // since version 4+
+					"/Applications/LibreOffice.app/Contents");
+		}
+		else {
+			// Linux or other *nix variants
+			return findOfficeHome(
+					"/opt/openoffice.org3",
+					"/opt/openoffice.org3",
+					"/opt/libreoffice",
+					"/usr/lib/openoffice",
+					"/usr/lib/libreoffice");
+		}
+	}
+	
+	private static File findOfficeHome(String... knownPaths) {
+		// System.out.println("FIND OFFICE IN "+Arrays.toString(knownPaths));
+		for (String path : knownPaths) {
+			File home = new File(path);
+			if (getOfficeExecutable(home).isFile()) {
+				return home;
+			}
+		}
+		return null;
+	}
+	
+	public static File getOfficeExecutable(File officeHome) {
+		if (PlatformUtils.isMac()) {
+			return new File(officeHome, "MacOS/soffice.bin");
+		}
+		else {
+			return new File(officeHome, "program/soffice.bin");
+		}
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionEvent.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionEvent.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionEvent.java	(revision 2406)
@@ -15,11 +15,11 @@
 import java.util.EventObject;
 
 class OfficeConnectionEvent extends EventObject {
-
-    private static final long serialVersionUID = 2060652797570876077L;
-
-    public OfficeConnectionEvent(OfficeConnection source) {
-        super(source);
-    }
-
+	
+	private static final long serialVersionUID = 2060652797570876077L;
+	
+	public OfficeConnectionEvent(OfficeConnection source) {
+		super(source);
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeTask.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeTask.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeTask.java	(revision 2406)
@@ -13,7 +13,7 @@
 package org.artofsolving.jodconverter.office;
 
 public interface OfficeTask {
-
-    void execute(OfficeContext context) throws OfficeException;
-
+	
+	void execute(OfficeContext context) throws OfficeException;
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ProcessPoolOfficeManager.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ProcessPoolOfficeManager.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ProcessPoolOfficeManager.java	(revision 2406)
@@ -21,90 +21,95 @@
 import org.artofsolving.jodconverter.process.ProcessManager;
 
 class ProcessPoolOfficeManager implements OfficeManager {
-
-    private final BlockingQueue<PooledOfficeManager> pool;
-    private final PooledOfficeManager[] pooledManagers;
-    private final long taskQueueTimeout;
-
-    private volatile boolean running = false;
-
-    private final Logger logger = Logger.getLogger(ProcessPoolOfficeManager.class.getName());
-
-    public ProcessPoolOfficeManager(File officeHome, UnoUrl[] unoUrls, String[] runAsArgs, File templateProfileDir, File workDir,
-            long retryTimeout, long taskQueueTimeout, long taskExecutionTimeout, int maxTasksPerProcess,
-            ProcessManager processManager) {
+	
+	private final BlockingQueue<PooledOfficeManager> pool;
+	
+	private final PooledOfficeManager[] pooledManagers;
+	
+	private final long taskQueueTimeout;
+	
+	private volatile boolean running = false;
+	
+	private final Logger logger = Logger.getLogger(ProcessPoolOfficeManager.class.getName());
+	
+	public ProcessPoolOfficeManager(File officeHome, UnoUrl[] unoUrls, String[] runAsArgs, File templateProfileDir, File workDir,
+			long retryTimeout, long taskQueueTimeout, long taskExecutionTimeout, int maxTasksPerProcess,
+			ProcessManager processManager) {
 		this.taskQueueTimeout = taskQueueTimeout;
-        pool = new ArrayBlockingQueue<PooledOfficeManager>(unoUrls.length);
-        pooledManagers = new PooledOfficeManager[unoUrls.length];
-        for (int i = 0; i < unoUrls.length; i++) {
-            PooledOfficeManagerSettings settings = new PooledOfficeManagerSettings(unoUrls[i]);
-            settings.setRunAsArgs(runAsArgs);
-            settings.setTemplateProfileDir(templateProfileDir);
-            settings.setWorkDir(workDir);
-            settings.setOfficeHome(officeHome);
-            settings.setRetryTimeout(retryTimeout);
-            settings.setTaskExecutionTimeout(taskExecutionTimeout);
-            settings.setMaxTasksPerProcess(maxTasksPerProcess);
-            settings.setProcessManager(processManager);
-            pooledManagers[i] = new PooledOfficeManager(settings);
-        }
-        if (DefaultOfficeManagerConfiguration.DEBUG) logger.info("ProcessManager implementation is " + processManager.getClass().getSimpleName());
-    }
-
-    public synchronized void start() throws OfficeException {
-        for (int i = 0; i < pooledManagers.length; i++) {
-            pooledManagers[i].start();
-            releaseManager(pooledManagers[i]);
-        }
-        running = true;
-    }
-
-    public void execute(OfficeTask task) throws IllegalStateException, OfficeException {
-        if (!running) {
-            throw new IllegalStateException("this OfficeManager is currently stopped");
-        }
-        PooledOfficeManager manager = null;
-        try {
-            manager = acquireManager();
-            if (manager == null) {
-                throw new OfficeException("no office manager available");
-            }
-            manager.execute(task);
-        } finally {
-            if (manager != null) {
-                releaseManager(manager);
-            }
-        }
-    }
-
-    public synchronized void stop() throws OfficeException {
-        running = false;
-        if (DefaultOfficeManagerConfiguration.DEBUG) logger.info("stopping");
-        pool.clear();
-        for (int i = 0; i < pooledManagers.length; i++) {
-            pooledManagers[i].stop();
-        }
-        if (DefaultOfficeManagerConfiguration.DEBUG) logger.info("stopped");
-    }
-
-    private PooledOfficeManager acquireManager() {
-        try {
-            return pool.poll(taskQueueTimeout, TimeUnit.MILLISECONDS);
-        } catch (InterruptedException interruptedException) {
-            throw new OfficeException("interrupted", interruptedException);
-        }
-    }
-
-    private void releaseManager(PooledOfficeManager manager) {
-        try {
-            pool.put(manager);
-        } catch (InterruptedException interruptedException) {
-            throw new OfficeException("interrupted", interruptedException);
-        }
-    }
-
+		pool = new ArrayBlockingQueue<PooledOfficeManager>(unoUrls.length);
+		pooledManagers = new PooledOfficeManager[unoUrls.length];
+		for (int i = 0; i < unoUrls.length; i++) {
+			PooledOfficeManagerSettings settings = new PooledOfficeManagerSettings(unoUrls[i]);
+			settings.setRunAsArgs(runAsArgs);
+			settings.setTemplateProfileDir(templateProfileDir);
+			settings.setWorkDir(workDir);
+			settings.setOfficeHome(officeHome);
+			settings.setRetryTimeout(retryTimeout);
+			settings.setTaskExecutionTimeout(taskExecutionTimeout);
+			settings.setMaxTasksPerProcess(maxTasksPerProcess);
+			settings.setProcessManager(processManager);
+			pooledManagers[i] = new PooledOfficeManager(settings);
+		}
+		if (DefaultOfficeManagerConfiguration.DEBUG) logger.info("ProcessManager implementation is " + processManager.getClass().getSimpleName());
+	}
+	
+	public synchronized void start() throws OfficeException {
+		for (int i = 0; i < pooledManagers.length; i++) {
+			pooledManagers[i].start();
+			releaseManager(pooledManagers[i]);
+		}
+		running = true;
+	}
+	
+	public void execute(OfficeTask task) throws IllegalStateException, OfficeException {
+		if (!running) {
+			throw new IllegalStateException("this OfficeManager is currently stopped");
+		}
+		PooledOfficeManager manager = null;
+		try {
+			manager = acquireManager();
+			if (manager == null) {
+				throw new OfficeException("no office manager available");
+			}
+			manager.execute(task);
+		}
+		finally {
+			if (manager != null) {
+				releaseManager(manager);
+			}
+		}
+	}
+	
+	public synchronized void stop() throws OfficeException {
+		running = false;
+		if (DefaultOfficeManagerConfiguration.DEBUG) logger.info("stopping");
+		pool.clear();
+		for (int i = 0; i < pooledManagers.length; i++) {
+			pooledManagers[i].stop();
+		}
+		if (DefaultOfficeManagerConfiguration.DEBUG) logger.info("stopped");
+	}
+	
+	private PooledOfficeManager acquireManager() {
+		try {
+			return pool.poll(taskQueueTimeout, TimeUnit.MILLISECONDS);
+		}
+		catch (InterruptedException interruptedException) {
+			throw new OfficeException("interrupted", interruptedException);
+		}
+	}
+	
+	private void releaseManager(PooledOfficeManager manager) {
+		try {
+			pool.put(manager);
+		}
+		catch (InterruptedException interruptedException) {
+			throw new OfficeException("interrupted", interruptedException);
+		}
+	}
+	
 	public boolean isRunning() {
 		return running;
 	}
-
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ExternalOfficeManagerConfiguration.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ExternalOfficeManagerConfiguration.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ExternalOfficeManagerConfiguration.java	(revision 2406)
@@ -13,35 +13,38 @@
 package org.artofsolving.jodconverter.office;
 
 public class ExternalOfficeManagerConfiguration {
-
-    private OfficeConnectionProtocol connectionProtocol = OfficeConnectionProtocol.SOCKET;
-    private int portNumber = 2002;
-    private String pipeName = "office";
-    private boolean connectOnStart = true;
-
-    public ExternalOfficeManagerConfiguration setConnectionProtocol(OfficeConnectionProtocol connectionProtocol) {
-        this.connectionProtocol = connectionProtocol;
-        return this;
-    }
-
-    public ExternalOfficeManagerConfiguration setPortNumber(int portNumber) {
-        this.portNumber = portNumber;
-        return this;
-    }
-
-    public ExternalOfficeManagerConfiguration setPipeName(String pipeName) {
-        this.pipeName = pipeName;
-        return this;
-    }
-
-    public ExternalOfficeManagerConfiguration setConnectOnStart(boolean connectOnStart) {
-        this.connectOnStart = connectOnStart;
-        return this;
-    }
-
-    public OfficeManager buildOfficeManager() {
-        UnoUrl unoUrl = connectionProtocol == OfficeConnectionProtocol.SOCKET ? UnoUrl.socket(portNumber) : UnoUrl.pipe(pipeName);
-        return new ExternalOfficeManager(unoUrl, connectOnStart);
-    }
-
+	
+	private OfficeConnectionProtocol connectionProtocol = OfficeConnectionProtocol.SOCKET;
+	
+	private int portNumber = 2002;
+	
+	private String pipeName = "office";
+	
+	private boolean connectOnStart = true;
+	
+	public ExternalOfficeManagerConfiguration setConnectionProtocol(OfficeConnectionProtocol connectionProtocol) {
+		this.connectionProtocol = connectionProtocol;
+		return this;
+	}
+	
+	public ExternalOfficeManagerConfiguration setPortNumber(int portNumber) {
+		this.portNumber = portNumber;
+		return this;
+	}
+	
+	public ExternalOfficeManagerConfiguration setPipeName(String pipeName) {
+		this.pipeName = pipeName;
+		return this;
+	}
+	
+	public ExternalOfficeManagerConfiguration setConnectOnStart(boolean connectOnStart) {
+		this.connectOnStart = connectOnStart;
+		return this;
+	}
+	
+	public OfficeManager buildOfficeManager() {
+		UnoUrl unoUrl = connectionProtocol == OfficeConnectionProtocol.SOCKET ? UnoUrl.socket(portNumber) : UnoUrl.pipe(pipeName);
+		return new ExternalOfficeManager(unoUrl, connectOnStart);
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/DefaultOfficeManagerConfiguration.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/DefaultOfficeManagerConfiguration.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/DefaultOfficeManagerConfiguration.java	(revision 2406)
@@ -21,203 +21,220 @@
 import org.artofsolving.jodconverter.util.PlatformUtils;
 
 public class DefaultOfficeManagerConfiguration {
-
-    public static final long DEFAULT_RETRY_TIMEOUT = 120000L;
-    public static boolean DEBUG = false;
-    private File officeHome = OfficeUtils.getDefaultOfficeHome();
-    private OfficeConnectionProtocol connectionProtocol = OfficeConnectionProtocol.SOCKET;
-    private int[] portNumbers = new int[] { 2002 };
-    private String[] pipeNames = new String[] { "office" };
-    private String[] runAsArgs = null;
-    private File templateProfileDir = null;
-    private File workDir = new File(System.getProperty("java.io.tmpdir"));
-    private long taskQueueTimeout = 30000L;  // 30 seconds
-    private long taskExecutionTimeout = 120000L;  // 2 minutes
-    private int maxTasksPerProcess = 200;
-    private long retryTimeout = DEFAULT_RETRY_TIMEOUT;
-
-    private ProcessManager processManager = null;  // lazily initialised
-
-    public DefaultOfficeManagerConfiguration setOfficeHome(String officeHome) throws NullPointerException, IllegalArgumentException {
-        checkArgumentNotNull("officeHome", officeHome);
-        return setOfficeHome(new File(officeHome));
-    }
-
-    public DefaultOfficeManagerConfiguration setOfficeHome(File officeHome) throws NullPointerException, IllegalArgumentException  {
-        checkArgumentNotNull("officeHome", officeHome);
-        checkArgument("officeHome", officeHome.isDirectory(), "must exist and be a directory");
-        this.officeHome = officeHome;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setConnectionProtocol(OfficeConnectionProtocol connectionProtocol) throws NullPointerException {
-        checkArgumentNotNull("connectionProtocol", connectionProtocol);
-        this.connectionProtocol = connectionProtocol;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setPortNumber(int portNumber) {
-        this.portNumbers = new int[] { portNumber };
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setPortNumbers(int... portNumbers) throws NullPointerException, IllegalArgumentException {
-        checkArgumentNotNull("portNumbers", portNumbers);
-        checkArgument("portNumbers", portNumbers.length > 0, "must not be empty");
-        this.portNumbers = portNumbers;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setPipeName(String pipeName) throws NullPointerException {
-        checkArgumentNotNull("pipeName", pipeName);
-        this.pipeNames = new String[] { pipeName };
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setPipeNames(String... pipeNames) throws NullPointerException, IllegalArgumentException {
-        checkArgumentNotNull("pipeNames", pipeNames);
-        checkArgument("pipeNames", pipeNames.length > 0, "must not be empty");
-        this.pipeNames = pipeNames;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setRunAsArgs(String... runAsArgs) {
+	
+	public static final long DEFAULT_RETRY_TIMEOUT = 120000L;
+	
+	public static boolean DEBUG = false;
+	
+	private File officeHome = OfficeUtils.getDefaultOfficeHome();
+	
+	private OfficeConnectionProtocol connectionProtocol = OfficeConnectionProtocol.SOCKET;
+	
+	private int[] portNumbers = new int[] { 2002 };
+	
+	private String[] pipeNames = new String[] { "office" };
+	
+	private String[] runAsArgs = null;
+	
+	private File templateProfileDir = null;
+	
+	private File workDir = new File(System.getProperty("java.io.tmpdir"));
+	
+	private long taskQueueTimeout = 30000L;  // 30 seconds
+	
+	private long taskExecutionTimeout = 120000L;  // 2 minutes
+	
+	private int maxTasksPerProcess = 200;
+	
+	private long retryTimeout = DEFAULT_RETRY_TIMEOUT;
+	
+	private ProcessManager processManager = null;  // lazily initialised
+	
+	public DefaultOfficeManagerConfiguration setOfficeHome(String officeHome) throws NullPointerException, IllegalArgumentException {
+		checkArgumentNotNull("officeHome", officeHome);
+		return setOfficeHome(new File(officeHome));
+	}
+	
+	public DefaultOfficeManagerConfiguration setOfficeHome(File officeHome) throws NullPointerException, IllegalArgumentException {
+		checkArgumentNotNull("officeHome", officeHome);
+		checkArgument("officeHome", officeHome.isDirectory(), "must exist and be a directory");
+		this.officeHome = officeHome;
+		return this;
+	}
+	
+	public DefaultOfficeManagerConfiguration setConnectionProtocol(OfficeConnectionProtocol connectionProtocol) throws NullPointerException {
+		checkArgumentNotNull("connectionProtocol", connectionProtocol);
+		this.connectionProtocol = connectionProtocol;
+		return this;
+	}
+	
+	public DefaultOfficeManagerConfiguration setPortNumber(int portNumber) {
+		this.portNumbers = new int[] { portNumber };
+		return this;
+	}
+	
+	public DefaultOfficeManagerConfiguration setPortNumbers(int... portNumbers) throws NullPointerException, IllegalArgumentException {
+		checkArgumentNotNull("portNumbers", portNumbers);
+		checkArgument("portNumbers", portNumbers.length > 0, "must not be empty");
+		this.portNumbers = portNumbers;
+		return this;
+	}
+	
+	public DefaultOfficeManagerConfiguration setPipeName(String pipeName) throws NullPointerException {
+		checkArgumentNotNull("pipeName", pipeName);
+		this.pipeNames = new String[] { pipeName };
+		return this;
+	}
+	
+	public DefaultOfficeManagerConfiguration setPipeNames(String... pipeNames) throws NullPointerException, IllegalArgumentException {
+		checkArgumentNotNull("pipeNames", pipeNames);
+		checkArgument("pipeNames", pipeNames.length > 0, "must not be empty");
+		this.pipeNames = pipeNames;
+		return this;
+	}
+	
+	public DefaultOfficeManagerConfiguration setRunAsArgs(String... runAsArgs) {
 		this.runAsArgs = runAsArgs;
 		return this;
 	}
-
-    public DefaultOfficeManagerConfiguration setTemplateProfileDir(File templateProfileDir) throws IllegalArgumentException {
-        if (templateProfileDir != null) {
-            checkArgument("templateProfileDir", templateProfileDir.isDirectory(), "must exist and be a directory");
-        }
-        this.templateProfileDir = templateProfileDir;
-        return this;
-    }
-
-    /**
-     * Sets the directory where temporary office profiles will be created.
-     * <p>
-     * Defaults to the system temporary directory as specified by the <code>java.io.tmpdir</code> system property.
-     * 
-     * @param workDir
-     * @return the DefaultOfficeManagerConfiguration
-     */
-    public DefaultOfficeManagerConfiguration setWorkDir(File workDir) {
-        checkArgumentNotNull("workDir", workDir);
-        this.workDir = workDir;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setTaskQueueTimeout(long taskQueueTimeout) {
-        this.taskQueueTimeout = taskQueueTimeout;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setTaskExecutionTimeout(long taskExecutionTimeout) {
-        this.taskExecutionTimeout = taskExecutionTimeout;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setMaxTasksPerProcess(int maxTasksPerProcess) {
-        this.maxTasksPerProcess = maxTasksPerProcess;
-        return this;
-    }
-
-    /**
-     * Provide a specific {@link ProcessManager} implementation
-     * <p>
-     * The default is to use {@link SigarProcessManager} if sigar.jar is
-     * available in the classpath, otherwise {@link LinuxProcessManager}
-     * on Linux and {@link PureJavaProcessManager} on other platforms.
-     * 
-     * @param processManager
-     * @return
-     * @throws NullPointerException
-     */
-    public DefaultOfficeManagerConfiguration setProcessManager(ProcessManager processManager) throws NullPointerException {
-        checkArgumentNotNull("processManager", processManager);
-        this.processManager = processManager;
-        return this;
-    }
-
-    /**
-     * Retry timeout set in milliseconds. Used for retrying office process calls.
-     * If not set, it defaults to 2 minutes
-     * 
-     * @param retryTimeout in milliseconds
-     * @return
-     */
-    public DefaultOfficeManagerConfiguration setRetryTimeout(long retryTimeout) {
-        this.retryTimeout = retryTimeout;
-        return this;
-    }
-
-    public OfficeManager buildOfficeManager() throws IllegalStateException {
-        if (officeHome == null) {
-            throw new IllegalStateException("officeHome not set and could not be auto-detected");
-        } else if (!officeHome.isDirectory()) {
-            throw new IllegalStateException("officeHome doesn't exist or is not a directory: " + officeHome);
-        } else if (!OfficeUtils.getOfficeExecutable(officeHome).isFile()) {
-            throw new IllegalStateException("invalid officeHome: it doesn't contain soffice.bin: " + officeHome);
-        }
-        if (templateProfileDir != null && !isValidProfileDir(templateProfileDir)) {
-            throw new IllegalStateException("templateProfileDir doesn't appear to contain a user profile: " + templateProfileDir);
-        }
-        if (!workDir.isDirectory()) {
-            throw new IllegalStateException("workDir doesn't exist or is not a directory: " + workDir);
-        }
-
-        if (processManager == null) {
-            processManager = findBestProcessManager();
-        }
-        
-        int numInstances = connectionProtocol == OfficeConnectionProtocol.PIPE ? pipeNames.length : portNumbers.length;
-        UnoUrl[] unoUrls = new UnoUrl[numInstances];
-        for (int i = 0; i < numInstances; i++) {
-            unoUrls[i] = (connectionProtocol == OfficeConnectionProtocol.PIPE) ? UnoUrl.pipe(pipeNames[i]) : UnoUrl.socket(portNumbers[i]);
-        }
-        return new ProcessPoolOfficeManager(officeHome, unoUrls, runAsArgs, templateProfileDir, workDir, retryTimeout, taskQueueTimeout, taskExecutionTimeout, maxTasksPerProcess, processManager);
-    }
-
-    private ProcessManager findBestProcessManager() {
-        if (isSigarAvailable()) {
-            return new SigarProcessManager();
-        } else if (PlatformUtils.isLinux()) {
-        	LinuxProcessManager processManager = new LinuxProcessManager();
-        	if (runAsArgs != null) {
-        		processManager.setRunAsArgs(runAsArgs);
-        	}
-        	return processManager;
-        } else {
-            // NOTE: UnixProcessManager can't be trusted to work on Solaris
-            // because of the 80-char limit on ps output there  
-            return new PureJavaProcessManager();
-        }
-    }
-
-    private boolean isSigarAvailable() {
-        try {
-            Class.forName("org.hyperic.sigar.Sigar", false, getClass().getClassLoader());
-            return true;
-        } catch (ClassNotFoundException classNotFoundException) {
-            return false;
-        }
-    }
-
-    private void checkArgumentNotNull(String argName, Object argValue) throws NullPointerException {
-        if (argValue == null) {
-            throw new NullPointerException(argName + " must not be null");
-        }
-    }
-
-    private void checkArgument(String argName, boolean condition, String message) throws IllegalArgumentException {
-        if (!condition) {
-            throw new IllegalArgumentException(argName + " " + message);
-        }
-    }
-
-    private boolean isValidProfileDir(File profileDir) {
-        return new File(profileDir, "user").isDirectory();
-    }
-
+	
+	public DefaultOfficeManagerConfiguration setTemplateProfileDir(File templateProfileDir) throws IllegalArgumentException {
+		if (templateProfileDir != null) {
+			checkArgument("templateProfileDir", templateProfileDir.isDirectory(), "must exist and be a directory");
+		}
+		this.templateProfileDir = templateProfileDir;
+		return this;
+	}
+	
+	/**
+	 * Sets the directory where temporary office profiles will be created.
+	 * <p>
+	 * Defaults to the system temporary directory as specified by the <code>java.io.tmpdir</code> system property.
+	 * 
+	 * @param workDir
+	 * @return the DefaultOfficeManagerConfiguration
+	 */
+	public DefaultOfficeManagerConfiguration setWorkDir(File workDir) {
+		checkArgumentNotNull("workDir", workDir);
+		this.workDir = workDir;
+		return this;
+	}
+	
+	public DefaultOfficeManagerConfiguration setTaskQueueTimeout(long taskQueueTimeout) {
+		this.taskQueueTimeout = taskQueueTimeout;
+		return this;
+	}
+	
+	public DefaultOfficeManagerConfiguration setTaskExecutionTimeout(long taskExecutionTimeout) {
+		this.taskExecutionTimeout = taskExecutionTimeout;
+		return this;
+	}
+	
+	public DefaultOfficeManagerConfiguration setMaxTasksPerProcess(int maxTasksPerProcess) {
+		this.maxTasksPerProcess = maxTasksPerProcess;
+		return this;
+	}
+	
+	/**
+	 * Provide a specific {@link ProcessManager} implementation
+	 * <p>
+	 * The default is to use {@link SigarProcessManager} if sigar.jar is
+	 * available in the classpath, otherwise {@link LinuxProcessManager}
+	 * on Linux and {@link PureJavaProcessManager} on other platforms.
+	 * 
+	 * @param processManager
+	 * @return
+	 * @throws NullPointerException
+	 */
+	public DefaultOfficeManagerConfiguration setProcessManager(ProcessManager processManager) throws NullPointerException {
+		checkArgumentNotNull("processManager", processManager);
+		this.processManager = processManager;
+		return this;
+	}
+	
+	/**
+	 * Retry timeout set in milliseconds. Used for retrying office process calls.
+	 * If not set, it defaults to 2 minutes
+	 * 
+	 * @param retryTimeout in milliseconds
+	 * @return
+	 */
+	public DefaultOfficeManagerConfiguration setRetryTimeout(long retryTimeout) {
+		this.retryTimeout = retryTimeout;
+		return this;
+	}
+	
+	public OfficeManager buildOfficeManager() throws IllegalStateException {
+		if (officeHome == null) {
+			throw new IllegalStateException("officeHome not set and could not be auto-detected");
+		}
+		else if (!officeHome.isDirectory()) {
+			throw new IllegalStateException("officeHome doesn't exist or is not a directory: " + officeHome);
+		}
+		else if (!OfficeUtils.getOfficeExecutable(officeHome).isFile()) {
+			throw new IllegalStateException("invalid officeHome: it doesn't contain soffice.bin: " + officeHome);
+		}
+		if (templateProfileDir != null && !isValidProfileDir(templateProfileDir)) {
+			throw new IllegalStateException("templateProfileDir doesn't appear to contain a user profile: " + templateProfileDir);
+		}
+		if (!workDir.isDirectory()) {
+			throw new IllegalStateException("workDir doesn't exist or is not a directory: " + workDir);
+		}
+		
+		if (processManager == null) {
+			processManager = findBestProcessManager();
+		}
+		
+		int numInstances = connectionProtocol == OfficeConnectionProtocol.PIPE ? pipeNames.length : portNumbers.length;
+		UnoUrl[] unoUrls = new UnoUrl[numInstances];
+		for (int i = 0; i < numInstances; i++) {
+			unoUrls[i] = (connectionProtocol == OfficeConnectionProtocol.PIPE) ? UnoUrl.pipe(pipeNames[i]) : UnoUrl.socket(portNumbers[i]);
+		}
+		return new ProcessPoolOfficeManager(officeHome, unoUrls, runAsArgs, templateProfileDir, workDir, retryTimeout, taskQueueTimeout, taskExecutionTimeout, maxTasksPerProcess, processManager);
+	}
+	
+	private ProcessManager findBestProcessManager() {
+		if (isSigarAvailable()) {
+			return new SigarProcessManager();
+		}
+		else if (PlatformUtils.isLinux()) {
+			LinuxProcessManager processManager = new LinuxProcessManager();
+			if (runAsArgs != null) {
+				processManager.setRunAsArgs(runAsArgs);
+			}
+			return processManager;
+		}
+		else {
+			// NOTE: UnixProcessManager can't be trusted to work on Solaris
+			// because of the 80-char limit on ps output there
+			return new PureJavaProcessManager();
+		}
+	}
+	
+	private boolean isSigarAvailable() {
+		try {
+			Class.forName("org.hyperic.sigar.Sigar", false, getClass().getClassLoader());
+			return true;
+		}
+		catch (ClassNotFoundException classNotFoundException) {
+			return false;
+		}
+	}
+	
+	private void checkArgumentNotNull(String argName, Object argValue) throws NullPointerException {
+		if (argValue == null) {
+			throw new NullPointerException(argName + " must not be null");
+		}
+	}
+	
+	private void checkArgument(String argName, boolean condition, String message) throws IllegalArgumentException {
+		if (!condition) {
+			throw new IllegalArgumentException(argName + " " + message);
+		}
+	}
+	
+	private boolean isValidProfileDir(File profileDir) {
+		return new File(profileDir, "user").isDirectory();
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionEventListener.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionEventListener.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionEventListener.java	(revision 2406)
@@ -15,9 +15,9 @@
 import java.util.EventListener;
 
 interface OfficeConnectionEventListener extends EventListener {
-
-    void connected(OfficeConnectionEvent event);
-
-    void disconnected(OfficeConnectionEvent event);
-
+	
+	void connected(OfficeConnectionEvent event);
+	
+	void disconnected(OfficeConnectionEvent event);
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/UnoUrl.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/UnoUrl.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/UnoUrl.java	(revision 2406)
@@ -19,6 +19,7 @@
  * Named pipes are marginally faster and do not take up a TCP port, but they
  * require native libraries, which means setting <em>java.library.path</em>
  * when starting Java. E.g. on Linux
+ * 
  * <pre>
  * java -Djava.library.path=/opt/openoffice.org/ure/lib ...
  * </pre>
@@ -27,36 +28,37 @@
  * in the OpenOffice.org Developer's Guide for more details.
  */
 class UnoUrl {
-
-    private final String acceptString;
-    private final String connectString;
-
-    private UnoUrl(String acceptString, String connectString) {
-        this.acceptString = acceptString;
-        this.connectString = connectString;
-    }
-
-    public static UnoUrl socket(int port) {
-        String socketString = "socket,host=127.0.0.1,port=" + port;
-        return new UnoUrl(socketString, socketString + ",tcpNoDelay=1");
-    }
-
-    public static UnoUrl pipe(String pipeName) {
-        String pipeString = "pipe,name=" + pipeName;
-        return new UnoUrl(pipeString, pipeString);
-    }
-
-    public String getAcceptString() {
-        return acceptString;
-    }
-
-    public String getConnectString() {
-        return connectString;
-    }
-
-    @Override
-    public String toString() {
-        return connectString;
-    }
-
+	
+	private final String acceptString;
+	
+	private final String connectString;
+	
+	private UnoUrl(String acceptString, String connectString) {
+		this.acceptString = acceptString;
+		this.connectString = connectString;
+	}
+	
+	public static UnoUrl socket(int port) {
+		String socketString = "socket,host=127.0.0.1,port=" + port;
+		return new UnoUrl(socketString, socketString + ",tcpNoDelay=1");
+	}
+	
+	public static UnoUrl pipe(String pipeName) {
+		String pipeString = "pipe,name=" + pipeName;
+		return new UnoUrl(pipeString, pipeString);
+	}
+	
+	public String getAcceptString() {
+		return acceptString;
+	}
+	
+	public String getConnectString() {
+		return connectString;
+	}
+	
+	@Override
+	public String toString() {
+		return connectString;
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeManager.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeManager.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeManager.java	(revision 2406)
@@ -19,12 +19,12 @@
  * {@link OfficeConnection}s.
  */
 public interface OfficeManager {
-
-    void execute(OfficeTask task) throws OfficeException;
-
-    void start() throws OfficeException;
-
-    void stop() throws OfficeException;
-
-    boolean isRunning();
+	
+	void execute(OfficeTask task) throws OfficeException;
+	
+	void start() throws OfficeException;
+	
+	void stop() throws OfficeException;
+	
+	boolean isRunning();
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ManagedOfficeProcessSettings.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ManagedOfficeProcessSettings.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ManagedOfficeProcessSettings.java	(revision 2406)
@@ -18,80 +18,87 @@
 import org.artofsolving.jodconverter.process.PureJavaProcessManager;
 
 class ManagedOfficeProcessSettings {
-
-    public static final long DEFAULT_RETRY_INTERVAL = 250L;
-
-    private final UnoUrl unoUrl;
-    private File officeHome = OfficeUtils.getDefaultOfficeHome();
-    private String[] runAsArgs;
-    private File templateProfileDir;
-    private File workDir = new File(System.getProperty("java.io.tmpdir"));
-    private ProcessManager processManager = new PureJavaProcessManager();
-    private long retryTimeout = DefaultOfficeManagerConfiguration.DEFAULT_RETRY_TIMEOUT;
-    private long retryInterval = DEFAULT_RETRY_INTERVAL;
-
-    public ManagedOfficeProcessSettings(UnoUrl unoUrl) {
-        this.unoUrl = unoUrl;
-    }
-
-    public UnoUrl getUnoUrl() {
-        return unoUrl;
-    }
-
-    public File getOfficeHome() {
-        return officeHome;
-    }
-
-    public void setOfficeHome(File officeHome) {
-        this.officeHome = officeHome;
-    }
-
-    public String[] getRunAsArgs() {
+	
+	public static final long DEFAULT_RETRY_INTERVAL = 250L;
+	
+	private final UnoUrl unoUrl;
+	
+	private File officeHome = OfficeUtils.getDefaultOfficeHome();
+	
+	private String[] runAsArgs;
+	
+	private File templateProfileDir;
+	
+	private File workDir = new File(System.getProperty("java.io.tmpdir"));
+	
+	private ProcessManager processManager = new PureJavaProcessManager();
+	
+	private long retryTimeout = DefaultOfficeManagerConfiguration.DEFAULT_RETRY_TIMEOUT;
+	
+	private long retryInterval = DEFAULT_RETRY_INTERVAL;
+	
+	public ManagedOfficeProcessSettings(UnoUrl unoUrl) {
+		this.unoUrl = unoUrl;
+	}
+	
+	public UnoUrl getUnoUrl() {
+		return unoUrl;
+	}
+	
+	public File getOfficeHome() {
+		return officeHome;
+	}
+	
+	public void setOfficeHome(File officeHome) {
+		this.officeHome = officeHome;
+	}
+	
+	public String[] getRunAsArgs() {
 		return runAsArgs;
 	}
-
-    public void setRunAsArgs(String[] runAsArgs) {
+	
+	public void setRunAsArgs(String[] runAsArgs) {
 		this.runAsArgs = runAsArgs;
 	}
-
-    public File getTemplateProfileDir() {
-        return templateProfileDir;
-    }
-
-    public void setTemplateProfileDir(File templateProfileDir) {
-        this.templateProfileDir = templateProfileDir;
-    }
-
-    public File getWorkDir() {
-        return workDir;
-    }
-
-    public void setWorkDir(File workDir) {
-        this.workDir = workDir;
-    }
-
-    public ProcessManager getProcessManager() {
-        return processManager;
-    }
-
-    public void setProcessManager(ProcessManager processManager) {
-        this.processManager = processManager;
-    }
-
-    public long getRetryTimeout() {
-        return retryTimeout;
-    }
-
-    public void setRetryTimeout(long retryTimeout) {
-        this.retryTimeout = retryTimeout;
-    }
-
-    public long getRetryInterval() {
-        return retryInterval;
-    }
-
-    public void setRetryInterval(long retryInterval) {
-        this.retryInterval = retryInterval;
-    }
-
+	
+	public File getTemplateProfileDir() {
+		return templateProfileDir;
+	}
+	
+	public void setTemplateProfileDir(File templateProfileDir) {
+		this.templateProfileDir = templateProfileDir;
+	}
+	
+	public File getWorkDir() {
+		return workDir;
+	}
+	
+	public void setWorkDir(File workDir) {
+		this.workDir = workDir;
+	}
+	
+	public ProcessManager getProcessManager() {
+		return processManager;
+	}
+	
+	public void setProcessManager(ProcessManager processManager) {
+		this.processManager = processManager;
+	}
+	
+	public long getRetryTimeout() {
+		return retryTimeout;
+	}
+	
+	public void setRetryTimeout(long retryTimeout) {
+		this.retryTimeout = retryTimeout;
+	}
+	
+	public long getRetryInterval() {
+		return retryInterval;
+	}
+	
+	public void setRetryInterval(long retryInterval) {
+		this.retryInterval = retryInterval;
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ExternalOfficeManager.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ExternalOfficeManager.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/ExternalOfficeManager.java	(revision 2406)
@@ -31,10 +31,11 @@
  * operations.
  */
 class ExternalOfficeManager implements OfficeManager {
-
+	
 	private final OfficeConnection connection;
+	
 	private final boolean connectOnStart;
-
+	
 	/**
 	 * @param unoUrl
 	 * @param connectOnStart
@@ -45,7 +46,7 @@
 		connection = new OfficeConnection(unoUrl);
 		this.connectOnStart = connectOnStart;
 	}
-
+	
 	public void start() throws OfficeException {
 		if (connectOnStart) {
 			synchronized (connection) {
@@ -53,7 +54,7 @@
 			}
 		}
 	}
-
+	
 	public void stop() {
 		synchronized (connection) {
 			if (connection.isConnected()) {
@@ -61,7 +62,7 @@
 			}
 		}
 	}
-
+	
 	public void execute(OfficeTask task) throws OfficeException {
 		synchronized (connection) {
 			if (!connection.isConnected()) {
@@ -70,17 +71,18 @@
 			task.execute(connection);
 		}
 	}
-
+	
 	private void connect() {
 		try {
 			connection.connect();
-		} catch (ConnectException connectException) {
+		}
+		catch (ConnectException connectException) {
 			throw new OfficeException("could not connect to external office process", connectException);
 		}
 	}
-
+	
 	public boolean isRunning() {
 		return connection.isConnected();
 	}
-
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/PooledOfficeManager.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/PooledOfficeManager.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/PooledOfficeManager.java	(revision 2406)
@@ -20,91 +20,103 @@
 import java.util.logging.Logger;
 
 class PooledOfficeManager implements OfficeManager {
-
-    private final PooledOfficeManagerSettings settings;
-    private final ManagedOfficeProcess managedOfficeProcess;
-    private final SuspendableThreadPoolExecutor taskExecutor;
-
-    private volatile boolean stopping = false;
-    private int taskCount;
-    private Future<?> currentTask;
-
-    private final Logger logger = Logger.getLogger(getClass().getName());
-
-    private OfficeConnectionEventListener connectionEventListener = new OfficeConnectionEventListener() {
-        public void connected(OfficeConnectionEvent event) {
-            taskCount = 0;
-            taskExecutor.setAvailable(true);
-        }
-        public void disconnected(OfficeConnectionEvent event) {
-            taskExecutor.setAvailable(false);
-            if (stopping) {
-                // expected
-                stopping = false;
-            } else {
-                if (DefaultOfficeManagerConfiguration.DEBUG) logger.warning("connection lost unexpectedly; attempting restart");
-                if (currentTask != null) {
-                    currentTask.cancel(true);
-                }
-                managedOfficeProcess.restartDueToLostConnection();
-            }
-        }
-    };
-
-    public PooledOfficeManager(UnoUrl unoUrl) {
-        this(new PooledOfficeManagerSettings(unoUrl));
-    }
-
-    public PooledOfficeManager(PooledOfficeManagerSettings settings) {
-        this.settings = settings;
-        managedOfficeProcess = new ManagedOfficeProcess(settings);
-        managedOfficeProcess.getConnection().addConnectionEventListener(connectionEventListener);
-        taskExecutor = new SuspendableThreadPoolExecutor(new NamedThreadFactory("OfficeTaskThread"));
-    }
-
-    public void execute(final OfficeTask task) throws OfficeException {
-        Future<?> futureTask = taskExecutor.submit(new Runnable() {
-            public void run() {
-                if (settings.getMaxTasksPerProcess() > 0 && ++taskCount == settings.getMaxTasksPerProcess() + 1) {
-                    if (DefaultOfficeManagerConfiguration.DEBUG) logger.info(String.format("reached limit of %d maxTasksPerProcess: restarting", settings.getMaxTasksPerProcess()));
-                    taskExecutor.setAvailable(false);
-                    stopping = true;
-                    managedOfficeProcess.restartAndWait();
-                    //FIXME taskCount will be 0 rather than 1 at this point
-                }
-                task.execute(managedOfficeProcess.getConnection());
-             }
-         });
-         currentTask = futureTask;
-         try {
-             futureTask.get(settings.getTaskExecutionTimeout(), TimeUnit.MILLISECONDS);
-         } catch (TimeoutException timeoutException) {
-             managedOfficeProcess.restartDueToTaskTimeout();
-             throw new OfficeException("task did not complete within timeout", timeoutException);
-         } catch (ExecutionException executionException) {
-             if (executionException.getCause() instanceof OfficeException) {
-                 throw (OfficeException) executionException.getCause();
-             } else {
-                 throw new OfficeException("task failed", executionException.getCause());
-             }
-         } catch (Exception exception) {
-             throw new OfficeException("task failed", exception);
-         }
-    }
-
-    public void start() throws OfficeException {
-        managedOfficeProcess.startAndWait();
-    }
-
-    public void stop() throws OfficeException {
-        taskExecutor.setAvailable(false);
-        stopping = true;
-        taskExecutor.shutdownNow();
-        managedOfficeProcess.stopAndWait();
-    }
-
+	
+	private final PooledOfficeManagerSettings settings;
+	
+	private final ManagedOfficeProcess managedOfficeProcess;
+	
+	private final SuspendableThreadPoolExecutor taskExecutor;
+	
+	private volatile boolean stopping = false;
+	
+	private int taskCount;
+	
+	private Future<?> currentTask;
+	
+	private final Logger logger = Logger.getLogger(getClass().getName());
+	
+	private OfficeConnectionEventListener connectionEventListener = new OfficeConnectionEventListener() {
+		
+		public void connected(OfficeConnectionEvent event) {
+			taskCount = 0;
+			taskExecutor.setAvailable(true);
+		}
+		
+		public void disconnected(OfficeConnectionEvent event) {
+			taskExecutor.setAvailable(false);
+			if (stopping) {
+				// expected
+				stopping = false;
+			}
+			else {
+				if (DefaultOfficeManagerConfiguration.DEBUG) logger.warning("connection lost unexpectedly; attempting restart");
+				if (currentTask != null) {
+					currentTask.cancel(true);
+				}
+				managedOfficeProcess.restartDueToLostConnection();
+			}
+		}
+	};
+	
+	public PooledOfficeManager(UnoUrl unoUrl) {
+		this(new PooledOfficeManagerSettings(unoUrl));
+	}
+	
+	public PooledOfficeManager(PooledOfficeManagerSettings settings) {
+		this.settings = settings;
+		managedOfficeProcess = new ManagedOfficeProcess(settings);
+		managedOfficeProcess.getConnection().addConnectionEventListener(connectionEventListener);
+		taskExecutor = new SuspendableThreadPoolExecutor(new NamedThreadFactory("OfficeTaskThread"));
+	}
+	
+	public void execute(final OfficeTask task) throws OfficeException {
+		Future<?> futureTask = taskExecutor.submit(new Runnable() {
+			
+			public void run() {
+				if (settings.getMaxTasksPerProcess() > 0 && ++taskCount == settings.getMaxTasksPerProcess() + 1) {
+					if (DefaultOfficeManagerConfiguration.DEBUG) logger.info(String.format("reached limit of %d maxTasksPerProcess: restarting", settings.getMaxTasksPerProcess()));
+					taskExecutor.setAvailable(false);
+					stopping = true;
+					managedOfficeProcess.restartAndWait();
+					// FIXME taskCount will be 0 rather than 1 at this point
+				}
+				task.execute(managedOfficeProcess.getConnection());
+			}
+		});
+		currentTask = futureTask;
+		try {
+			futureTask.get(settings.getTaskExecutionTimeout(), TimeUnit.MILLISECONDS);
+		}
+		catch (TimeoutException timeoutException) {
+			managedOfficeProcess.restartDueToTaskTimeout();
+			throw new OfficeException("task did not complete within timeout", timeoutException);
+		}
+		catch (ExecutionException executionException) {
+			if (executionException.getCause() instanceof OfficeException) {
+				throw (OfficeException) executionException.getCause();
+			}
+			else {
+				throw new OfficeException("task failed", executionException.getCause());
+			}
+		}
+		catch (Exception exception) {
+			throw new OfficeException("task failed", exception);
+		}
+	}
+	
+	public void start() throws OfficeException {
+		managedOfficeProcess.startAndWait();
+	}
+	
+	public void stop() throws OfficeException {
+		taskExecutor.setAvailable(false);
+		stopping = true;
+		taskExecutor.shutdownNow();
+		managedOfficeProcess.stopAndWait();
+	}
+	
 	public boolean isRunning() {
 		return managedOfficeProcess.isConnected();
 	}
-
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/Retryable.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/Retryable.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/Retryable.java	(revision 2406)
@@ -13,43 +13,46 @@
 package org.artofsolving.jodconverter.office;
 
 abstract class Retryable {
-
-    /**
-     * @throws TemporaryException for an error condition that can be temporary - i.e. retrying later could be successful
-     * @throws Exception for all other error conditions
-     */
-    protected abstract void attempt() throws TemporaryException, Exception;
-
-    public void execute(long interval, long timeout) throws RetryTimeoutException, Exception {
-        execute(0L, interval, timeout);
-    }
-
-    public void execute(long delay, long interval, long timeout) throws RetryTimeoutException, Exception {
-        long start = System.currentTimeMillis();
-        if (delay > 0L) {
-            sleep(delay);
-        }
-        while (true) {
-            try {
-                attempt();
-                return;
-            } catch (TemporaryException temporaryException) {
-                if (System.currentTimeMillis() - start < timeout) {
-                    sleep(interval);
-                    // continue
-                } else {
-                    throw new RetryTimeoutException(temporaryException.getCause());
-                }
-            }
-        }
-    }
-
-    private void sleep(long millis) {
-        try {
-            Thread.sleep(millis);
-        } catch (InterruptedException interruptedException) {
-            // continue
-        }
-    }
-
+	
+	/**
+	 * @throws TemporaryException for an error condition that can be temporary - i.e. retrying later could be successful
+	 * @throws Exception for all other error conditions
+	 */
+	protected abstract void attempt() throws TemporaryException, Exception;
+	
+	public void execute(long interval, long timeout) throws RetryTimeoutException, Exception {
+		execute(0L, interval, timeout);
+	}
+	
+	public void execute(long delay, long interval, long timeout) throws RetryTimeoutException, Exception {
+		long start = System.currentTimeMillis();
+		if (delay > 0L) {
+			sleep(delay);
+		}
+		while (true) {
+			try {
+				attempt();
+				return;
+			}
+			catch (TemporaryException temporaryException) {
+				if (System.currentTimeMillis() - start < timeout) {
+					sleep(interval);
+					// continue
+				}
+				else {
+					throw new RetryTimeoutException(temporaryException.getCause());
+				}
+			}
+		}
+	}
+	
+	private void sleep(long millis) {
+		try {
+			Thread.sleep(millis);
+		}
+		catch (InterruptedException interruptedException) {
+			// continue
+		}
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeProcess.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeProcess.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeProcess.java	(revision 2406)
@@ -28,182 +28,195 @@
 import org.artofsolving.jodconverter.util.PlatformUtils;
 
 class OfficeProcess {
-
-    private final File officeHome;
-    private final UnoUrl unoUrl;
-    private final String[] runAsArgs;
-    private final File templateProfileDir;
-    private final File instanceProfileDir;
-    private final ProcessManager processManager;
-
-    private Process process;
-    private long pid = PID_UNKNOWN;
-
-    private final Logger logger = Logger.getLogger(getClass().getName());
-
-    public OfficeProcess(File officeHome, UnoUrl unoUrl, String[] runAsArgs, File templateProfileDir, File workDir, ProcessManager processManager) {
-        this.officeHome = officeHome;
-        this.unoUrl = unoUrl;
-        this.runAsArgs = runAsArgs;
-        this.templateProfileDir = templateProfileDir;
-        this.instanceProfileDir = getInstanceProfileDir(workDir, unoUrl);
-        this.processManager = processManager;
-    }
-
-    public void start() throws IOException {
-        start(false);
-    }
-
-    public void start(boolean restart) throws IOException {
-        ProcessQuery processQuery = new ProcessQuery("soffice.bin", unoUrl.getAcceptString());
-        long existingPid = processManager.findPid(processQuery);
-    	if (!(existingPid == PID_NOT_FOUND || existingPid == PID_UNKNOWN)) {
+	
+	private final File officeHome;
+	
+	private final UnoUrl unoUrl;
+	
+	private final String[] runAsArgs;
+	
+	private final File templateProfileDir;
+	
+	private final File instanceProfileDir;
+	
+	private final ProcessManager processManager;
+	
+	private Process process;
+	
+	private long pid = PID_UNKNOWN;
+	
+	private final Logger logger = Logger.getLogger(getClass().getName());
+	
+	public OfficeProcess(File officeHome, UnoUrl unoUrl, String[] runAsArgs, File templateProfileDir, File workDir, ProcessManager processManager) {
+		this.officeHome = officeHome;
+		this.unoUrl = unoUrl;
+		this.runAsArgs = runAsArgs;
+		this.templateProfileDir = templateProfileDir;
+		this.instanceProfileDir = getInstanceProfileDir(workDir, unoUrl);
+		this.processManager = processManager;
+	}
+	
+	public void start() throws IOException {
+		start(false);
+	}
+	
+	public void start(boolean restart) throws IOException {
+		ProcessQuery processQuery = new ProcessQuery("soffice.bin", unoUrl.getAcceptString());
+		long existingPid = processManager.findPid(processQuery);
+		if (!(existingPid == PID_NOT_FOUND || existingPid == PID_UNKNOWN)) {
 			throw new IllegalStateException(String.format("a process with acceptString '%s' is already running; pid %d",
-			        unoUrl.getAcceptString(), existingPid));
-        }
-    	if (!restart) {
-    	    prepareInstanceProfileDir();
-    	}
-        List<String> command = new ArrayList<String>();
-        File executable = OfficeUtils.getOfficeExecutable(officeHome);
-        if (runAsArgs != null) {
-        	command.addAll(Arrays.asList(runAsArgs));
-        }
-        command.add(executable.getAbsolutePath());
-        command.add("-accept=" + unoUrl.getAcceptString() + ";urp;");
-        command.add("-env:UserInstallation=" + OfficeUtils.toUrl(instanceProfileDir));
-        command.add("-headless");
-        command.add("-nocrashreport");
-        command.add("-nodefault");
-        command.add("-nofirststartwizard");
-        command.add("-nolockcheck");
-        command.add("-nologo");
-        command.add("-norestore");
-        ProcessBuilder processBuilder = new ProcessBuilder(command);
-        if (PlatformUtils.isWindows()) {
-            addBasisAndUrePaths(processBuilder);
-        }
-        if (DefaultOfficeManagerConfiguration.DEBUG) logger.info(String.format("starting process with acceptString '%s' and profileDir '%s'", unoUrl, instanceProfileDir));
-        process = processBuilder.start();
-        pid = processManager.findPid(processQuery);
-        if (pid == PID_NOT_FOUND) {
-            throw new IllegalStateException(String.format("process with acceptString '%s' started but its pid could not be found",
-                    unoUrl.getAcceptString()));
-        }
-        if (DefaultOfficeManagerConfiguration.DEBUG) logger.info("started process" + (pid != PID_UNKNOWN ? "; pid = " + pid : ""));
-    }
-
-    private File getInstanceProfileDir(File workDir, UnoUrl unoUrl) {
-        String dirName = ".jodconverter_" + unoUrl.getAcceptString().replace(',', '_').replace('=', '-');
-        return new File(workDir, dirName);
-    }
-
-    private void prepareInstanceProfileDir() throws OfficeException {
-        if (instanceProfileDir.exists()) {
-            if (DefaultOfficeManagerConfiguration.DEBUG) logger.warning(String.format("profile dir '%s' already exists; deleting", instanceProfileDir));
-            deleteProfileDir();
-        }
-        if (templateProfileDir != null) {
-            try {
-                FileUtils.copyDirectory(templateProfileDir, instanceProfileDir);
-            } catch (IOException ioException) {
-                throw new OfficeException("failed to create profileDir", ioException);
-            }
-        }
-    }
-
-    public void deleteProfileDir() {
-        if (instanceProfileDir != null) {
-            try {
-                FileUtils.deleteDirectory(instanceProfileDir);
-            } catch (IOException ioException) {
-                File oldProfileDir = new File(instanceProfileDir.getParentFile(), instanceProfileDir.getName() + ".old." + System.currentTimeMillis());
-                if (instanceProfileDir.renameTo(oldProfileDir)) {
-                    if (DefaultOfficeManagerConfiguration.DEBUG) logger.warning("could not delete profileDir: " + ioException.getMessage() + "; renamed it to " + oldProfileDir);
-                } else {
-                    if (DefaultOfficeManagerConfiguration.DEBUG) logger.severe("could not delete profileDir: " + ioException.getMessage());
-                }
-            }
-        }
-    }
-
-    private void addBasisAndUrePaths(ProcessBuilder processBuilder) throws IOException {
-        // see http://wiki.services.openoffice.org/wiki/ODF_Toolkit/Efforts/Three-Layer_OOo
-        File basisLink = new File(officeHome, "basis-link");
-        if (!basisLink.isFile()) {
-            logger.fine("no %OFFICE_HOME%/basis-link found; assuming it's OOo 2.x and we don't need to append URE and Basic paths");
-            return;
-        }
-        String basisLinkText = FileUtils.readFileToString(basisLink).trim();
-        File basisHome = new File(officeHome, basisLinkText);
-        File basisProgram = new File(basisHome, "program");
-        File ureLink = new File(basisHome, "ure-link");
-        String ureLinkText = FileUtils.readFileToString(ureLink).trim();
-        File ureHome = new File(basisHome, ureLinkText);
-        File ureBin = new File(ureHome, "bin");
-        Map<String,String> environment = processBuilder.environment();
-        // Windows environment variables are case insensitive but Java maps are not :-/
-        // so let's make sure we modify the existing key
-        String pathKey = "PATH";
-        for (String key : environment.keySet()) {
-            if ("PATH".equalsIgnoreCase(key)) {
-                pathKey = key;
-            }
-        }
-        String path = environment.get(pathKey) + ";" + ureBin.getAbsolutePath() + ";" + basisProgram.getAbsolutePath();
-        logger.fine(String.format("setting %s to \"%s\"", pathKey, path));
-        environment.put(pathKey, path);
-    }
-
-    public boolean isRunning() {
-        if (process == null) {
-            return false;
-        }
-        return getExitCode() == null;
-    }
-
-    private class ExitCodeRetryable extends Retryable {
-        
-        private int exitCode;
-        
-        protected void attempt() throws TemporaryException, Exception {
-            try {
-                exitCode = process.exitValue();
-            } catch (IllegalThreadStateException illegalThreadStateException) {
-                throw new TemporaryException(illegalThreadStateException);
-            }
-        }
-        
-        public int getExitCode() {
-            return exitCode;
-        }
-
-    }
-
-    public Integer getExitCode() {
-        try {
-            return process.exitValue();
-        } catch (IllegalThreadStateException exception) {
-            return null;
-        }
-    }
-
-    public int getExitCode(long retryInterval, long retryTimeout) throws RetryTimeoutException {
-        try {
-            ExitCodeRetryable retryable = new ExitCodeRetryable();
-            retryable.execute(retryInterval, retryTimeout);
-            return retryable.getExitCode();
-        } catch (RetryTimeoutException retryTimeoutException) {
-            throw retryTimeoutException;
-        } catch (Exception exception) {
-            throw new OfficeException("could not get process exit code", exception);
-        }
-    }
-
-    public int forciblyTerminate(long retryInterval, long retryTimeout) throws IOException, RetryTimeoutException {
-        if (DefaultOfficeManagerConfiguration.DEBUG) logger.info(String.format("trying to forcibly terminate process: '" + unoUrl + "'" + (pid != PID_UNKNOWN ? " (pid " + pid  + ")" : "")));
-        processManager.kill(process, pid);
-        return getExitCode(retryInterval, retryTimeout);
-    }
-
+					unoUrl.getAcceptString(), existingPid));
+		}
+		if (!restart) {
+			prepareInstanceProfileDir();
+		}
+		List<String> command = new ArrayList<String>();
+		File executable = OfficeUtils.getOfficeExecutable(officeHome);
+		if (runAsArgs != null) {
+			command.addAll(Arrays.asList(runAsArgs));
+		}
+		command.add(executable.getAbsolutePath());
+		command.add("-accept=" + unoUrl.getAcceptString() + ";urp;");
+		command.add("-env:UserInstallation=" + OfficeUtils.toUrl(instanceProfileDir));
+		command.add("-headless");
+		command.add("-nocrashreport");
+		command.add("-nodefault");
+		command.add("-nofirststartwizard");
+		command.add("-nolockcheck");
+		command.add("-nologo");
+		command.add("-norestore");
+		ProcessBuilder processBuilder = new ProcessBuilder(command);
+		if (PlatformUtils.isWindows()) {
+			addBasisAndUrePaths(processBuilder);
+		}
+		if (DefaultOfficeManagerConfiguration.DEBUG) logger.info(String.format("starting process with acceptString '%s' and profileDir '%s'", unoUrl, instanceProfileDir));
+		process = processBuilder.start();
+		pid = processManager.findPid(processQuery);
+		if (pid == PID_NOT_FOUND) {
+			throw new IllegalStateException(String.format("process with acceptString '%s' started but its pid could not be found",
+					unoUrl.getAcceptString()));
+		}
+		if (DefaultOfficeManagerConfiguration.DEBUG) logger.info("started process" + (pid != PID_UNKNOWN ? "; pid = " + pid : ""));
+	}
+	
+	private File getInstanceProfileDir(File workDir, UnoUrl unoUrl) {
+		String dirName = ".jodconverter_" + unoUrl.getAcceptString().replace(',', '_').replace('=', '-');
+		return new File(workDir, dirName);
+	}
+	
+	private void prepareInstanceProfileDir() throws OfficeException {
+		if (instanceProfileDir.exists()) {
+			if (DefaultOfficeManagerConfiguration.DEBUG) logger.warning(String.format("profile dir '%s' already exists; deleting", instanceProfileDir));
+			deleteProfileDir();
+		}
+		if (templateProfileDir != null) {
+			try {
+				FileUtils.copyDirectory(templateProfileDir, instanceProfileDir);
+			}
+			catch (IOException ioException) {
+				throw new OfficeException("failed to create profileDir", ioException);
+			}
+		}
+	}
+	
+	public void deleteProfileDir() {
+		if (instanceProfileDir != null) {
+			try {
+				FileUtils.deleteDirectory(instanceProfileDir);
+			}
+			catch (IOException ioException) {
+				File oldProfileDir = new File(instanceProfileDir.getParentFile(), instanceProfileDir.getName() + ".old." + System.currentTimeMillis());
+				if (instanceProfileDir.renameTo(oldProfileDir)) {
+					if (DefaultOfficeManagerConfiguration.DEBUG) logger.warning("could not delete profileDir: " + ioException.getMessage() + "; renamed it to " + oldProfileDir);
+				}
+				else {
+					if (DefaultOfficeManagerConfiguration.DEBUG) logger.severe("could not delete profileDir: " + ioException.getMessage());
+				}
+			}
+		}
+	}
+	
+	private void addBasisAndUrePaths(ProcessBuilder processBuilder) throws IOException {
+		// see http://wiki.services.openoffice.org/wiki/ODF_Toolkit/Efforts/Three-Layer_OOo
+		File basisLink = new File(officeHome, "basis-link");
+		if (!basisLink.isFile()) {
+			logger.fine("no %OFFICE_HOME%/basis-link found; assuming it's OOo 2.x and we don't need to append URE and Basic paths");
+			return;
+		}
+		String basisLinkText = FileUtils.readFileToString(basisLink).trim();
+		File basisHome = new File(officeHome, basisLinkText);
+		File basisProgram = new File(basisHome, "program");
+		File ureLink = new File(basisHome, "ure-link");
+		String ureLinkText = FileUtils.readFileToString(ureLink).trim();
+		File ureHome = new File(basisHome, ureLinkText);
+		File ureBin = new File(ureHome, "bin");
+		Map<String, String> environment = processBuilder.environment();
+		// Windows environment variables are case insensitive but Java maps are not :-/
+		// so let's make sure we modify the existing key
+		String pathKey = "PATH";
+		for (String key : environment.keySet()) {
+			if ("PATH".equalsIgnoreCase(key)) {
+				pathKey = key;
+			}
+		}
+		String path = environment.get(pathKey) + ";" + ureBin.getAbsolutePath() + ";" + basisProgram.getAbsolutePath();
+		logger.fine(String.format("setting %s to \"%s\"", pathKey, path));
+		environment.put(pathKey, path);
+	}
+	
+	public boolean isRunning() {
+		if (process == null) {
+			return false;
+		}
+		return getExitCode() == null;
+	}
+	
+	private class ExitCodeRetryable extends Retryable {
+		
+		private int exitCode;
+		
+		protected void attempt() throws TemporaryException, Exception {
+			try {
+				exitCode = process.exitValue();
+			}
+			catch (IllegalThreadStateException illegalThreadStateException) {
+				throw new TemporaryException(illegalThreadStateException);
+			}
+		}
+		
+		public int getExitCode() {
+			return exitCode;
+		}
+		
+	}
+	
+	public Integer getExitCode() {
+		try {
+			return process.exitValue();
+		}
+		catch (IllegalThreadStateException exception) {
+			return null;
+		}
+	}
+	
+	public int getExitCode(long retryInterval, long retryTimeout) throws RetryTimeoutException {
+		try {
+			ExitCodeRetryable retryable = new ExitCodeRetryable();
+			retryable.execute(retryInterval, retryTimeout);
+			return retryable.getExitCode();
+		}
+		catch (RetryTimeoutException retryTimeoutException) {
+			throw retryTimeoutException;
+		}
+		catch (Exception exception) {
+			throw new OfficeException("could not get process exit code", exception);
+		}
+	}
+	
+	public int forciblyTerminate(long retryInterval, long retryTimeout) throws IOException, RetryTimeoutException {
+		if (DefaultOfficeManagerConfiguration.DEBUG) logger.info(String.format("trying to forcibly terminate process: '" + unoUrl + "'" + (pid != PID_UNKNOWN ? " (pid " + pid + ")" : "")));
+		processManager.kill(process, pid);
+		return getExitCode(retryInterval, retryTimeout);
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/RetryTimeoutException.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/RetryTimeoutException.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/RetryTimeoutException.java	(revision 2406)
@@ -13,11 +13,11 @@
 package org.artofsolving.jodconverter.office;
 
 class RetryTimeoutException extends Exception {
-
-    private static final long serialVersionUID = -3704437769955257514L;
-
-    public RetryTimeoutException(Throwable cause) {
-        super(cause);
-    }
-
+	
+	private static final long serialVersionUID = -3704437769955257514L;
+	
+	public RetryTimeoutException(Throwable cause) {
+		super(cause);
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionProtocol.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionProtocol.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionProtocol.java	(revision 2406)
@@ -12,4 +12,6 @@
 //
 package org.artofsolving.jodconverter.office;
 
-public enum OfficeConnectionProtocol { PIPE, SOCKET }
\ No newline at end of file
+public enum OfficeConnectionProtocol {
+	PIPE, SOCKET
+}
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeContext.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeContext.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/OfficeContext.java	(revision 2406)
@@ -13,7 +13,7 @@
 package org.artofsolving.jodconverter.office;
 
 public interface OfficeContext {
-
-    Object getService(String serviceName);
-
+	
+	Object getService(String serviceName);
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/TemporaryException.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/TemporaryException.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/office/TemporaryException.java	(revision 2406)
@@ -14,14 +14,14 @@
 
 /**
  * Represents an error condition that can be temporary, i.e. that could go
- * away by simply retrying the same operation after an interval.  
+ * away by simply retrying the same operation after an interval.
  */
 class TemporaryException extends Exception {
-
-    private static final long serialVersionUID = 7237380113208327295L;
-
-    public TemporaryException(Throwable cause) {
-        super(cause);
-    }
-
+	
+	private static final long serialVersionUID = 7237380113208327295L;
+	
+	public TemporaryException(Throwable cause) {
+		super(cause);
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/AbstractConversionTask.java
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/AbstractConversionTask.java	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/java/org/artofsolving/jodconverter/AbstractConversionTask.java	(revision 2406)
@@ -34,92 +34,103 @@
 import com.sun.star.util.XCloseable;
 
 public abstract class AbstractConversionTask implements OfficeTask {
-
-    private final File inputFile;
-    private final File outputFile;
-
-    public AbstractConversionTask(File inputFile, File outputFile) {
-        this.inputFile = inputFile;
-        this.outputFile = outputFile;
-    }
-
-    protected abstract Map<String,?> getLoadProperties(File inputFile);
-
-    protected abstract Map<String,?> getStoreProperties(File outputFile, XComponent document);
-
-    public void execute(OfficeContext context) throws OfficeException {
-        XComponent document = null;
-        try {
-            document = loadDocument(context, inputFile);
-            modifyDocument(document);
-            storeDocument(document, outputFile);
-        } catch (OfficeException officeException) {
-            throw officeException;
-        } catch (Exception exception) {
-            throw new OfficeException("conversion failed", exception);
-        } finally {
-            if (document != null) {
-                XCloseable closeable = cast(XCloseable.class, document);
-                if (closeable != null) {
-                    try {
-                        closeable.close(true);
-                    } catch (CloseVetoException closeVetoException) {
-                        // whoever raised the veto should close the document
-                    }
-                } else {
-                    document.dispose();
-                }
-            }
-        }
-    }
-
-    private XComponent loadDocument(OfficeContext context, File inputFile) throws OfficeException {
-        if (!inputFile.exists()) {
-            throw new OfficeException("input document not found");
-        }
-        XComponentLoader loader = cast(XComponentLoader.class, context.getService(SERVICE_DESKTOP));
-        Map<String,?> loadProperties = getLoadProperties(inputFile);
-        XComponent document = null;
-        try {
-            document = loader.loadComponentFromURL(toUrl(inputFile), "_blank", 0, toUnoProperties(loadProperties));
-        } catch (IllegalArgumentException illegalArgumentException) {
-            throw new OfficeException("could not load document: " + inputFile.getName(), illegalArgumentException);
-        } catch (ErrorCodeIOException errorCodeIOException) {
-            throw new OfficeException("could not load document: "  + inputFile.getName() + "; errorCode: " + errorCodeIOException.ErrCode, errorCodeIOException);
-        } catch (IOException ioException) {
-            throw new OfficeException("could not load document: "  + inputFile.getName(), ioException);
-        }
-        if (document == null) {
-            throw new OfficeException("could not load document: "  + inputFile.getName());
-        }
-        return document;
-    }
-
-    /**
-     * Override to modify the document after it has been loaded and before it gets
-     * saved in the new format.
-     * <p>
-     * Does nothing by default.
-     * 
-     * @param document
-     * @throws OfficeException
-     */
-    protected void modifyDocument(XComponent document) throws OfficeException {
-    	// noop
-    }
-
-    private void storeDocument(XComponent document, File outputFile) throws OfficeException {
-        Map<String,?> storeProperties = getStoreProperties(outputFile, document);
-        if (storeProperties == null) {
-            throw new OfficeException("unsupported conversion");
-        }
-        try {
-            cast(XStorable.class, document).storeToURL(toUrl(outputFile), toUnoProperties(storeProperties));
-        } catch (ErrorCodeIOException errorCodeIOException) {
-            throw new OfficeException("could not store document: " + outputFile.getName() + "; errorCode: " + errorCodeIOException.ErrCode, errorCodeIOException);
-        } catch (IOException ioException) {
-            throw new OfficeException("could not store document: " + outputFile.getName(), ioException);
-        }
-    }
-
+	
+	private final File inputFile;
+	
+	private final File outputFile;
+	
+	public AbstractConversionTask(File inputFile, File outputFile) {
+		this.inputFile = inputFile;
+		this.outputFile = outputFile;
+	}
+	
+	protected abstract Map<String, ?> getLoadProperties(File inputFile);
+	
+	protected abstract Map<String, ?> getStoreProperties(File outputFile, XComponent document);
+	
+	public void execute(OfficeContext context) throws OfficeException {
+		XComponent document = null;
+		try {
+			document = loadDocument(context, inputFile);
+			modifyDocument(document);
+			storeDocument(document, outputFile);
+		}
+		catch (OfficeException officeException) {
+			throw officeException;
+		}
+		catch (Exception exception) {
+			throw new OfficeException("conversion failed", exception);
+		}
+		finally {
+			if (document != null) {
+				XCloseable closeable = cast(XCloseable.class, document);
+				if (closeable != null) {
+					try {
+						closeable.close(true);
+					}
+					catch (CloseVetoException closeVetoException) {
+						// whoever raised the veto should close the document
+					}
+				}
+				else {
+					document.dispose();
+				}
+			}
+		}
+	}
+	
+	private XComponent loadDocument(OfficeContext context, File inputFile) throws OfficeException {
+		if (!inputFile.exists()) {
+			throw new OfficeException("input document not found");
+		}
+		XComponentLoader loader = cast(XComponentLoader.class, context.getService(SERVICE_DESKTOP));
+		Map<String, ?> loadProperties = getLoadProperties(inputFile);
+		XComponent document = null;
+		try {
+			document = loader.loadComponentFromURL(toUrl(inputFile), "_blank", 0, toUnoProperties(loadProperties));
+		}
+		catch (IllegalArgumentException illegalArgumentException) {
+			throw new OfficeException("could not load document: " + inputFile.getName(), illegalArgumentException);
+		}
+		catch (ErrorCodeIOException errorCodeIOException) {
+			throw new OfficeException("could not load document: " + inputFile.getName() + "; errorCode: " + errorCodeIOException.ErrCode, errorCodeIOException);
+		}
+		catch (IOException ioException) {
+			throw new OfficeException("could not load document: " + inputFile.getName(), ioException);
+		}
+		if (document == null) {
+			throw new OfficeException("could not load document: " + inputFile.getName());
+		}
+		return document;
+	}
+	
+	/**
+	 * Override to modify the document after it has been loaded and before it gets
+	 * saved in the new format.
+	 * <p>
+	 * Does nothing by default.
+	 * 
+	 * @param document
+	 * @throws OfficeException
+	 */
+	protected void modifyDocument(XComponent document) throws OfficeException {
+		// noop
+	}
+	
+	private void storeDocument(XComponent document, File outputFile) throws OfficeException {
+		Map<String, ?> storeProperties = getStoreProperties(outputFile, document);
+		if (storeProperties == null) {
+			throw new OfficeException("unsupported conversion");
+		}
+		try {
+			cast(XStorable.class, document).storeToURL(toUrl(outputFile), toUnoProperties(storeProperties));
+		}
+		catch (ErrorCodeIOException errorCodeIOException) {
+			throw new OfficeException("could not store document: " + outputFile.getName() + "; errorCode: " + errorCodeIOException.ErrCode, errorCodeIOException);
+		}
+		catch (IOException ioException) {
+			throw new OfficeException("could not store document: " + outputFile.getName(), ioException);
+		}
+	}
+	
 }
Index: tmp/org.txm.jodconverter.core/src/main/assembly/dist.xml
===================================================================
--- tmp/org.txm.jodconverter.core/src/main/assembly/dist.xml	(revision 2405)
+++ tmp/org.txm.jodconverter.core/src/main/assembly/dist.xml	(revision 2406)
@@ -1,37 +1,37 @@
 <assembly>
-  <id>dist</id>
-  <formats>
-    <format>zip</format>
-  </formats>
-  <dependencySets>
-    <dependencySet>
-      <outputDirectory>lib</outputDirectory>
-      <excludes>
-        <exclude>org.hyperic:sigar</exclude>
-      </excludes>
-    </dependencySet>
-  </dependencySets>
-  <fileSets>
-    <fileSet>
-      <includes>
-        <include>LICENSE.txt</include>
-        <include>README.txt</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>target</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>${project.artifactId}-${project.version}-javadoc.jar</include>
-        <include>${project.artifactId}-${project.version}-sources.jar</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>src/main/resources</directory>
-      <outputDirectory>/conf</outputDirectory>
-      <includes>
-        <include>document-formats.js</include>
-      </includes>
-    </fileSet>
-  </fileSets>
+	<id>dist</id>
+	<formats>
+		<format>zip</format>
+	</formats>
+	<dependencySets>
+		<dependencySet>
+			<outputDirectory>lib</outputDirectory>
+			<excludes>
+				<exclude>org.hyperic:sigar</exclude>
+			</excludes>
+		</dependencySet>
+	</dependencySets>
+	<fileSets>
+		<fileSet>
+			<includes>
+				<include>LICENSE.txt</include>
+				<include>README.txt</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>target</directory>
+			<outputDirectory>/</outputDirectory>
+			<includes>
+				<include>${project.artifactId}-${project.version}-javadoc.jar</include>
+				<include>${project.artifactId}-${project.version}-sources.jar</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>src/main/resources</directory>
+			<outputDirectory>/conf</outputDirectory>
+			<includes>
+				<include>document-formats.js</include>
+			</includes>
+		</fileSet>
+	</fileSets>
 </assembly>
\ No newline at end of file
Index: tmp/org.txm.jodconverter.core/pom.xml
===================================================================
--- tmp/org.txm.jodconverter.core/pom.xml	(revision 2405)
+++ tmp/org.txm.jodconverter.core/pom.xml	(revision 2406)
@@ -1,177 +1,177 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 
-  <groupId>org.artofsolving.jodconverter</groupId>
-  <artifactId>jodconverter-core</artifactId>
-  <version>3.0-SNAPSHOT</version>
-  <packaging>jar</packaging>
+	<groupId>org.artofsolving.jodconverter</groupId>
+	<artifactId>jodconverter-core</artifactId>
+	<version>3.0-SNAPSHOT</version>
+	<packaging>jar</packaging>
 
-  <name>JODConverter - Core Library</name>
-  <description>
+	<name>JODConverter - Core Library</name>
+	<description>
     JODConverter converts office documents using OpenOffice.org
   </description>
-  <url>http://jodconverter.googlecode.com</url>
-  <licenses>
-    <license>
-      <name>GNU Lesser General Public License, Version 3 or later</name>
-      <url>http://www.gnu.org/licenses/lgpl.html</url>
-    </license>
-  </licenses>
-  <scm>
-    <url>http://jodconverter.googlecode.com/svn/trunk/jodconverter-core</url>
-    <connection>scm:svn:https://jodconverter.googlecode.com/svn/trunk/jodconverter-core/</connection>
-  </scm>
-  <inceptionYear>2003</inceptionYear>
-  <developers>
-    <developer>
-      <id>mirko.nasato</id>
-      <name>Mirko Nasato</name>
-      <email>mirko@artofsolving.com</email>
-    </developer>
-  </developers>
-  <contributors>
-    <contributor>
-      <name>Shervin Asgari</name>
-      <email>shervin@asgari.no</email>
-    </contributor>
-  </contributors>
+	<url>http://jodconverter.googlecode.com</url>
+	<licenses>
+		<license>
+			<name>GNU Lesser General Public License, Version 3 or later</name>
+			<url>http://www.gnu.org/licenses/lgpl.html</url>
+		</license>
+	</licenses>
+	<scm>
+		<url>http://jodconverter.googlecode.com/svn/trunk/jodconverter-core</url>
+		<connection>scm:svn:https://jodconverter.googlecode.com/svn/trunk/jodconverter-core/</connection>
+	</scm>
+	<inceptionYear>2003</inceptionYear>
+	<developers>
+		<developer>
+			<id>mirko.nasato</id>
+			<name>Mirko Nasato</name>
+			<email>mirko@artofsolving.com</email>
+		</developer>
+	</developers>
+	<contributors>
+		<contributor>
+			<name>Shervin Asgari</name>
+			<email>shervin@asgari.no</email>
+		</contributor>
+	</contributors>
 
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
+	<properties>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+	</properties>
 
-  <repositories>
-    <repository>
-      <!-- required for org.hyperic:sigar -->
-      <id>jboss-public-repository-group</id>
-      <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
-    </repository>
-  </repositories>
+	<repositories>
+		<repository>
+			<!-- required for org.hyperic:sigar -->
+			<id>jboss-public-repository-group</id>
+			<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
+		</repository>
+	</repositories>
 
-  <dependencies>
+	<dependencies>
 
-    <!-- Required dependencies -->
+		<!-- Required dependencies -->
 
-    <dependency>
-      <groupId>commons-io</groupId>
-      <artifactId>commons-io</artifactId>
-      <version>1.4</version>
-    </dependency>
-    <dependency>
-      <groupId>org.openoffice</groupId>
-      <artifactId>juh</artifactId>
-      <version>3.2.1</version>
-    </dependency>
-    <dependency>
-      <groupId>org.openoffice</groupId>
-      <artifactId>ridl</artifactId>
-      <version>3.2.1</version>
-    </dependency>
-    <dependency>
-      <groupId>org.openoffice</groupId>
-      <artifactId>unoil</artifactId>
-      <version>3.2.1</version>
-    </dependency>
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>1.4</version>
+		</dependency>
+		<dependency>
+			<groupId>org.openoffice</groupId>
+			<artifactId>juh</artifactId>
+			<version>3.2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.openoffice</groupId>
+			<artifactId>ridl</artifactId>
+			<version>3.2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.openoffice</groupId>
+			<artifactId>unoil</artifactId>
+			<version>3.2.1</version>
+		</dependency>
 
-    <!-- Optional dependencies -->
+		<!-- Optional dependencies -->
 
-    <dependency>
-      <!-- for the command line tool -->
-      <groupId>commons-cli</groupId>
-      <artifactId>commons-cli</artifactId>
-      <version>1.1</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <!-- for more robust process management -->
-      <groupId>org.hyperic</groupId>
-      <artifactId>sigar</artifactId>
-      <version>1.6.5.132</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <!-- for JSON configuration -->
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-      <version>20090211</version>
-      <optional>true</optional>
-    </dependency>
+		<dependency>
+			<!-- for the command line tool -->
+			<groupId>commons-cli</groupId>
+			<artifactId>commons-cli</artifactId>
+			<version>1.1</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<!-- for more robust process management -->
+			<groupId>org.hyperic</groupId>
+			<artifactId>sigar</artifactId>
+			<version>1.6.5.132</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<!-- for JSON configuration -->
+			<groupId>org.json</groupId>
+			<artifactId>json</artifactId>
+			<version>20090211</version>
+			<optional>true</optional>
+		</dependency>
 
-    <!--  Test dependencies -->
+		<!-- Test dependencies -->
 
-    <dependency>
-      <groupId>org.testng</groupId>
-      <artifactId>testng</artifactId>
-      <version>6.0.1</version>
-      <scope>test</scope>
-    </dependency>
+		<dependency>
+			<groupId>org.testng</groupId>
+			<artifactId>testng</artifactId>
+			<version>6.0.1</version>
+			<scope>test</scope>
+		</dependency>
 
-  </dependencies>
+	</dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.3.2</version>
-        <configuration>
-          <source>1.6</source>
-          <target>1.6</target>
-          <encoding>UTF-8</encoding>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.7.2</version>
-        <configuration>
-          <!-- don't run tests in parallel -->
-          <perCoreThreadCount>false</perCoreThreadCount>
-          <threadCount>1</threadCount>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <version>2.3.1</version>
-        <configuration>
-          <archive>
-            <manifest>
-              <mainClass>org.artofsolving.jodconverter.cli.Convert</mainClass>
-              <addClasspath>true</addClasspath>
-            </manifest>
-          </archive>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.2-beta-5</version>
-        <configuration>
-          <descriptors>
-            <descriptor>src/main/assembly/dist.xml</descriptor>
-          </descriptors>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.3.2</version>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+					<encoding>UTF-8</encoding>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<version>2.7.2</version>
+				<configuration>
+					<!-- don't run tests in parallel -->
+					<perCoreThreadCount>false</perCoreThreadCount>
+					<threadCount>1</threadCount>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jar-plugin</artifactId>
+				<version>2.3.1</version>
+				<configuration>
+					<archive>
+						<manifest>
+							<mainClass>org.artofsolving.jodconverter.cli.Convert</mainClass>
+							<addClasspath>true</addClasspath>
+						</manifest>
+					</archive>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<version>2.2-beta-5</version>
+				<configuration>
+					<descriptors>
+						<descriptor>src/main/assembly/dist.xml</descriptor>
+					</descriptors>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
 
-  <reporting>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-javadoc-plugin</artifactId>
-        <version>2.7</version>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>cobertura-maven-plugin</artifactId>
-        <version>2.4</version>
-      </plugin>
-    </plugins>
-  </reporting>
+	<reporting>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-javadoc-plugin</artifactId>
+				<version>2.7</version>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>cobertura-maven-plugin</artifactId>
+				<version>2.4</version>
+			</plugin>
+		</plugins>
+	</reporting>
 
 </project>
