Writer2xhtml custom config ui + preparing for EPUB

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@54 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2010-03-22 09:45:59 +00:00
parent e0cb22dd2e
commit a58ea7fa19
26 changed files with 783 additions and 120 deletions

View file

@ -69,7 +69,7 @@ public class BatchConverterImpl extends BatchConverterBase {
}
public void readTemplate(InputStream is) throws IOException {
template = new XhtmlDocument("Template",XhtmlDocument.XHTML10,-1);
template = new XhtmlDocument("Template",XhtmlDocument.XHTML10);
try {
template.read(is);
}
@ -89,7 +89,7 @@ public class BatchConverterImpl extends BatchConverterBase {
public OutputFile createIndexFile(String sHeading, IndexPageEntry[] entries) {
// Create the index page (with header/footer or from template)
XhtmlDocument htmlDoc = new XhtmlDocument("index",XhtmlDocument.XHTML10,0);
XhtmlDocument htmlDoc = new XhtmlDocument("index",XhtmlDocument.XHTML10);
htmlDoc.setConfig(config);
if (template!=null) { htmlDoc.readFromTemplate(template); }
else { htmlDoc.createHeaderFooter(); }

View file

@ -102,7 +102,7 @@ public class Converter extends ConverterBase {
// override
public void readTemplate(InputStream is) throws IOException {
template = new XhtmlDocument("Template",nType,-1);
template = new XhtmlDocument("Template",nType);
template.read(is);
}
@ -441,7 +441,7 @@ public class Converter extends ConverterBase {
// Prepare next output file
public Element nextOutFile() {
if (nOutFileIndex>=0) { textCv.insertFootnotes(htmlDoc.getContentNode()); }
htmlDoc = new XhtmlDocument(getOutFileName(++nOutFileIndex,false),nType,nOutFileIndex);
htmlDoc = new XhtmlDocument(getOutFileName(++nOutFileIndex,false),nType);
htmlDoc.setConfig(config);
if (template!=null) { htmlDoc.readFromTemplate(template); }
else if (bNeedHeaderFooter) { htmlDoc.createHeaderFooter(); }

View file

@ -79,9 +79,6 @@ public class XhtmlDocument extends DOMDocument {
// Type of document
private int nType;
// Sequence number
private int nSequenceNumber;
// Configuration
private String sEncoding = "UTF-8";
private boolean bUseNamedEntities = false;
@ -115,12 +112,10 @@ public class XhtmlDocument extends DOMDocument {
* writer2latex.xmerge.DOMDocument.
* @param name <code>Document</code> name.
* @param nType the type of document
* @param nSequenceNumber the sequence number of this file in the export
*/
public XhtmlDocument(String name, int nType, int nSequenceNumber) {
public XhtmlDocument(String name, int nType) {
super(name,sExtension[nType]);
this.nType = nType;
this.nSequenceNumber = nSequenceNumber;
// Define publicId and systemId
String sPublicId = null;
String sSystemId = null;
@ -178,10 +173,6 @@ public class XhtmlDocument extends DOMDocument {
return "";
}
@Override public int getSequenceNumber() {
return nSequenceNumber;
}
public Element getHeadNode() { return headNode; }
public Element getBodyNode() { return bodyNode; }