writer2latex.xhtml

Class Converter

Implemented Interfaces:
Converter
Known Direct Subclasses:
Xhtml10Converter, XhtmlMathMLConverter, XhtmlMathMLXSLConverter

public class Converter
extends ConverterBase

This class converts an OpenDocument file to an XHTML(+MathML) document<.

Field Summary

protected int
nType

Fields inherited from class writer2latex.base.ConverterBase

convertData, graphicConverter, imageLoader, metaData, odDoc, ofr, sTargetFileName

Constructor Summary

Converter(int nType)

Method Summary

void
addTarget(Element node, String sId)
void
changeOutFile(int nIndex)
void
convertInner()
protected Element
createElement(String s)
Element
createLink(Element onode)
Element
createLink(String sId)
Element
createTarget(String sId)
protected Text
createTextNode(String s)
Config
getConfig()
Get the interface for the configuration of this converter
protected DrawConverter
getDrawCv()
protected L10n
getL10n()
protected MathConverter
getMathCv()
protected int
getOutFileIndex()
String
getOutFileName(int nIndex, boolean bWithExt)
Element
getPanelNode()
protected writer2latex.xhtml.StyleConverter
getStyleCv()
protected TableConverter
getTableCv()
protected TextConverter
getTextCv()
protected int
getType()
void
handleOfficeAnnotation(Node onode, Node hnode)
protected Node
importNode(Node node, boolean bDeep)
Element
nextOutFile()
boolean
outFileHasContent()
void
readTemplate(File file)
Read a template to use as a base for the converted document.
void
readTemplate(InputStream is)
Read a template to use as a base for the converted document.

Methods inherited from class writer2latex.base.ConverterBase

addDocument, convert, convert, convertInner, getEmbeddedObject, getImageLoader, getMetaData, readTemplate, readTemplate, setGraphicConverter

Field Details

nType

protected int nType

Constructor Details

Converter

public Converter(int nType)

Method Details

addTarget

public void addTarget(Element node,
                      String sId)

changeOutFile

public void changeOutFile(int nIndex)

convertInner

public void convertInner()
            throws IOException
Overrides:
convertInner in interface ConverterBase

createElement

protected Element createElement(String s)

createLink

public Element createLink(Element onode)

createLink

public Element createLink(String sId)

createTarget

public Element createTarget(String sId)

createTextNode

protected Text createTextNode(String s)

getConfig

public Config getConfig()
Get the interface for the configuration of this converter
Specified by:
getConfig in interface Converter
Returns:
the configuration

getDrawCv

protected DrawConverter getDrawCv()

getL10n

protected L10n getL10n()

getMathCv

protected MathConverter getMathCv()

getOutFileIndex

protected int getOutFileIndex()

getOutFileName

public String getOutFileName(int nIndex,
                             boolean bWithExt)

getPanelNode

public Element getPanelNode()

getStyleCv

protected writer2latex.xhtml.StyleConverter getStyleCv()

getTableCv

protected TableConverter getTableCv()

getTextCv

protected TextConverter getTextCv()

getType

protected int getType()

handleOfficeAnnotation

public void handleOfficeAnnotation(Node onode,
                                   Node hnode)

importNode

protected Node importNode(Node node,
                          boolean bDeep)

nextOutFile

public Element nextOutFile()

outFileHasContent

public boolean outFileHasContent()

readTemplate

public void readTemplate(File file)
            throws IOException
Read a template to use as a base for the converted document. The format of the template depends on the Converter implementation.
Specified by:
readTemplate in interface Converter
Overrides:
readTemplate in interface ConverterBase
Parameters:
file - a file from which to read the template

readTemplate

public void readTemplate(InputStream is)
            throws IOException
Read a template to use as a base for the converted document. The format of the template depends on the Converter implementation.
Specified by:
readTemplate in interface Converter
Overrides:
readTemplate in interface ConverterBase
Parameters:
is - an InputStream from which to read the template