org.apache.poi.xwpf.converter.xhtml.internal
Class XHTMLMapper
java.lang.Object
org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
org.apache.poi.xwpf.converter.xhtml.internal.XHTMLMapper
public class XHTMLMapper
- extends XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
Method Summary |
protected void |
addNewLine(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br,
Object paragraphContainer)
|
protected IXWPFMasterPage |
createMasterPage(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr)
Create an instance of master page. |
protected XWPFStylesDocument |
createStylesDocument(org.apache.poi.xwpf.usermodel.XWPFDocument document)
|
protected void |
endVisitDocument()
End of visit document. |
protected void |
endVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
Object parentContainer,
Object paragraphContainer)
|
protected void |
endVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table,
Object parentContainer,
Object tableContainer)
|
protected void |
endVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
Object tableContainer,
Object tableCellContainer)
|
protected void |
endVisitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row,
Object tableContainer,
boolean firstRow,
boolean lastRow,
boolean headerRow)
|
CSSStylesDocument |
getStylesDocument()
|
protected void |
pageBreak()
|
protected void |
setActiveMasterPage(XHTMLMasterPage masterPage)
Set active master page. |
protected Object |
startVisitDocument()
Start of visit document. |
protected Object |
startVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
ListItemContext itemContext,
Object parentContainer)
|
protected Object |
startVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table,
float[] colWidths,
Object tableContainer)
|
protected Object |
startVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
Object tableContainer,
boolean firstRow,
boolean lastRow,
boolean firstCell,
boolean lastCell,
List<org.apache.poi.xwpf.usermodel.XWPFTableCell> vMergeCells)
|
protected void |
startVisitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row,
Object tableContainer,
int rowIndex,
boolean headerRow)
|
protected void |
visitBookmark(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBookmark bookmark,
org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
Object paragraphContainer)
|
protected void |
visitEmptyRun(Object paragraphContainer)
|
protected void |
visitFooter(org.apache.poi.xwpf.usermodel.XWPFFooter footer,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef footerRef,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
XHTMLMasterPage masterPage)
|
protected void |
visitHeader(org.apache.poi.xwpf.usermodel.XWPFHeader header,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef headerRef,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
XHTMLMasterPage masterPage)
|
protected void |
visitPicture(org.openxmlformats.schemas.drawingml.x2006.picture.CTPicture picture,
Float offsetX,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromH.Enum relativeFromH,
Float offsetY,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromV.Enum relativeFromV,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STWrapText.Enum wrapText,
Object parentContainer)
|
protected void |
visitRun(org.apache.poi.xwpf.usermodel.XWPFRun run,
boolean pageNumber,
String url,
Object paragraphContainer)
|
protected void |
visitTab(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPTab o,
Object paragraphContainer)
|
protected void |
visitTabs(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTabs tabs,
Object paragraphContainer)
|
protected void |
visitText(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText ctText,
boolean pageNumber,
Object paragraphContainer)
|
Methods inherited from class org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor |
getBodyElements, getImageExtractor, getMasterPageManager, getOptions, getPictureData, getPictureDataByID, getXWPFAbstractNum, getXWPFFooter, getXWPFHeader, getXWPFNum, getXWPFStyle, isWordDocumentPartParsing, start, visitAnchor, visitBodyElements, visitBR, visitCell, visitDrawing, visitFooterRef, visitHeaderRef, visitInline, visitParagraph, visitParagraphBody, visitTable, visitTableBody, visitTableCellBody, visitTableRow |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XHTMLMapper
public XHTMLMapper(org.apache.poi.xwpf.usermodel.XWPFDocument document,
ContentHandler contentHandler,
XHTMLOptions options)
throws Exception
- Throws:
Exception
createStylesDocument
protected XWPFStylesDocument createStylesDocument(org.apache.poi.xwpf.usermodel.XWPFDocument document)
throws org.apache.xmlbeans.XmlException,
IOException
- Overrides:
createStylesDocument
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
org.apache.xmlbeans.XmlException
IOException
startVisitDocument
protected Object startVisitDocument()
throws Exception
- Description copied from class:
XWPFDocumentVisitor
- Start of visit document.
- Specified by:
startVisitDocument
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Returns:
-
- Throws:
Exception
endVisitDocument
protected void endVisitDocument()
throws Exception
- Description copied from class:
XWPFDocumentVisitor
- End of visit document.
- Specified by:
endVisitDocument
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
startVisitParagraph
protected Object startVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
ListItemContext itemContext,
Object parentContainer)
throws Exception
- Specified by:
startVisitParagraph
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
endVisitParagraph
protected void endVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
Object parentContainer,
Object paragraphContainer)
throws Exception
- Specified by:
endVisitParagraph
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
visitRun
protected void visitRun(org.apache.poi.xwpf.usermodel.XWPFRun run,
boolean pageNumber,
String url,
Object paragraphContainer)
throws Exception
- Overrides:
visitRun
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
visitEmptyRun
protected void visitEmptyRun(Object paragraphContainer)
throws Exception
- Specified by:
visitEmptyRun
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
visitText
protected void visitText(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText ctText,
boolean pageNumber,
Object paragraphContainer)
throws Exception
- Specified by:
visitText
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
visitTab
protected void visitTab(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPTab o,
Object paragraphContainer)
throws Exception
- Specified by:
visitTab
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
visitTabs
protected void visitTabs(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTabs tabs,
Object paragraphContainer)
throws Exception
- Specified by:
visitTabs
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
addNewLine
protected void addNewLine(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br,
Object paragraphContainer)
throws Exception
- Specified by:
addNewLine
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
pageBreak
protected void pageBreak()
throws Exception
- Specified by:
pageBreak
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
visitBookmark
protected void visitBookmark(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBookmark bookmark,
org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
Object paragraphContainer)
throws Exception
- Specified by:
visitBookmark
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
startVisitTable
protected Object startVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table,
float[] colWidths,
Object tableContainer)
throws Exception
- Specified by:
startVisitTable
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
endVisitTable
protected void endVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table,
Object parentContainer,
Object tableContainer)
throws Exception
- Specified by:
endVisitTable
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
startVisitTableRow
protected void startVisitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row,
Object tableContainer,
int rowIndex,
boolean headerRow)
throws Exception
- Overrides:
startVisitTableRow
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
endVisitTableRow
protected void endVisitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row,
Object tableContainer,
boolean firstRow,
boolean lastRow,
boolean headerRow)
throws Exception
- Overrides:
endVisitTableRow
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
startVisitTableCell
protected Object startVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
Object tableContainer,
boolean firstRow,
boolean lastRow,
boolean firstCell,
boolean lastCell,
List<org.apache.poi.xwpf.usermodel.XWPFTableCell> vMergeCells)
throws Exception
- Specified by:
startVisitTableCell
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
endVisitTableCell
protected void endVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
Object tableContainer,
Object tableCellContainer)
throws Exception
- Specified by:
endVisitTableCell
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
visitHeader
protected void visitHeader(org.apache.poi.xwpf.usermodel.XWPFHeader header,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef headerRef,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
XHTMLMasterPage masterPage)
throws Exception
- Specified by:
visitHeader
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
visitFooter
protected void visitFooter(org.apache.poi.xwpf.usermodel.XWPFFooter footer,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef footerRef,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
XHTMLMasterPage masterPage)
throws Exception
- Specified by:
visitFooter
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
visitPicture
protected void visitPicture(org.openxmlformats.schemas.drawingml.x2006.picture.CTPicture picture,
Float offsetX,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromH.Enum relativeFromH,
Float offsetY,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromV.Enum relativeFromV,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STWrapText.Enum wrapText,
Object parentContainer)
throws Exception
- Specified by:
visitPicture
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Throws:
Exception
setActiveMasterPage
protected void setActiveMasterPage(XHTMLMasterPage masterPage)
- Description copied from class:
XWPFDocumentVisitor
- Set active master page.
- Specified by:
setActiveMasterPage
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
createMasterPage
protected IXWPFMasterPage createMasterPage(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr)
- Description copied from class:
XWPFDocumentVisitor
- Create an instance of master page.
- Specified by:
createMasterPage
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
- Returns:
getStylesDocument
public CSSStylesDocument getStylesDocument()
- Overrides:
getStylesDocument
in class XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
Copyright © 2013. All rights reserved.