Package org.docx4j.convert.in.xhtml
Class TableHelper
java.lang.Object
org.docx4j.convert.in.xhtml.TableHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidinsertDummyVMergedCells(org.docx4j.wml.ContentAccessor trContext, com.openhtmltopdf.newtable.TableCellBox tcb, boolean backwards) Rowspan and colspan support.protected booleanisTableStyle(org.docx4j.wml.Style s) protected voidnestedTableHierarchyFix(org.docx4j.wml.ContentAccessor contentContext, com.openhtmltopdf.render.Box parent) nested tables XHTML renderer seems to construct a tree: table/table instead of table/tr/td/table? TODO fix this upstream.protected voidsetupTblGrid(com.openhtmltopdf.newtable.TableBox cssTable, org.docx4j.wml.Tbl tbl, XHTMLImporterImpl.TableProperties tableProperties) protected voidsetupTblPr(com.openhtmltopdf.newtable.TableBox cssTable, org.docx4j.wml.Tbl tbl, XHTMLImporterImpl.TableProperties tableProperties) protected voidsetupTcPr(com.openhtmltopdf.newtable.TableCellBox tcb, org.docx4j.wml.Tc tc, XHTMLImporterImpl.TableProperties tableProperties) protected voidsetupTrPr(com.openhtmltopdf.newtable.TableRowBox trBox, org.docx4j.wml.Tr tr) protected inttableIndentContrib(LinkedList<org.docx4j.wml.ContentAccessor> contentContextStack) Where list item indentation is affected by the presence of tables, we could adjust for this in the numbering, or in an ad hoc property.
-
Field Details
-
log
public static org.slf4j.Logger log
-
-
Constructor Details
-
TableHelper
-
-
Method Details
-
setupTblPr
protected void setupTblPr(com.openhtmltopdf.newtable.TableBox cssTable, org.docx4j.wml.Tbl tbl, XHTMLImporterImpl.TableProperties tableProperties) - Parameters:
cssTable-tbl-tableProperties-
-
setupTblGrid
protected void setupTblGrid(com.openhtmltopdf.newtable.TableBox cssTable, org.docx4j.wml.Tbl tbl, XHTMLImporterImpl.TableProperties tableProperties) -
setupTrPr
protected void setupTrPr(com.openhtmltopdf.newtable.TableRowBox trBox, org.docx4j.wml.Tr tr) -
setupTcPr
protected void setupTcPr(com.openhtmltopdf.newtable.TableCellBox tcb, org.docx4j.wml.Tc tc, XHTMLImporterImpl.TableProperties tableProperties) -
insertDummyVMergedCells
protected void insertDummyVMergedCells(org.docx4j.wml.ContentAccessor trContext, com.openhtmltopdf.newtable.TableCellBox tcb, boolean backwards) Rowspan and colspan support. Search for lower parts of vertically merged cells, adjacent to current cell in given direction. Then insert the appropriate number of dummy cells, with the same horizontal merging as in their top parts into row context.- Parameters:
trContext- context of the row to insert dummies intotcb- current cellbackwards- direction flag: if true, then scan to the left
-
nestedTableHierarchyFix
protected void nestedTableHierarchyFix(org.docx4j.wml.ContentAccessor contentContext, com.openhtmltopdf.render.Box parent) nested tables XHTML renderer seems to construct a tree: table/table instead of table/tr/td/table? TODO fix this upstream. TestCase is http://en.wikipedia.org/wiki/Office_Open_XML- Parameters:
contentContext-parent-
-
isTableStyle
protected boolean isTableStyle(org.docx4j.wml.Style s) -
tableIndentContrib
Where list item indentation is affected by the presence of tables, we could adjust for this in the numbering, or in an ad hoc property. Which is better? Ad hoc property is better, since in a contrived example, not all list items are in the table. See example src/test/resources/numbering/indents_with_tables.html- Returns:
-