    public void execute(OfficeContext context) throws OfficeException {
        XComponentLoader loader = cast(XComponentLoader.class, context.getService(SERVICE_DESKTOP));
        XComponent document = null;
        try {
            Map<String,?> loadProperties = getLoadProperties(inputFile);
            document = loader.loadComponentFromURL(toUrl(inputFile), "_blank", 0, toUnoProperties(loadProperties));
            XRefreshable refreshable = cast(XRefreshable.class, document);
            if (refreshable != null) {
                refreshable.refresh();
            }
            Map<String,?> storeProperties = getStoreProperties(outputFile, document);
            cast(XStorable.class, document).storeToURL(toUrl(outputFile), toUnoProperties(storeProperties));
        } catch (IOException ioException) {
            throw new OfficeException("conversion failed", ioException);
        } catch (IllegalArgumentException illegalArgumentException) {
            throw new OfficeException("conversion failed", illegalArgumentException);
        } finally {
            try {
                cast(XCloseable.class, document).close(true);
            } catch (CloseVetoException closeVetoException) {
            }
        }
    }

    public void execute(OfficeContext context) throws OfficeException {
        XComponentLoader loader = cast(XComponentLoader.class, context.getService(SERVICE_DESKTOP));
        XComponent document = null;
        try {
            Map<String,?> loadProperties = getLoadProperties(inputFile);
            document = loader.loadComponentFromURL(toUrl(inputFile), "_blank", 0, toUnoProperties(loadProperties));
            if (document == null) {
                throw new OfficeException("input document could not be loaded: " + inputFile);
            }
            XRefreshable refreshable = cast(XRefreshable.class, document);
            if (refreshable != null) {
                refreshable.refresh();
            }
            Map<String,?> storeProperties = getStoreProperties(outputFile, document);
            cast(XStorable.class, document).storeToURL(toUrl(outputFile), toUnoProperties(storeProperties));
        } catch (IOException ioException) {
            throw new OfficeException("conversion failed", ioException);
        } catch (IllegalArgumentException illegalArgumentException) {
            throw new OfficeException("conversion failed", illegalArgumentException);
        } finally {
            if (document != null) {
                XCloseable closeable = cast(XCloseable.class, document);
                if (closeable != null) {
                    try {
                        closeable.close(true);
                    } catch (CloseVetoException closeVetoException) {
                    }
                } else {
                    document.dispose();
                }
            }
        }
    }
