Class TocEntry

java.lang.Object
org.docx4j.toc.TocEntry

public class TocEntry extends Object
  • Field Details

    • log

      private static org.slf4j.Logger log
    • propertyResolver

      private PropertyResolver propertyResolver
    • PRESERVE

      private static final String PRESERVE
      See Also:
    • PAGEREF_MASK

      private static final String PAGEREF_MASK
      See Also:
    • writableWidthTwips

      private int writableWidthTwips
      right tab pos= pg width – (gutter + left + right margin) best to put that explicitly in the ToC p, rather than the toc styles (which we just override) Word doesn’t update the right tab pos (where its in a ToC style) in response to a change in margin!
      Since:
      3.2.0
    • leader

      private STTabTlc leader
    • entryValues

      private List<R> entryValues
    • anchorValue

      private String anchorValue
    • number

      private String number
    • entryLevel

      private int entryLevel
    • pageNumber

      private boolean pageNumber
    • isNumbered

      private boolean isNumbered
      If this ToC entry has a paragraph number, we'll need to allow for that in our tabs definition
    • entryP

      private P entryP
    • pageNumberText

      private Text pageNumberText
    • wmlObjectFactory

      ObjectFactory wmlObjectFactory
    • styleIndent

      private Map<String,PPrBase.Ind> styleIndent
    • numChars

      int numChars
  • Constructor Details

  • Method Details

    • getEntryValue

      public List<R> getEntryValue()
    • setAnchorValue

      public void setAnchorValue(String anchorValue)
    • getAnchorValue

      public String getAnchorValue()
    • makeHyperlink

      public void makeHyperlink(boolean hyperlink)
    • addPageNumber

      public void addPageNumber(boolean pageNumber)
    • isPageNumber

      public boolean isPageNumber()
    • getEntryLevel

      public int getEntryLevel()
    • setEntryLevel

      public void setEntryLevel(int entryLevel)
    • getEntryParagraph

      public P getEntryParagraph(TocStyles tocStyles)
    • getEntryPageNumberText

      public Text getEntryPageNumberText()
    • generateTocEntry

      private P generateTocEntry(TocStyles tocStyles)
    • getInd

      private PPrBase.Ind getInd(String styleId)
    • generateTocEntryPPr

      private PPr generateTocEntryPPr(TocStyles tocStyles)
    • generateTocEntryHyperlink

      private jakarta.xml.bind.JAXBElement<P.Hyperlink> generateTocEntryHyperlink()
    • generateTocEntryContent

      private List<R> generateTocEntryContent()
    • generateTocEntryPageNumber

      private void generateTocEntryPageNumber(List<R> rList)
    • setEntryValue

      public void setEntryValue(P sourceP)
    • getEffectiveRPr

      private RPr getEffectiveRPr(RPr expressRPr)
      Get the rPr to apply. This intentionally ignores pStyle and doc defaults. The TOC entry will ultimately use TOCn style; we're not interested in the pStyle of this paragraph.
      Parameters:
      expressRPr -
      Returns:
    • nullify

      private void nullify(RPr destination)
    • numberEntry

      public void numberEntry(Emulator.ResultTriple numberTriple)
      Number this entry, if necessary
      Parameters:
      numberTriple -
    • tabAfterPNumber

      private R tabAfterPNumber()
      Add a tab, but in a new run (since the tab isn't to be underlined), unless w:lvl has <w:suff w:val="space"/> or <w:suff w:val="nothing"/>