Package org.docx4j.convert.out.html
Class ListsToContentControls
java.lang.Object
org.docx4j.convert.out.html.ListsToContentControls
Create list items in OL or UL (as appropriate).
We can't just use a LinkedList (stack) of list contexts,
which we push and pop, since we have to write complete
XML elements (as opposed to opening and closing tags).
So this means either extending org.docx4j.model.structure.jaxb
beyond sections, or some other approach, like wrapping
list items in a content control. Let's try that.
That's like org.docx4j.convert.out.common.preprocess.Containerization
So we have a 2 step process:
1. insert the content controls
2. use an SdtWriter to turn these into UL or OL.
This class does step 1.
Step 2 is implemented by SdtToListSdtTagHandler; it will only be used if you invoke
SdtWriter.registerTagHandler("HTML_ELEMENT", new SdtToListSdtTagHandler())
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.slf4j.Loggerprivate MainDocumentPartprivate NumberingDefinitionsPartprivate PropertyResolverprivate StyleDefinitionsPartprivate WordprocessingMLPackage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidgroupContent(List<Object> bodyElts) private voidprocess()static voidprocess(WordprocessingMLPackage wmlPackage) private voidsetTag(SdtBlock sdtList, BigInteger numId, BigInteger ilvl)
-
Field Details
-
log
public static org.slf4j.Logger log -
wmlPackage
-
mainDocument
-
ndp
-
stylesPart
-
propertyResolver
-
listStack
-
-
Constructor Details
-
ListsToContentControls
-
-
Method Details
-
process
-
process
private void process() -
closeAllLists
private void closeAllLists() -
setTag
-
groupContent
-