Class MultilevelNumberingSupport
java.lang.Object
com.scroogexhtml.xmldom.numbering.MultilevelNumberingSupport
- All Implemented Interfaces:
NumberingWriter
This class provides list support.
-
Field Summary
Fields inherited from interface com.scroogexhtml.xmldom.numbering.NumberingWriter
NO_LIST_INDEX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateListItem(Element externalParent) Creates a list item, as the Object Pascal product does (TSxOutputWriter.PrepareListLevel): closes every list whose lowest level is above the item's level, and the list that would take the item if it belongs to a different list (\lsN) or has a different number type, so two lists at the same level are not merged; the root list is closed too, and a new one follows it inexternalParentopens one nested list, under the last item, also for an increase by several levels (valid HTML, the depth is compressed).intbooleanvoidsetListIndex(int value) Sets the list (\lsN) of the next list item; items of different lists at the same level go in separate lists.voidsetListLevel(int value) Sets the list level of the current paragraph (\ilvlN).voidsetNumberingStyle(boolean value) voidsetNumberType(NumberType value)
-
Constructor Details
-
MultilevelNumberingSupport
-
MultilevelNumberingSupport
- Parameters:
doc- the documentbudget- the output budget of the conversion, or null for no limits
-
-
Method Details
-
setListLevel
public void setListLevel(int value) Sets the list level of the current paragraph (\ilvlN). The nesting changes when its list item is created, so it does not matter whether \ilvlN comes before or after \lsN.- Specified by:
setListLevelin interfaceNumberingWriter
-
getListLevel
public int getListLevel()- Specified by:
getListLevelin interfaceNumberingWriter
-
setListIndex
public void setListIndex(int value) Description copied from interface:NumberingWriterSets the list (\lsN) of the next list item; items of different lists at the same level go in separate lists.- Specified by:
setListIndexin interfaceNumberingWriter- Parameters:
value- the list override index, orNumberingWriter.NO_LIST_INDEX
-
setNumberType
- Specified by:
setNumberTypein interfaceNumberingWriter
-
setNumberingStyle
public void setNumberingStyle(boolean value) - Specified by:
setNumberingStylein interfaceNumberingWriter
-
isNumberingStyle
public boolean isNumberingStyle()- Specified by:
isNumberingStylein interfaceNumberingWriter
-
createListItem
Creates a list item, as the Object Pascal product does (TSxOutputWriter.PrepareListLevel):- closes every list whose lowest level is above the item's level,
and the list that would take the item if it belongs to a different
list (
\lsN) or has a different number type, so two lists at the same level are not merged; the root list is closed too, and a new one follows it inexternalParent - opens one nested list, under the last item, also for an increase by several levels (valid HTML, the depth is compressed). The list takes the levels from the previous level + 1, so a later decrease to any level in between still ends up in it (0, 3, 1: the level-1 item goes under the level-0 item, not back into the root list).
externalParent, so the items of each table cell form their own list (\cellends a list paragraph like\par). The root list takes any level, so a list that starts at level 2 starts at the top. An increase by several levels must not be undone by climbing one list per level: that climbed out of the root list into the surrounding element and the document node (DOMException HIERARCHY_REQUEST_ERR, found by fuzzing).- Specified by:
createListItemin interfaceNumberingWriter
- closes every list whose lowest level is above the item's level,
and the list that would take the item if it belongs to a different
list (
-