Package writer2latex.xhtml
Class Converter
- java.lang.Object
-
- writer2latex.base.ConverterBase
-
- writer2latex.xhtml.Converter
-
- All Implemented Interfaces:
Converter
- Direct Known Subclasses:
Xhtml10Converter,XhtmlMathMLConverter,XhtmlMathMLXSLConverter
public class Converter extends ConverterBase
This class converts an OpenDocument file to an XHTML(+MathML) document<.
-
-
Field Summary
Fields Modifier and Type Field Description protected intnType-
Fields inherited from class writer2latex.base.ConverterBase
convertData, graphicConverter, imageLoader, metaData, odDoc, ofr, sTargetFileName
-
-
Constructor Summary
Constructors Constructor Description Converter(int nType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTarget(org.w3c.dom.Element node, java.lang.String sId)voidchangeOutFile(int nIndex)voidconvertInner()protected org.w3c.dom.ElementcreateElement(java.lang.String s)org.w3c.dom.ElementcreateLink(java.lang.String sId)org.w3c.dom.ElementcreateLink(org.w3c.dom.Element onode)org.w3c.dom.ElementcreateTarget(java.lang.String sId)protected org.w3c.dom.TextcreateTextNode(java.lang.String s)ConfiggetConfig()Get the interface for the configuration of this converterprotected DrawConvertergetDrawCv()protected L10ngetL10n()protected MathConvertergetMathCv()protected intgetOutFileIndex()java.lang.StringgetOutFileName(int nIndex, boolean bWithExt)org.w3c.dom.ElementgetPanelNode()protected writer2latex.xhtml.StyleConvertergetStyleCv()protected TableConvertergetTableCv()protected TextConvertergetTextCv()protected intgetType()voidhandleOfficeAnnotation(org.w3c.dom.Node onode, org.w3c.dom.Node hnode)protected org.w3c.dom.NodeimportNode(org.w3c.dom.Node node, boolean bDeep)org.w3c.dom.ElementnextOutFile()booleanoutFileHasContent()voidreadTemplate(java.io.File file)Read a template to use as a base for the converted document.voidreadTemplate(java.io.InputStream is)Read a template to use as a base for the converted document.-
Methods inherited from class writer2latex.base.ConverterBase
addDocument, convert, convert, getEmbeddedObject, getImageLoader, getMetaData, setGraphicConverter
-
-
-
-
Method Detail
-
getConfig
public Config getConfig()
Description copied from interface:ConverterGet the interface for the configuration of this converter- Returns:
- the configuration
-
readTemplate
public void readTemplate(java.io.InputStream is) throws java.io.IOExceptionDescription copied from interface:ConverterRead a template to use as a base for the converted document. The format of the template depends on theConverterimplementation.- Specified by:
readTemplatein interfaceConverter- Overrides:
readTemplatein classConverterBase- Parameters:
is- anInputStreamfrom which to read the template- Throws:
java.io.IOException- if some exception occurs while reading the template
-
readTemplate
public void readTemplate(java.io.File file) throws java.io.IOExceptionDescription copied from interface:ConverterRead a template to use as a base for the converted document. The format of the template depends on theConverterimplementation.- Specified by:
readTemplatein interfaceConverter- Overrides:
readTemplatein classConverterBase- Parameters:
file- a file from which to read the template- Throws:
java.io.IOException- if the file does not exist or some exception occurs while reading the template
-
getStyleCv
protected writer2latex.xhtml.StyleConverter getStyleCv()
-
getTextCv
protected TextConverter getTextCv()
-
getTableCv
protected TableConverter getTableCv()
-
getDrawCv
protected DrawConverter getDrawCv()
-
getMathCv
protected MathConverter getMathCv()
-
getType
protected int getType()
-
getOutFileIndex
protected int getOutFileIndex()
-
createElement
protected org.w3c.dom.Element createElement(java.lang.String s)
-
createTextNode
protected org.w3c.dom.Text createTextNode(java.lang.String s)
-
importNode
protected org.w3c.dom.Node importNode(org.w3c.dom.Node node, boolean bDeep)
-
getL10n
protected L10n getL10n()
-
convertInner
public void convertInner() throws java.io.IOException- Specified by:
convertInnerin classConverterBase- Throws:
java.io.IOException
-
handleOfficeAnnotation
public void handleOfficeAnnotation(org.w3c.dom.Node onode, org.w3c.dom.Node hnode)
-
getOutFileName
public java.lang.String getOutFileName(int nIndex, boolean bWithExt)
-
outFileHasContent
public boolean outFileHasContent()
-
changeOutFile
public void changeOutFile(int nIndex)
-
getPanelNode
public org.w3c.dom.Element getPanelNode()
-
nextOutFile
public org.w3c.dom.Element nextOutFile()
-
createTarget
public org.w3c.dom.Element createTarget(java.lang.String sId)
-
addTarget
public void addTarget(org.w3c.dom.Element node, java.lang.String sId)
-
createLink
public org.w3c.dom.Element createLink(java.lang.String sId)
-
createLink
public org.w3c.dom.Element createLink(org.w3c.dom.Element onode)
-
-