diff options
Diffstat (limited to 'xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java')
-rw-r--r-- | xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java | 72 |
1 files changed, 1 insertions, 71 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java index c3a12fef4cbb..d95e37cdc815 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java @@ -221,61 +221,7 @@ public class Convert implements Cloneable { } } - /** - * NEW (HJ): - * Convert the input specified in calls to the <code>addInputStream</code> - * method to the output format specified by this <code>Convert</code> - * class. - * The (de)serializer may use the URLs to resolve links and choose name(s) - * for destination document(s). - * - * @return The output data. - * - * @param sFromURL URL of the source document (may be null if unknown) - * @param sToURL URL of the destination document (may be null if unknown) - * - * @throws ConvertException If any conversion error occurs. - * @throws IOException If any I/O error occurs. - */ - public ConvertData convert(String sFromURL, String sToURL) throws - ConvertException, IOException { - - ConvertData dataOut = new ConvertData(); - - if (toOffice) { - - // From device format to Office format - - DocumentDeserializerFactory myDocDeserializerFactory = - ci.getDocDeserializerFactory(); - DocumentDeserializer deser = - myDocDeserializerFactory.createDocumentDeserializer(inputCD); - Document officeDoc = deser instanceof DocumentSerializer2 ? - ((DocumentDeserializer2) deser).deserialize(sFromURL,sToURL) : - deser.deserialize(); - - - dataOut.addDocument(officeDoc); - return dataOut; - - } else { - // From Office format to device format - - DocumentSerializerFactory myDocSerializerFactory = - ci.getDocSerializerFactory(); - - Iterator<Object> e = inputCD.getDocumentEnumeration(); - - Document doc = (Document) e.next(); - DocumentSerializer ser = myDocSerializerFactory.createDocumentSerializer(doc); - dataOut = ser instanceof DocumentSerializer2 ? - ((DocumentSerializer2) ser).serialize(sFromURL,sToURL) : - ser.serialize(); - - return dataOut; - } - } /** * Returns the appropriate "Office" <code>Document</code> @@ -296,22 +242,6 @@ public class Convert implements Cloneable { } - /** - * Returns the appropriate "Device" <code>Document</code> - * object for this plug-in. - * - * @param name The name of the <code>Document</code> to create. - * @param is The <code>InputStream</code> corresponding to the - * <code>Document</code> to create. - * - * @return The appropriate "Device" <code>Document</code> - * object for this plug-in. - * - * @throws IOException If any I/O error occurs. - */ - public Document getDeviceDocument(String name, InputStream is) - throws IOException { - return(ci.getPluginFactory().createDeviceDocument(name, is)); - } + } |