Package writer2latex.xhtml
Class Converter
java.lang.Object
writer2latex.base.ConverterBase
writer2latex.xhtml.Converter
- All Implemented Interfaces:
Converter
- Direct Known Subclasses:
EPUB3Converter,Html5Converter,Xhtml10Converter,Xhtml11Converter,XhtmlMathMLConverter
This class converts an OpenDocument file to an XHTML(+MathML) or EPUB document.
-
Nested Class Summary
Nested classes/interfaces inherited from class writer2latex.base.ConverterBase
ConverterBase.TexMathsStyle -
Field Summary
FieldsFields inherited from class writer2latex.base.ConverterBase
converterResult, graphicConverter, imageConverter, metaData, odDoc, ofr, sTargetFileName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddContentEntry(String sTitle, int nLevel, String sTarget) voidvoidaddEpubType(Element elm, String sType) voidvoidchangeOutFile(int nIndex) voidprotected ElementcreateLink(String sId) createLink(Element onode) createTarget(String sId) protected TextGet the interface for the configuration of this converterprotected Stringprotected DrawConverterprotected L10ngetL10n()protected MathConverterprotected intgetOutFileName(int nIndex, boolean bWithExt) protected StringgetPlainInlineText(Node node) protected writer2latex.xhtml.StyleConverterprotected TableConverterprotected TextConverterprotected intgetType()protected XhtmlConfigvoidhandleOfficeAnnotation(Node onode, Node hnode) protected NodeimportNode(Node node, boolean bDeep) booleanisHTML5()booleanisOPS()protected booleanbooleanprotected voidprotected StringpushContentWidth(String sWidth) voidreadResource(File file, String sFileName, String sMediaType) Read a style sheet to include with the converted document.voidreadResource(InputStream is, String sFileName, String sMediaType) Read a resource to include with the converted document.voidreadStyleSheet(File file) Read a style sheet to include with the converted document.voidRead a style sheet to include with the converted document.voidreadTemplate(File file) Read a template to use as a base for the converted document.voidRead a template to use as a base for the converted document.protected voidsetCoverFile(String sTarget) protected voidsetCoverImageFile(OutputFile file, String sTarget) protected voidsetIndexFile(String sTarget) protected voidsetLofFile(String sTarget) protected voidsetLotFile(String sTarget) voidsetOPS(boolean b) protected voidsetTocFile(String sTarget) Methods inherited from class writer2latex.base.ConverterBase
addDocument, convert, convert, convert, getEmbeddedObject, getImageCv, getMetaData, getTexMathsEquation, getTexMathsEquation, getTexMathsStyle, setGraphicConverter
-
Field Details
-
nType
protected int nType
-
-
Constructor Details
-
Converter
public Converter(int nType)
-
-
Method Details
-
getConfig
Description copied from interface:ConverterGet the interface for the configuration of this converter- Returns:
- the configuration
-
getXhtmlConfig
-
readTemplate
Description 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:
IOException- if some exception occurs while reading the template
-
readTemplate
Description 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:
IOException- if the file does not exist or some exception occurs while reading the template
-
readStyleSheet
Description copied from interface:ConverterRead a style sheet to include with the converted document. The format of the style sheet depends on theConverterimplementation.- Specified by:
readStyleSheetin interfaceConverter- Overrides:
readStyleSheetin classConverterBase- Parameters:
is- anInputStreamfrom which to read the style sheet- Throws:
IOException- if some exception occurs while reading the style sheet
-
readStyleSheet
Description copied from interface:ConverterRead a style sheet to include with the converted document. The format of the style sheet depends on theConverterimplementation.- Specified by:
readStyleSheetin interfaceConverter- Overrides:
readStyleSheetin classConverterBase- Parameters:
file- a file from which to read the style sheet- Throws:
IOException- if the file does not exist or some exception occurs while reading the style sheet
-
readResource
Description copied from interface:ConverterRead a resource to include with the converted document. A resource can be any (binary) file and will be placed in the same directory as the style sheet- Specified by:
readResourcein interfaceConverter- Overrides:
readResourcein classConverterBase- Parameters:
is- anInputStreamfrom which to read the resourcesFileName- the file name to use for the resourcesMediaType- the media type of the resource, if null the media type will be guessed from the file name- Throws:
IOException- if some exception occurs while reading the resource
-
readResource
Description copied from interface:ConverterRead a style sheet to include with the converted document. A resource can be any (binary) file and will be placed in the same directory as the style sheet- Specified by:
readResourcein interfaceConverter- Overrides:
readResourcein classConverterBase- Parameters:
file- a file from which to read the style sheetsFileName- the file name to use for the resourcesMediaType- the media type of the resource, if null the media type will be guessed from the file name- Throws:
IOException- if the file does not exist or some exception occurs while reading the resource
-
getContentWidth
-
pushContentWidth
-
popContentWidth
protected void popContentWidth() -
isTopLevel
protected boolean isTopLevel() -
getStyleCv
protected writer2latex.xhtml.StyleConverter getStyleCv() -
getTextCv
-
getTableCv
-
getDrawCv
-
getMathCv
-
getType
protected int getType() -
isHTML5
public boolean isHTML5() -
getOutFileIndex
protected int getOutFileIndex() -
addContentEntry
-
setTocFile
-
setLofFile
-
setLotFile
-
setIndexFile
-
setCoverFile
-
setCoverImageFile
-
createElement
-
createTextNode
-
importNode
-
getL10n
-
setOPS
public void setOPS(boolean b) -
isOPS
public boolean isOPS() -
convertInner
- Specified by:
convertInnerin classConverterBase- Throws:
IOException
-
getPlainInlineText
-
handleOfficeAnnotation
-
getOutFileName
-
outFileHasContent
public boolean outFileHasContent() -
changeOutFile
public void changeOutFile(int nIndex) -
getPanelNode
-
nextOutFile
-
addEpubNs
-
addEpubType
-
createTarget
-
addTarget
-
createLink
-
createLink
-