Package writer2latex.office
Class TocReader
java.lang.Object
writer2latex.office.TocReader
The class reads a text:table-of-content element.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetIndexSourceStyleLevel(String sStyleName) Get the level associated with a specific index source styleGet a set view of all index source stylesGet the index title template for this tocgetName()Get the (section) name for this tocintGet max outline level for this tocGet the (section) style name for this tocgetTocEntryTemplate(int nLevel) Get the entry template for this toc at a specific levelbooleanIs this toc by chapter?booleanDo we use toc marks in this toc?booleanDo we use additional styles in this toc?booleanDo we use outline (headings) in this toc?
-
Constructor Details
-
TocReader
Initialize the TocReader with a table of content node.
- Parameters:
onode- atext:table-of-content
-
-
Method Details
-
getName
Get the (section) name for this toc
- Returns:
- the name of the toc
-
getStyleName
Get the (section) style name for this toc
- Returns:
- name of the section style to use for this toc
-
getOutlineLevel
public int getOutlineLevel()Get max outline level for this toc
- Returns:
- max outline level
-
useOutlineLevel
public boolean useOutlineLevel()Do we use outline (headings) in this toc?
- Returns:
- true if headings should be used
-
useIndexSourceStyles
public boolean useIndexSourceStyles()Do we use additional styles in this toc?
- Returns:
- true if additional styles should be used
-
useIndexMarks
public boolean useIndexMarks()Do we use toc marks in this toc?
- Returns:
- true if toc marks should be used
-
isByChapter
public boolean isByChapter()Is this toc by chapter?
- Returns:
- true if the scope is a chapter only
-
getIndexTitleTemplate
Get the index title template for this toc
- Returns:
- the
text:index-title-templateelement, or null
-
getTocEntryTemplate
Get the entry template for this toc at a specific level
- Parameters:
nLevel- the outline level- Returns:
- the
text:table-of-content-entry-templateelement, or null
-
getIndexSourceStyles
Get a set view of all index source styles
- Returns:
- a set of all index source style names
-
getIndexSourceStyleLevel
Get the level associated with a specific index source style
- Parameters:
sStyleName- the style name of the index source style- Returns:
- the level or -1 if the style is not used in this toc
-