Package org.apache.poi.hwpf.converter
Class AbstractWordConverter
- java.lang.Object
-
- org.apache.poi.hwpf.converter.AbstractWordConverter
-
- Direct Known Subclasses:
WordToFoConverter,WordToHtmlConverter,WordToTextConverter
@Beta public abstract class AbstractWordConverter extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static charUNICODECHAR_NO_BREAK_SPACEprotected static charUNICODECHAR_NONBREAKING_HYPHENprotected static charUNICODECHAR_ZERO_WIDTH_SPACE
-
Constructor Summary
Constructors Constructor Description AbstractWordConverter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidafterProcess()Special actions that need to be called after processing complete, like updating stylesheets or building document notes list.protected FontReplacer.TripletgetCharacterRunTriplet(CharacterRun characterRun)abstract DocumentgetDocument()FontReplacergetFontReplacer()protected intgetNumberColumnsSpanned(int[] tableCellEdges, int currentEdgeIndex, TableCell tableCell)protected intgetNumberRowsSpanned(Table table, int[] tableCellEdges, int currentRowIndex, int currentColumnIndex, TableCell tableCell)PicturesManagergetPicturesManager()protected abstract voidoutputCharacters(Element block, CharacterRun characterRun, String text)protected abstract voidprocessBookmarks(HWPFDocumentCore wordDocument, Element currentBlock, Range range, int currentTableLevel, List<Bookmark> rangeBookmarks)Wrap range into bookmark(s) and process it.protected booleanprocessCharacters(HWPFDocumentCore wordDocument, int currentTableLevel, Range range, Element block)protected voidprocessDeadField(HWPFDocumentCore wordDocument, Element currentBlock, Range range, int currentTableLevel, int beginMark, int separatorMark, int endMark)voidprocessDocument(HWPFDocumentCore wordDocument)protected abstract voidprocessDocumentInformation(SummaryInformation summaryInformation)protected voidprocessDocumentPart(HWPFDocumentCore wordDocument, Range range)protected abstract voidprocessDrawnObject(HWPFDocument doc, CharacterRun characterRun, OfficeDrawing officeDrawing, String path, Element block)protected voidprocessDrawnObject(HWPFDocument doc, CharacterRun characterRun, Element block)protected voidprocessDropDownList(Element block, CharacterRun characterRun, String[] values, int defaultIndex)protected abstract voidprocessEndnoteAutonumbered(HWPFDocument wordDocument, int noteIndex, Element block, Range endnoteTextRange)protected voidprocessField(HWPFDocument wordDocument, Range parentRange, int currentTableLevel, Field field, Element currentBlock)protected abstract voidprocessFootnoteAutonumbered(HWPFDocument wordDocument, int noteIndex, Element block, Range footnoteTextRange)protected abstract voidprocessHyperlink(HWPFDocumentCore wordDocument, Element currentBlock, Range textRange, int currentTableLevel, String hyperlink)protected voidprocessImage(Element currentBlock, boolean inlined, Picture picture)protected abstract voidprocessImage(Element currentBlock, boolean inlined, Picture picture, String url)protected abstract voidprocessImageWithoutPicturesManager(Element currentBlock, boolean inlined, Picture picture)protected abstract voidprocessLineBreak(Element block, CharacterRun characterRun)protected voidprocessNoteAnchor(HWPFDocument doc, CharacterRun characterRun, Element block)protected booleanprocessOle2(HWPFDocument wordDocument, Element block, Entry entry)protected abstract voidprocessPageBreak(HWPFDocumentCore wordDocument, Element flow)protected abstract voidprocessPageref(HWPFDocumentCore wordDocument, Element currentBlock, Range textRange, int currentTableLevel, String pageref)protected abstract voidprocessParagraph(HWPFDocumentCore wordDocument, Element parentElement, int currentTableLevel, Paragraph paragraph, String bulletText)protected voidprocessParagraphes(HWPFDocumentCore wordDocument, Element flow, Range range, int currentTableLevel)protected abstract voidprocessSection(HWPFDocumentCore wordDocument, Section section, int s)protected voidprocessSingleSection(HWPFDocumentCore wordDocument, Section section)protected voidprocessSymbol(HWPFDocument doc, CharacterRun characterRun, Element block)protected abstract voidprocessTable(HWPFDocumentCore wordDocument, Element flow, Table table)voidsetFontReplacer(FontReplacer fontReplacer)voidsetPicturesManager(PicturesManager fileManager)protected inttryDeadField(HWPFDocumentCore wordDocument, Range range, int currentTableLevel, int beginMark, Element currentBlock)
-
-
-
Field Detail
-
UNICODECHAR_NO_BREAK_SPACE
protected static final char UNICODECHAR_NO_BREAK_SPACE
- See Also:
- Constant Field Values
-
UNICODECHAR_NONBREAKING_HYPHEN
protected static final char UNICODECHAR_NONBREAKING_HYPHEN
- See Also:
- Constant Field Values
-
UNICODECHAR_ZERO_WIDTH_SPACE
protected static final char UNICODECHAR_ZERO_WIDTH_SPACE
- See Also:
- Constant Field Values
-
-
Method Detail
-
afterProcess
protected void afterProcess()
Special actions that need to be called after processing complete, like updating stylesheets or building document notes list. Usually they are called once, but it's okay to call them several times.
-
getCharacterRunTriplet
protected FontReplacer.Triplet getCharacterRunTriplet(CharacterRun characterRun)
-
getDocument
public abstract Document getDocument()
-
getFontReplacer
public FontReplacer getFontReplacer()
-
getNumberColumnsSpanned
protected int getNumberColumnsSpanned(int[] tableCellEdges, int currentEdgeIndex, TableCell tableCell)
-
getNumberRowsSpanned
protected int getNumberRowsSpanned(Table table, int[] tableCellEdges, int currentRowIndex, int currentColumnIndex, TableCell tableCell)
-
getPicturesManager
public PicturesManager getPicturesManager()
-
outputCharacters
protected abstract void outputCharacters(Element block, CharacterRun characterRun, String text)
-
processBookmarks
protected abstract void processBookmarks(HWPFDocumentCore wordDocument, Element currentBlock, Range range, int currentTableLevel, List<Bookmark> rangeBookmarks)
Wrap range into bookmark(s) and process it. All bookmarks have starts equal to range start and ends equal to range end. Usually it's only one bookmark.
-
processCharacters
protected boolean processCharacters(HWPFDocumentCore wordDocument, int currentTableLevel, Range range, Element block)
-
processDeadField
protected void processDeadField(HWPFDocumentCore wordDocument, Element currentBlock, Range range, int currentTableLevel, int beginMark, int separatorMark, int endMark)
-
processDocument
public void processDocument(HWPFDocumentCore wordDocument)
-
processDocumentInformation
protected abstract void processDocumentInformation(SummaryInformation summaryInformation)
-
processDocumentPart
protected void processDocumentPart(HWPFDocumentCore wordDocument, Range range)
-
processDrawnObject
protected void processDrawnObject(HWPFDocument doc, CharacterRun characterRun, Element block)
-
processDrawnObject
protected abstract void processDrawnObject(HWPFDocument doc, CharacterRun characterRun, OfficeDrawing officeDrawing, String path, Element block)
-
processDropDownList
protected void processDropDownList(Element block, CharacterRun characterRun, String[] values, int defaultIndex)
-
processEndnoteAutonumbered
protected abstract void processEndnoteAutonumbered(HWPFDocument wordDocument, int noteIndex, Element block, Range endnoteTextRange)
-
processField
protected void processField(HWPFDocument wordDocument, Range parentRange, int currentTableLevel, Field field, Element currentBlock)
-
processFootnoteAutonumbered
protected abstract void processFootnoteAutonumbered(HWPFDocument wordDocument, int noteIndex, Element block, Range footnoteTextRange)
-
processHyperlink
protected abstract void processHyperlink(HWPFDocumentCore wordDocument, Element currentBlock, Range textRange, int currentTableLevel, String hyperlink)
-
processImage
protected abstract void processImage(Element currentBlock, boolean inlined, Picture picture, String url)
-
processImageWithoutPicturesManager
@Internal protected abstract void processImageWithoutPicturesManager(Element currentBlock, boolean inlined, Picture picture)
-
processLineBreak
protected abstract void processLineBreak(Element block, CharacterRun characterRun)
-
processNoteAnchor
protected void processNoteAnchor(HWPFDocument doc, CharacterRun characterRun, Element block)
-
processOle2
protected boolean processOle2(HWPFDocument wordDocument, Element block, Entry entry) throws Exception
- Throws:
Exception
-
processPageBreak
protected abstract void processPageBreak(HWPFDocumentCore wordDocument, Element flow)
-
processPageref
protected abstract void processPageref(HWPFDocumentCore wordDocument, Element currentBlock, Range textRange, int currentTableLevel, String pageref)
-
processParagraph
protected abstract void processParagraph(HWPFDocumentCore wordDocument, Element parentElement, int currentTableLevel, Paragraph paragraph, String bulletText)
-
processParagraphes
protected void processParagraphes(HWPFDocumentCore wordDocument, Element flow, Range range, int currentTableLevel)
-
processSection
protected abstract void processSection(HWPFDocumentCore wordDocument, Section section, int s)
-
processSingleSection
protected void processSingleSection(HWPFDocumentCore wordDocument, Section section)
-
processSymbol
protected void processSymbol(HWPFDocument doc, CharacterRun characterRun, Element block)
-
processTable
protected abstract void processTable(HWPFDocumentCore wordDocument, Element flow, Table table)
-
setFontReplacer
public void setFontReplacer(FontReplacer fontReplacer)
-
setPicturesManager
public void setPicturesManager(PicturesManager fileManager)
-
tryDeadField
protected int tryDeadField(HWPFDocumentCore wordDocument, Range range, int currentTableLevel, int beginMark, Element currentBlock)
-
-