Class Containerization
java.lang.Object
org.docx4j.convert.out.common.preprocess.Containerization
In Word, adjacent paragraphs with the same borders are enclosed in a single border
(unless bullets/numbering apply).
Similarly with shading. (If the 2 paragraphs are shaded different colors, then the
color of the first extends to the start of the second, so there is no white strip
between them).
To do the same in HTML and PDF output, we put matching paragraphs into a content
control, and set the border/shading on that. This gives us an appropriate
div or fo:block.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidprivate static booleanborderChanged(CTBorder currentBorder, CTBorder lastBorder) private static booleanbordersChanged(PPrBase.PBdr currentBorders, PPrBase.PBdr lastBorders) private static SdtBlockprivate static SdtBlockprivate static RPrfindBlockRPr(SdtBlock currentBlock) protected static voidgroupAdjacentBorders(List<Object> content) groupBodyContent(List<Object> bodyElts) private static voidgroupTable(Tbl table) static voidprocess(WordprocessingMLPackage wmlPackage) private static booleanshadingChanged(CTShd currentShading, CTShd lastShading)
-
Field Details
-
log
private static org.slf4j.Logger log -
TAG_SHADING
- See Also:
-
TAG_BORDERS
- See Also:
-
TAG_RPR
- See Also:
-
-
Constructor Details
-
Containerization
public Containerization()
-
-
Method Details
-
process
-
groupAdjacentBorders
-
groupTable
-
groupBodyContent
-
groupRuns
-
appendRun
-
findBlockRPr
-
createSdt
-
createSdt
-
bordersChanged
-
borderChanged
-
shadingChanged
-