java.lang.Object
fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
fr.opensagres.poi.xwpf.converter.xhtml.internal.XHTMLMapper
All Implemented Interfaces:
fr.opensagres.poi.xwpf.converter.core.IMasterPageHandler<XHTMLMasterPage>

public class XHTMLMapper extends fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
  • Field Summary

    Fields inherited from class fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor

    document, options, processingTotalPageCountField, stylesDocument, totalPageFieldUsed
  • Constructor Summary

    Constructors
    Constructor
    Description
    XHTMLMapper(org.apache.poi.xwpf.usermodel.XWPFDocument document, ContentHandler contentHandler, XHTMLOptions options)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addNewLine(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br, Object paragraphContainer)
     
    createMasterPage(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr)
     
    protected fr.opensagres.poi.xwpf.converter.core.styles.XWPFStylesDocument
    createStylesDocument(org.apache.poi.xwpf.usermodel.XWPFDocument document)
     
    protected void
     
    protected void
    endVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph, Object parentContainer, Object paragraphContainer)
     
    protected void
    endVisitSDT(org.apache.poi.xwpf.usermodel.XWPFSDT contents, Object container, Object sdtContainer)
     
    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)
     
     
    protected void
     
    void
     
    protected Object
     
    protected Object
    startVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph, fr.opensagres.poi.xwpf.converter.core.ListItemContext itemContext, Object parentContainer)
     
    protected Object
    startVisitSDT(org.apache.poi.xwpf.usermodel.XWPFSDT contents, Object container)
     
    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
    visitStyleText(org.apache.poi.xwpf.usermodel.XWPFRun run, String text, Object parent, boolean pageNumber)
     
    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)
     
    protected void
    visitVmlPicture(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPicture picture, Object pdfParentContainer)
     

    Methods inherited from class fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor

    getBodyElements, getImageExtractor, getMasterPageManager, getOptions, getPictureData, getPictureDataByID, getXWPFAbstractNum, getXWPFFooter, getXWPFHeader, getXWPFNum, getXWPFStyle, hasTextStyles, isWordDocumentPartParsing, start, visitAnchor, visitBodyElements, visitBR, visitCell, visitDrawing, visitFooterRef, visitHeaderRef, visitInline, visitParagraph, visitParagraphBody, visitSDT, visitSDTBody, visitTable, visitTableBody, visitTableCellBody, visitTableRow

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • createStylesDocument

      protected fr.opensagres.poi.xwpf.converter.core.styles.XWPFStylesDocument createStylesDocument(org.apache.poi.xwpf.usermodel.XWPFDocument document) throws org.apache.xmlbeans.XmlException, IOException
      Overrides:
      createStylesDocument in class fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
      Throws:
      org.apache.xmlbeans.XmlException
      IOException
    • startVisitDocument

      protected Object startVisitDocument() throws Exception
      Specified by:
      startVisitDocument in class fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
      Throws:
      Exception
    • endVisitDocument

      protected void endVisitDocument() throws Exception
      Specified by:
      endVisitDocument in class fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
      Throws:
      Exception
    • startVisitSDT

      protected Object startVisitSDT(org.apache.poi.xwpf.usermodel.XWPFSDT contents, Object container) throws SAXException
      Specified by:
      startVisitSDT in class fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
      Throws:
      SAXException
    • endVisitSDT

      protected void endVisitSDT(org.apache.poi.xwpf.usermodel.XWPFSDT contents, Object container, Object sdtContainer) throws SAXException
      Specified by:
      endVisitSDT in class fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
      Throws:
      SAXException
    • startVisitParagraph

      protected Object startVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph, fr.opensagres.poi.xwpf.converter.core.ListItemContext itemContext, Object parentContainer) throws Exception
      Specified by:
      startVisitParagraph in class fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
      Throws:
      Exception
    • visitEmptyRun

      protected void visitEmptyRun(Object paragraphContainer) throws Exception
      Specified by:
      visitEmptyRun in class fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
      Throws:
      Exception
    • visitStyleText

      protected void visitStyleText(org.apache.poi.xwpf.usermodel.XWPFRun run, String text, Object parent, boolean pageNumber) throws Exception
      Overrides:
      visitStyleText in class fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
      Throws:
      Exception
    • pageBreak

      protected void pageBreak() throws Exception
      Specified by:
      pageBreak in class fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.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 fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
      Throws:
      Exception
    • visitVmlPicture

      protected void visitVmlPicture(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPicture picture, Object pdfParentContainer) throws Exception
      Specified by:
      visitVmlPicture in class fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>
      Throws:
      Exception
    • setActiveMasterPage

      public void setActiveMasterPage(XHTMLMasterPage masterPage)
    • createMasterPage

      public XHTMLMasterPage createMasterPage(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr)
    • getStylesDocument

      public CSSStylesDocument getStylesDocument()
      Specified by:
      getStylesDocument in interface fr.opensagres.poi.xwpf.converter.core.IMasterPageHandler<XHTMLMasterPage>
      Overrides:
      getStylesDocument in class fr.opensagres.poi.xwpf.converter.core.XWPFDocumentVisitor<Object,XHTMLOptions,XHTMLMasterPage>