Package com.artofsolving.jodconverter.openoffice.connection

Examples of com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException


            } catch (OpenOfficeException openOfficeException) {
                throw openOfficeException;
      } catch (Throwable throwable) {
        // difficult to provide finer grained error reporting here;
        // OOo seems to throw ErrorCodeIOException most of the time
        throw new OpenOfficeException("conversion failed", throwable);
      }
    }
  }
View Full Code Here


    XComponentLoader desktop = openOfficeConnection.getDesktop();
    XComponent document = desktop.loadComponentFromURL(inputUrl, "_blank", 0, null);
   
       
    if (document == null) {
            throw new OpenOfficeException("conversion failed: input document is null after loading");
        }
   
    refreshDocument(document);
   
    try {
View Full Code Here

            connected = true;
            logger.info("connected");
        } catch (NoConnectException connectException) {
            throw new ConnectException("connection failed: "+ connectionString +": " + connectException.getMessage());
        } catch (Exception exception) {
            throw new OpenOfficeException("connection failed: "+ connectionString, exception);
        }
    }
View Full Code Here

                logger.info("trying to (re)connect");
                connect();
            }
            return serviceManager.createInstanceWithContext(className, componentContext);
        } catch (Exception exception) {
            throw new OpenOfficeException("could not obtain service: " + className, exception);
        }
    }
View Full Code Here

  protected void loadAndExport(String inputUrl, Map/*<String,Object>*/ loadProperties, String outputUrl, Map/*<String,Object>*/ storeProperties) throws Exception {
    XComponentLoader desktop = openOfficeConnection.getDesktop();
    XComponent document = desktop.loadComponentFromURL(inputUrl, "_blank", 0, toPropertyValues(loadProperties));
        if (document == null) {
            throw new OpenOfficeException("conversion failed: input document is null after loading");
        }
   
    refreshDocument(document);
   
    try {
View Full Code Here

        IOUtils.copy(outputFileStream, outputStream);
      } finally {
        IOUtils.closeQuietly(outputFileStream);
      }
    } catch (IOException ioException) {
      throw new OpenOfficeException("conversion failed", ioException);
    } finally {
      if (inputFile != null) {
        inputFile.delete();
      }
      if (outputFile != null) {
View Full Code Here

        IOUtils.copy(outputFileStream, outputStream);
      } finally {
        IOUtils.closeQuietly(outputFileStream);
      }
    } catch (IOException ioException) {
      throw new OpenOfficeException("conversion failed", ioException);
    } finally {
      if (inputFile != null) {
        inputFile.delete();
      }
      if (outputFile != null) {
View Full Code Here

            } catch (OpenOfficeException openOfficeException) {
                throw openOfficeException;
      } catch (Throwable throwable) {
        // difficult to provide finer grained error reporting here;
        // OOo seems to throw ErrorCodeIOException most of the time
        throw new OpenOfficeException("conversion failed", throwable);
      }
    }
  }
View Full Code Here

  private void loadAndExport(String inputUrl, Map/*<String,Object>*/ loadProperties, String outputUrl, Map/*<String,Object>*/ storeProperties) throws Exception {
    XComponentLoader desktop = openOfficeConnection.getDesktop();
    XComponent document = desktop.loadComponentFromURL(inputUrl, "_blank", 0, toPropertyValues(loadProperties));
        if (document == null) {
            throw new OpenOfficeException("conversion failed: input document is null after loading");
        }
   
    refreshDocument(document);
   
    try {
View Full Code Here

        loadAndExport(inputStream, inputFormat.getImportOptions(), outputStream, exportOptions);
      }
        } catch (OpenOfficeException openOfficeException) {
            throw openOfficeException;
    } catch (Throwable throwable) {
      throw new OpenOfficeException("conversion failed", throwable);
    }
  }
View Full Code Here

TOP

Related Classes of com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.