diff --git a/source/distro/changelog.txt b/source/distro/changelog.txt index 2c7191a..b8b8078 100644 --- a/source/distro/changelog.txt +++ b/source/distro/changelog.txt @@ -2,6 +2,8 @@ Changelog for Writer2LaTeX version 1.2 -> 1.4 ---------- version 1.3.2 alpha ---------- +[all] Refactored and rearranged some code; in particular the last remaining bits of the old xmerge framework has been removed + [all] Optimized reading of package format: The settings.xml files are not parsed and the unused parts of the ZIP file are disposed ---------- version 1.3.1 alpha ---------- diff --git a/source/java/org/openoffice/da/comp/w2lcommon/filter/ExportFilterBase.java b/source/java/org/openoffice/da/comp/w2lcommon/filter/ExportFilterBase.java index 9aae583..6e7ce0c 100644 --- a/source/java/org/openoffice/da/comp/w2lcommon/filter/ExportFilterBase.java +++ b/source/java/org/openoffice/da/comp/w2lcommon/filter/ExportFilterBase.java @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * - * Copyright: 2002-2012 by Henrik Just + * Copyright: 2002-2014 by Henrik Just * * All Rights Reserved. * - * Version 1.4 (2012-03-22) + * Version 1.4 (2014-08-27) * */ @@ -240,15 +240,15 @@ XTypeProvider { // Get base name from the URL provided by OOo String sName= getFileName(sURL); - // Adapter for output stream (Main output file) - XOutputStreamToOutputStreamAdapter newxos =new XOutputStreamToOutputStreamAdapter(exportStream); - // Create converter Converter converter = ConverterFactory.createConverter(sdMime); if (converter==null) { throw new com.sun.star.uno.RuntimeException("Failed to create converter to "+sdMime); } + // Adapter for output stream (Main output file) + XOutputStreamToOutputStreamAdapter newxos =new XOutputStreamToOutputStreamAdapter(exportStream); + // Apply the FilterData to the converter if (filterData!=null) { FilterDataParser fdp = new FilterDataParser(xComponentContext); diff --git a/source/java/org/openoffice/da/comp/writer2xhtml/ConfigurationDialog.java b/source/java/org/openoffice/da/comp/writer2xhtml/ConfigurationDialog.java index ce349de..341afec 100644 --- a/source/java/org/openoffice/da/comp/writer2xhtml/ConfigurationDialog.java +++ b/source/java/org/openoffice/da/comp/writer2xhtml/ConfigurationDialog.java @@ -30,7 +30,6 @@ import java.util.Map; import org.openoffice.da.comp.w2lcommon.filter.ConfigurationDialogBase; import org.openoffice.da.comp.w2lcommon.helper.DialogAccess; -import org.openoffice.da.comp.w2lcommon.helper.FilePicker; import com.sun.star.container.NoSuchElementException; import com.sun.star.lang.XServiceInfo; diff --git a/source/java/writer2latex/xmerge/BinaryGraphicsDocument.java b/source/java/writer2latex/base/BinaryGraphicsDocument.java similarity index 96% rename from source/java/writer2latex/xmerge/BinaryGraphicsDocument.java rename to source/java/writer2latex/base/BinaryGraphicsDocument.java index cbcf1bb..c39c292 100644 --- a/source/java/writer2latex/xmerge/BinaryGraphicsDocument.java +++ b/source/java/writer2latex/base/BinaryGraphicsDocument.java @@ -16,21 +16,22 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * - * Copyright: 2002-2012 by Henrik Just + * Copyright: 2002-2014 by Henrik Just * * All Rights Reserved. * - * Version 1.4 (2012-04-01) + * Version 1.4 (2014-08-25) * */ -package writer2latex.xmerge; +package writer2latex.base; import java.io.OutputStream; import java.io.InputStream; //import java.io.ByteArrayOutputStream; import java.io.IOException; +import writer2latex.api.OutputFile; import writer2latex.util.Misc; @@ -43,7 +44,7 @@ import writer2latex.util.Misc; *
GraphicsDocument
is used to create new graphics documents.
Document
for
- * StarOffice documents.
+ * This class represents XML-based documents. It is loosely based on a class from the former xmerge project
+ * from OOo.
*/
-public class DOMDocument
- implements writer2latex.xmerge.Document {
+public class DOMDocument implements OutputFile {
/** Factory for DocumentBuilder
objects. */
private static DocumentBuilderFactory factory =
@@ -352,9 +338,9 @@ public class DOMDocument
doc = builder.newDocument();
} catch (ParserConfigurationException ex) {
+ // This will not happen
System.err.println("Error:"+ ex);
-
-
+ throw new IOException(ex);
}
Element root = (Element) doc.createElement(rootName);
diff --git a/source/java/writer2latex/office/ImageLoader.java b/source/java/writer2latex/base/ImageConverter.java
similarity index 94%
rename from source/java/writer2latex/office/ImageLoader.java
rename to source/java/writer2latex/base/ImageConverter.java
index 2c5e768..fb2a137 100644
--- a/source/java/writer2latex/office/ImageLoader.java
+++ b/source/java/writer2latex/base/ImageConverter.java
@@ -24,7 +24,7 @@
*
*/
-package writer2latex.office;
+package writer2latex.base;
import java.text.DecimalFormat;
import java.text.NumberFormat;
@@ -34,15 +34,20 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import writer2latex.api.GraphicConverter;
+import writer2latex.office.EmbeddedBinaryObject;
+import writer2latex.office.EmbeddedObject;
+import writer2latex.office.MIMETypes;
+import writer2latex.office.OfficeDocument;
+import writer2latex.office.SVMReader;
+import writer2latex.office.XMLString;
import writer2latex.util.Base64;
import writer2latex.util.Misc;
-import writer2latex.xmerge.BinaryGraphicsDocument;
/**
* This class extracts images from an OOo file. * The images are returned as BinaryGraphicsDocument.
*/ -public final class ImageLoader { +public final class ImageConverter { // The Office document to load images from private OfficeDocument oooDoc; @@ -62,7 +67,7 @@ public final class ImageLoader { private String sDefaultVectorFormat = null; private HashSetClass representing a BibTeX document.
* */ -public class BibTeXDocument implements Document { +public class BibTeXDocument implements OutputFile { private static final String FILE_EXTENSION = ".bib"; private String sName; @@ -73,19 +71,6 @@ public class BibTeXDocument implements Document { i18n = new ClassicI18n(new LaTeXConfig()); } - /** - *This method is supposed to read byte
data from the InputStream.
- * Currently it does nothing, since we don't need it.
Returns the Document
name with no file extension.
This class handles draw elements.
@@ -312,7 +312,7 @@ public class DrawConverter extends ConverterHelper { (config.getBackend()==LaTeXConfig.DVIPS && MIMETypes.EPS_EXT.equals(sExt))); } else { // embedded or base64 encoded image - BinaryGraphicsDocument bgd = palette.getImageLoader().getImage(node); + BinaryGraphicsDocument bgd = palette.getImageCv().getImage(node); if (bgd!=null) { palette.addDocument(bgd); sFileName = bgd.getFileName(); diff --git a/source/java/writer2latex/latex/LaTeXDocument.java b/source/java/writer2latex/latex/LaTeXDocument.java index 4ebcc48..c662d1c 100644 --- a/source/java/writer2latex/latex/LaTeXDocument.java +++ b/source/java/writer2latex/latex/LaTeXDocument.java @@ -16,21 +16,19 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * - * Copyright: 2002-2010 by Henrik Just + * Copyright: 2002-2014 by Henrik Just * * All Rights Reserved. * - * Version 1.2 (2010-03-28) + * Version 1.4 (2014-08-27) * */ package writer2latex.latex; import writer2latex.api.MIMETypes; -import writer2latex.xmerge.Document; - +import writer2latex.api.OutputFile; import java.io.IOException; -import java.io.InputStream; import java.io.OutputStream; import java.io.OutputStreamWriter; @@ -38,7 +36,7 @@ import java.io.OutputStreamWriter; *Class representing a LaTeX document.
* */ -public class LaTeXDocument implements Document { +public class LaTeXDocument implements OutputFile { private static final String FILE_EXTENSION = ".tex"; private String sName; @@ -68,19 +66,6 @@ public class LaTeXDocument implements Document { contents = new LaTeXDocumentPortion(true); } - /** - *This method is supposed to read byte
data from the InputStream.
- * Currently it does nothing, since we don't need it.
Returns the Document
name with no file extension.
SimpleZipReader
containing the object
*/
protected EmbeddedBinaryObject(String sName, String sType, SimpleZipReader source) {
diff --git a/source/java/writer2latex/office/EmbeddedObject.java b/source/java/writer2latex/office/EmbeddedObject.java
index 1ced2d2..4dd7dc1 100644
--- a/source/java/writer2latex/office/EmbeddedObject.java
+++ b/source/java/writer2latex/office/EmbeddedObject.java
@@ -37,9 +37,9 @@ public abstract class EmbeddedObject {
* @param sName The name of the object.
* @param sType The MIME-type of the object.
*/
- protected EmbeddedObject(String name, String type) {
- sName = name;
- sType = type;
+ protected EmbeddedObject(String sName, String sType) {
+ this.sName = sName;
+ this.sType = sType;
}
/** Get the name of the embedded object represented by this instance.
diff --git a/source/java/writer2latex/office/OfficeReader.java b/source/java/writer2latex/office/OfficeReader.java
index df3e988..72e90d5 100644
--- a/source/java/writer2latex/office/OfficeReader.java
+++ b/source/java/writer2latex/office/OfficeReader.java
@@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
- * Version 1.4 (2014-08-20)
+ * Version 1.4 (2014-08-27)
*
*/
@@ -272,7 +272,7 @@ public class OfficeReader {
if (next.getNextSibling()!=null) { return next.getNextSibling(); }
// Then move to parent, if this is the text:p node, we are done
next = next.getParentNode();
- if (next.getNodeType()==Node.ELEMENT_NODE &&
+ if (next!=null && next.getNodeType()==Node.ELEMENT_NODE &&
next.getNodeName().equals(XMLString.TEXT_P)) {
return null;
}
diff --git a/source/java/writer2latex/office/PropertySet.java b/source/java/writer2latex/office/PropertySet.java
index 80a612e..e2fc0ce 100644
--- a/source/java/writer2latex/office/PropertySet.java
+++ b/source/java/writer2latex/office/PropertySet.java
@@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
- * Copyright: 2002-2007 by Henrik Just
+ * Copyright: 2002-2014 by Henrik Just
*
* All Rights Reserved.
*
- * Version 0.5 (2007-03-17)
+ * Version 1.4 (2014-08-27)
*
*/
@@ -62,9 +62,9 @@ public class PropertySet {
public String getName() { return sName; }
public void loadFromDOM(Node node) {
- sName = node.getNodeName();
// read the attributes of the node, if any
if (node!=null) {
+ sName = node.getNodeName();
NamedNodeMap attrNodes = node.getAttributes();
if (attrNodes!=null) {
int nLen = attrNodes.getLength();
diff --git a/source/java/writer2latex/office/TocReader.java b/source/java/writer2latex/office/TocReader.java
index 7964a61..51ec4b5 100644
--- a/source/java/writer2latex/office/TocReader.java
+++ b/source/java/writer2latex/office/TocReader.java
@@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
- * Copyright: 2002-2008 by Henrik Just
+ * Copyright: 2002-2014 by Henrik Just
*
* All Rights Reserved.
*
- * Version 1.0 (2008-11-22)
+ * Version 1.4 (2014-08-27)
*
*/
@@ -40,7 +40,7 @@ import writer2latex.util.Misc;
public class TocReader {
Element tocSource = null;
- Element indexBody = null;
+ //Element indexBody = null;
String sName=null; // (section) name for this toc
String sStyleName=null; // section style name
@@ -181,7 +181,7 @@ public class TocReader {
/** Return the generated content of this toc, if available
* @return thetext:index-body
element
*/
- public Element getIndexBody() { return indexBody; }
+ /* public Element getIndexBody() { return indexBody; } */
}
\ No newline at end of file
diff --git a/source/java/writer2latex/util/Misc.java b/source/java/writer2latex/util/Misc.java
index 0c0198e..68c76b0 100644
--- a/source/java/writer2latex/util/Misc.java
+++ b/source/java/writer2latex/util/Misc.java
@@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
- * Copyright: 2002-2012 by Henrik Just
+ * Copyright: 2002-2014 by Henrik Just
*
* All Rights Reserved.
*
- * Version 1.2 (2012-02-26)
+ * Version 1.4 (2014-08-27)
*
*/
@@ -63,9 +63,8 @@ public class Misc{
// Truncate a date+time to the date only
public static final String dateOnly(String sDate) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
- Date date = null;
try {
- date = sdf.parse(sDate);
+ sdf.parse(sDate);
} catch (ParseException e) {
// If the date cannot be parsed according to the given pattern, return the original string
return sDate;
diff --git a/source/java/writer2latex/util/SimpleZipReader.java b/source/java/writer2latex/util/SimpleZipReader.java
index e337e64..86b4271 100644
--- a/source/java/writer2latex/util/SimpleZipReader.java
+++ b/source/java/writer2latex/util/SimpleZipReader.java
@@ -67,7 +67,7 @@ public class SimpleZipReader {
* You can only get an entry once: The SimpleZipReader
removes the entry from the
* collection when this method is called (memory optimization).
*
- * @param name the name (path) of the ZIP entry
+ * @param sName the name (path) of the ZIP entry
*
* @return a byte array with the contents of the entry, or null if the entry does not exist
*/
diff --git a/source/java/writer2latex/xhtml/Converter.java b/source/java/writer2latex/xhtml/Converter.java
index b6ede57..15b787d 100644
--- a/source/java/writer2latex/xhtml/Converter.java
+++ b/source/java/writer2latex/xhtml/Converter.java
@@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
- * Version 1.4 (2014-08-13)
+ * Version 1.4 (2014-08-26)
*
*/
@@ -248,22 +248,22 @@ public class Converter extends ConverterBase {
l10n = new L10n();
if (isOPS()) {
- imageLoader.setBaseFileName("image");
- imageLoader.setUseSubdir("images");
+ imageConverter.setBaseFileName("image");
+ imageConverter.setUseSubdir("images");
}
else {
- imageLoader.setBaseFileName(sTargetFileName+"-img");
+ imageConverter.setBaseFileName(sTargetFileName+"-img");
if (config.saveImagesInSubdir()) {
- imageLoader.setUseSubdir(sTargetFileName+"-img");
+ imageConverter.setUseSubdir(sTargetFileName+"-img");
}
}
- imageLoader.setDefaultFormat(MIMETypes.PNG);
- imageLoader.addAcceptedFormat(MIMETypes.JPEG);
- imageLoader.addAcceptedFormat(MIMETypes.GIF);
+ imageConverter.setDefaultFormat(MIMETypes.PNG);
+ imageConverter.addAcceptedFormat(MIMETypes.JPEG);
+ imageConverter.addAcceptedFormat(MIMETypes.GIF);
if (nType==XhtmlDocument.HTML5 && config.useSVG()) { // HTML supports (inline) SVG as well
- imageLoader.setDefaultVectorFormat(MIMETypes.SVG);
+ imageConverter.setDefaultVectorFormat(MIMETypes.SVG);
}
styleCv = new StyleConverter(ofr,config,this,nType);
diff --git a/source/java/writer2latex/xhtml/DrawConverter.java b/source/java/writer2latex/xhtml/DrawConverter.java
index 85c5c4f..d192fe7 100644
--- a/source/java/writer2latex/xhtml/DrawConverter.java
+++ b/source/java/writer2latex/xhtml/DrawConverter.java
@@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
- * Version 1.4 (2014-08-20)
+ * Version 1.4 (2014-08-26)
*
*/
@@ -59,7 +59,7 @@ import org.w3c.dom.Element;
import writer2latex.util.Misc;
import writer2latex.util.CSVList;
import writer2latex.util.SimpleXMLParser;
-import writer2latex.xmerge.BinaryGraphicsDocument;
+import writer2latex.base.BinaryGraphicsDocument;
import writer2latex.office.EmbeddedObject;
import writer2latex.office.EmbeddedXMLObject;
import writer2latex.office.XMLString;
@@ -480,7 +480,7 @@ public class DrawConverter extends ConverterHelper {
}
}
else { // embedded or base64 encoded image
- bgd = converter.getImageLoader().getImage(onode);
+ bgd = converter.getImageCv().getImage(onode);
if (bgd!=null) {
sFileName = bgd.getFileName();
// If this is the cover image, add it to the converter result
diff --git a/source/java/writer2latex/xhtml/MathConverter.java b/source/java/writer2latex/xhtml/MathConverter.java
index 5aba3f8..622b22e 100644
--- a/source/java/writer2latex/xhtml/MathConverter.java
+++ b/source/java/writer2latex/xhtml/MathConverter.java
@@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
- * Version 1.4 (2014-08-20)
+ * Version 1.4 (2014-08-26)
*
*/
@@ -33,7 +33,7 @@ import org.w3c.dom.NamedNodeMap;
import writer2latex.office.*;
import writer2latex.util.Misc;
-import writer2latex.xmerge.BinaryGraphicsDocument;
+import writer2latex.base.BinaryGraphicsDocument;
import writer2latex.latex.StarMathConverter;
/** This class converts formulas: Either as MathML, as an image or as plain text (StarMath or LaTeX format)
@@ -151,7 +151,7 @@ public class MathConverter extends ConverterHelper {
// Get the image from the ImageLoader
String sHref = Misc.getAttribute(onode,XMLString.XLINK_HREF);
if (sHref==null || sHref.length()==0 || ofr.isInPackage(sHref)) {
- BinaryGraphicsDocument bgd = converter.getImageLoader().getImage(image);
+ BinaryGraphicsDocument bgd = converter.getImageCv().getImage(image);
if (bgd!=null) {
String sMIME = bgd.getDocumentMIMEType();
if (MIMETypes.PNG.equals(sMIME) || MIMETypes.JPEG.equals(sMIME) || MIMETypes.GIF.equals(sMIME)) {
diff --git a/source/java/writer2latex/xhtml/TextConverter.java b/source/java/writer2latex/xhtml/TextConverter.java
index 7986869..9f69faf 100644
--- a/source/java/writer2latex/xhtml/TextConverter.java
+++ b/source/java/writer2latex/xhtml/TextConverter.java
@@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
- * Version 1.4 (2014-08-13)
+ * Version 1.4 (2014-08-27)
*
*/
@@ -966,15 +966,15 @@ public class TextConverter extends ConverterHelper {
ListCounter counter = getListCounter(ofr.getListStyle(styleName));
// Restart numbering, if required
- if (counter!=null) {
- boolean bContinueNumbering = "true".equals(Misc.getAttribute(onode,XMLString.TEXT_CONTINUE_NUMBERING));
- if (!bContinueNumbering && counter!=null) {
- counter.restart(nLevel);
- }
- if (config.listFormatting()==XhtmlConfig.CSS1_HACK && counter.getValue(nLevel)>0) {
- hnode.setAttribute("start",Integer.toString(counter.getValue(nLevel)+1));
- }
+ //if (counter!=null) {
+ boolean bContinueNumbering = "true".equals(Misc.getAttribute(onode,XMLString.TEXT_CONTINUE_NUMBERING));
+ if (!bContinueNumbering && counter!=null) {
+ counter.restart(nLevel);
}
+ if (config.listFormatting()==XhtmlConfig.CSS1_HACK && counter.getValue(nLevel)>0) {
+ hnode.setAttribute("start",Integer.toString(counter.getValue(nLevel)+1));
+ }
+ //}
if (onode.hasChildNodes()) {
NodeList nList = onode.getChildNodes();
@@ -1001,7 +1001,9 @@ public class TextConverter extends ConverterHelper {
}
else {
// add an li element
- sCurrentListLabel = counter.step(nLevel).getLabel();
+ //if (counter!=null) {
+ sCurrentListLabel = counter.step(nLevel).getLabel();
+ //}
currentListStyle = ofr.getListStyle(styleName);
nCurrentListLevel = nLevel;
Element item = converter.createElement("li");
@@ -1016,9 +1018,9 @@ public class TextConverter extends ConverterHelper {
XMLString.TEXT_START_VALUE),1);
if (bRestart) {
item.setAttribute("value",Integer.toString(nStartValue));
- if (counter!=null) {
- sCurrentListLabel = counter.restart(nLevel,nStartValue).getLabel();
- }
+ //if (counter!=null) {
+ sCurrentListLabel = counter.restart(nLevel,nStartValue).getLabel();
+ //}
}
}
traverseListItem(child,nLevel,styleName,item);
diff --git a/source/java/writer2latex/xhtml/XhtmlDocument.java b/source/java/writer2latex/xhtml/XhtmlDocument.java
index 6e353e5..6bb4d9d 100644
--- a/source/java/writer2latex/xhtml/XhtmlDocument.java
+++ b/source/java/writer2latex/xhtml/XhtmlDocument.java
@@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
- * Version 1.4 (2014-08-13)
+ * Version 1.4 (2014-08-26)
*
*/
@@ -32,20 +32,17 @@ package writer2latex.xhtml;
import org.w3c.dom.NodeList;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-//import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
import org.w3c.dom.DOMImplementation;
-//import org.xml.sax.SAXException;
-//import org.xml.sax.SAXParseException;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
-//import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.ParserConfigurationException;
import writer2latex.api.MIMETypes;
+import writer2latex.base.DOMDocument;
import writer2latex.office.XMLString;
-import writer2latex.xmerge.DOMDocument;
import java.io.InputStream;
import java.io.OutputStream;
@@ -262,15 +259,13 @@ public class XhtmlDocument extends DOMDocument {
/**
* Constructor. This constructor also creates the DOM (minimal: root, head,
- * title and body node only) - unlike the constructors in
- * writer2latex.xmerge.DOMDocument.
- * @param name Document
name.
+ * title and body node only)
+ * @param name name of this document
* @param nType the type of document
*/
public XhtmlDocument(String name, int nType) {
super(name,sExtension[nType]);
this.nType = nType;
-
// create DOM
Document contentDOM = null;
@@ -281,21 +276,21 @@ public class XhtmlDocument extends DOMDocument {
String[] sDocType = getDoctypeStrings();
DocumentType doctype = domImpl.createDocumentType("html", sDocType[0], sDocType[1]);
contentDOM = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",doctype);
+ contentDOM.getDocumentElement().setAttribute("xmlns","http://www.w3.org/1999/xhtml");
+ // add head, title and body
+ headNode = contentDOM.createElement("head");
+ titleNode = contentDOM.createElement("title");
+ bodyNode = contentDOM.createElement("body");
+ contentDOM.getDocumentElement().appendChild(headNode);
+ headNode.appendChild(titleNode);
+ contentDOM.getDocumentElement().appendChild(bodyNode);
+ contentNode = bodyNode;
+ setContentDOM(contentDOM);
}
- catch (Throwable t) {
- t.printStackTrace();
+ catch (ParserConfigurationException e) {
+ // The newDocumentBuilder() method may in theory throw this, but this will not happen
+ e.printStackTrace();
}
- contentDOM.getDocumentElement().setAttribute("xmlns","http://www.w3.org/1999/xhtml");
- // add head, title and body
- headNode = contentDOM.createElement("head");
- titleNode = contentDOM.createElement("title");
- bodyNode = contentDOM.createElement("body");
- contentDOM.getDocumentElement().appendChild(headNode);
- headNode.appendChild(titleNode);
- contentDOM.getDocumentElement().appendChild(bodyNode);
- contentNode = bodyNode;
- setContentDOM(contentDOM);
-
}
@Override public String getMIMEType() {
diff --git a/source/java/writer2latex/xmerge/Document.java b/source/java/writer2latex/xmerge/Document.java
deleted file mode 100644
index 1a54ec6..0000000
--- a/source/java/writer2latex/xmerge/Document.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- *
- * - GNU Lesser General Public License Version 2.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
- *
- * Copyright: 2000 by Sun Microsystems, Inc.
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- * This version is adapted for Writer2LaTeX
- * version 1.0 (2008-11-22)
- *
- ************************************************************************/
-
-package writer2latex.xmerge;
-
-//import java.io.OutputStream;
-import java.io.InputStream;
-import java.io.IOException;
-
-import writer2latex.api.OutputFile;
-
-/**
- * A Document
represents any Document
- * to be converted and the resulting Document
from any
- * conversion.
Reads the content from the InputStream
into
- * the Document
.
This method may not be thread-safe. - * Implementations may or may not synchronize this - * method. User code (i.e. caller) must make sure that - * calls to this method are thread-safe.
- * - * @param isInputStream
to read in the
- * Document
content.
- *
- * @throws IOException If any I/O error occurs.
- */
- public void read(InputStream is) throws IOException;
-
-
- /**
- * Returns the Document
name with no file extension.
- *
- * @return The Document
name with no file extension.
- */
- public String getName();
-
-
-}
-
diff --git a/source/java/writer2latex/xmerge/Package.html b/source/java/writer2latex/xmerge/Package.html
deleted file mode 100644
index 835cc3c..0000000
--- a/source/java/writer2latex/xmerge/Package.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- Classes originating from OOo's xmerge.
-Previously, Writer2LaTeX was based on xmerge, but this is not the case -anymore. The classes in this packages are reminiscent of that.
-This package is supposed to go away in a future version and be replaced by -something else (probably ODFDOM)
- -