Class DocxContextImpl<T>
- java.lang.Object
-
- com.vladsch.flexmark.docx.converter.util.DocxContextImpl<T>
-
- All Implemented Interfaces:
BlockFormatProvider<T>
,ContentContainer
,DocxContext<T>
,DocxContextFrameProvider<T>
,FormatProvider<T>
,ParaContainer
,RunContainer
,RunFormatProvider<T>
public abstract class DocxContextImpl<T> extends java.lang.Object implements DocxContext<T>, BlockFormatProvider<T>, RunFormatProvider<T>, ParaContainer, RunContainer, ContentContainer
-
-
Field Summary
Fields Modifier and Type Field Description protected BlockFormatProvider<T>
myBlockFormatProvider
protected java.util.HashMap<T,BlockFormatProvider<T>>
myBlockFormatProviders
protected java.util.concurrent.atomic.AtomicInteger
myBookmarkID
protected ContentContainer
myContentContainer
protected org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart
myDocumentPart
protected DocxHelper
myDocxHelper
protected org.docx4j.wml.ObjectFactory
myFactory
protected int
myFootnoteRef
protected java.util.HashMap<org.docx4j.openpackaging.parts.relationships.RelationshipsPart,java.util.HashMap<java.lang.String,org.docx4j.relationships.Relationship>>
myHyperlinks
protected org.docx4j.openpackaging.packages.WordprocessingMLPackage
myPackage
protected ParaContainer
myParaContainer
protected DocxRendererOptions
myRendererOptions
protected RunContainer
myRunContainer
protected RunFormatProvider<T>
myRunFormatProvider
protected java.util.HashMap<T,RunFormatProvider<T>>
myRunFormatProviders
protected DataHolder
options
-
Fields inherited from interface com.vladsch.flexmark.docx.converter.util.BlockFormatProvider
STYLE_TYPE_NUMBERING
-
Fields inherited from interface com.vladsch.flexmark.docx.converter.util.RunFormatProvider
SPACE_PRESERVE
-
-
Constructor Summary
Constructors Constructor Description DocxContextImpl(org.docx4j.openpackaging.packages.WordprocessingMLPackage out, DataHolder options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBlankLine(int size, java.lang.String styleId)
void
addBlankLine(long size, java.lang.String styleId)
void
addBlankLine(java.math.BigInteger size, java.lang.String styleId)
void
addBlankLines(int count)
org.docx4j.wml.RPr
addBold()
void
addBreak(org.docx4j.wml.STBrType breakType)
void
addContentElement(java.lang.Object element)
Add element to contentorg.docx4j.wml.FldChar
addFldChar(org.docx4j.wml.STFldCharType charType, boolean createR)
Create and add wrapped Text element to R element as RInstrTextorg.docx4j.wml.CTFtnEdn
addFootnote(java.math.BigInteger footnoteID)
Add footnote and return itorg.docx4j.wml.Text
addInstrText(java.lang.String value, boolean noProofRPr, boolean createR)
Create and add wrapped Text element to R element as RInstrText set value and optionally space preserve if value starts or ends in a spacevoid
addLineBreak()
Add a line break to current Rvoid
addP(org.docx4j.wml.P p)
add a new P.void
addPageBreak()
void
addR(org.docx4j.wml.R r)
add a new R.org.docx4j.wml.Text
addText(java.lang.String value, boolean noProofRPr, boolean createR)
Create and add wrapped Text element to R element set value and optionally space preserve if value starts or ends in a spacevoid
adjustPPrForFormatting(org.docx4j.wml.PPr pP)
void
close()
finalize, add elements to the document after main part as needed after this method returns no more calls will be made to this providervoid
contextFramed(java.lang.Runnable runnable)
Run within a context, after run the format providers and containers will be restored.org.docx4j.wml.CTMarkupRange
createBookmarkEnd(org.docx4j.wml.CTBookmark bookmarkStart, boolean isBlockBookmark)
Insert bookmark end into current P for given bookmarkorg.docx4j.wml.P.Hyperlink
createBookmarkHyperlink(java.lang.String bookmarkName, java.lang.String linkText)
Get a hyperlink to a bookmark in the documentorg.docx4j.wml.CTBookmark
createBookmarkStart(java.lang.String bookmarkName, boolean isBlockBookmark)
Insert bookmark start into current Porg.docx4j.wml.Color
createColor()
void
createHorizontalLine()
org.docx4j.wml.HpsMeasure
createHpsMeasure(long val)
org.docx4j.wml.P
createP()
Get a new P element for the current blockorg.docx4j.wml.P
createP(java.lang.String style)
org.docx4j.wml.PPrBase.PStyle
createPStyle(java.lang.String style)
org.docx4j.wml.R
createR()
Create R element, with an RPr and add it to current P elementBlockFormatProvider<T>
getBlockFormatProvider()
Get current format providerBlockFormatProvider<T>
getBlockFormatProvider(T node)
BlockFormatProvider<T>
getBlockParent()
java.util.concurrent.atomic.AtomicInteger
getBookmarkIdAtomic()
get the atomic integer used to generate bookmark idsorg.docx4j.wml.BooleanDefaultTrue
getBooleanDefaultTrue(boolean value)
org.docx4j.openpackaging.parts.Part
getContainerPart()
java.util.List<java.lang.Object>
getContent()
Get the content listT
getContextFrame()
org.docx4j.wml.CTShd
getCTShd()
Get CTShd from current R or create rPr if none and CTShd if noneorg.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart
getDocxDocument()
org.docx4j.wml.ObjectFactory
getFactory()
Get the wml object factoryorg.docx4j.openpackaging.parts.WordprocessingML.FootnotesPart
getFootnotesPart()
Get or create FootnotesPart for the documentDocxHelper
getHelper()
org.docx4j.relationships.Relationship
getHyperlinkRelationship(java.lang.String url)
Get an external hyperlink relationship for the given urljava.lang.Object
getLastContentElement()
Get the last added content element.org.docx4j.wml.P
getLastP()
Get the last P of the container or null if there is noneorg.docx4j.wml.R
getLastR()
Get the last R of the container or null if there is noneint
getNextBookmarkId()
Increment the last id and return the idorg.docx4j.wml.P
getP()
Get the last P element for the current blockorg.docx4j.openpackaging.packages.WordprocessingMLPackage
getPackage()
void
getParaRPr(org.docx4j.wml.RPr rPr)
void
getPPr(org.docx4j.wml.PPr pPr)
T
getProviderFrame()
get the node for this formatting blockorg.docx4j.wml.R
getR()
Get last R element of current P or create a new oneorg.docx4j.openpackaging.parts.relationships.RelationshipsPart
getRelationshipsPart()
Get the containers relationship.DocxRendererOptions
getRenderingOptions()
org.docx4j.wml.RPr
getRPr()
void
getRPr(org.docx4j.wml.RPr rPr)
RunFormatProvider<T>
getRunFormatProvider()
RunFormatProvider<T>
getRunFormatProvider(T node)
RunFormatProvider<T>
getRunParent()
org.docx4j.wml.Style
getStyle()
org.docx4j.wml.Style
getStyle(java.lang.String styleName)
Get a paragraph style of given namejava.lang.String
getStyleId()
these are the hard-coded styles on which this block is based used for reference purposes by children to figure out what they need to combinevoid
open()
initialize internal stuff based on the parent for future use optionally add elements to doc before main elements any P creates will call the getPPr(), getParaRPr() and addP() for this provider so don't create elements until you are ready to handle these callsvoid
renderFencedCodeLines(java.lang.CharSequence... lines)
void
renderFencedCodeLines(java.util.List<? extends java.lang.CharSequence> lines)
void
setBlockFormatProvider(BlockFormatProvider<T> formatProvider)
void
setContentContainer(ContentContainer container)
void
setParaContainer(ParaContainer container)
void
setParent(DocxContext<?> parent)
void
setRunContainer(RunContainer container)
void
setRunFormatProvider(RunFormatProvider<T> formatProvider)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vladsch.flexmark.docx.converter.util.DocxContext
addFldChar, addFldCharCreateR, addInstrText, addInstrText, addInstrTextCreateR, addInstrTextCreateR, addText, addText, addTextCreateR, addTextCreateR, addWrappedText, extendRenderingNodeAttributes, extendRenderingNodeAttributes, getNodeFromId, getNodeId, getValidBookmarkName, text
-
-
-
-
Field Detail
-
myPackage
protected final org.docx4j.openpackaging.packages.WordprocessingMLPackage myPackage
-
myDocumentPart
protected final org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart myDocumentPart
-
myFactory
protected final org.docx4j.wml.ObjectFactory myFactory
-
myDocxHelper
protected final DocxHelper myDocxHelper
-
myRendererOptions
protected final DocxRendererOptions myRendererOptions
-
options
protected final DataHolder options
-
myHyperlinks
protected final java.util.HashMap<org.docx4j.openpackaging.parts.relationships.RelationshipsPart,java.util.HashMap<java.lang.String,org.docx4j.relationships.Relationship>> myHyperlinks
-
myBlockFormatProviders
protected java.util.HashMap<T,BlockFormatProvider<T>> myBlockFormatProviders
-
myRunFormatProviders
protected java.util.HashMap<T,RunFormatProvider<T>> myRunFormatProviders
-
myBlockFormatProvider
protected BlockFormatProvider<T> myBlockFormatProvider
-
myRunFormatProvider
protected RunFormatProvider<T> myRunFormatProvider
-
myContentContainer
protected ContentContainer myContentContainer
-
myParaContainer
protected ParaContainer myParaContainer
-
myRunContainer
protected RunContainer myRunContainer
-
myFootnoteRef
protected int myFootnoteRef
-
myBookmarkID
protected java.util.concurrent.atomic.AtomicInteger myBookmarkID
-
-
Constructor Detail
-
DocxContextImpl
public DocxContextImpl(org.docx4j.openpackaging.packages.WordprocessingMLPackage out, DataHolder options)
-
-
Method Detail
-
setParent
public void setParent(DocxContext<?> parent)
-
getContextFrame
public T getContextFrame()
- Specified by:
getContextFrame
in interfaceDocxContextFrameProvider<T>
-
getProviderFrame
public T getProviderFrame()
Description copied from interface:FormatProvider
get the node for this formatting block- Specified by:
getProviderFrame
in interfaceFormatProvider<T>
- Returns:
- node for this format provider
-
getContent
public java.util.List<java.lang.Object> getContent()
Description copied from interface:ContentContainer
Get the content list- Specified by:
getContent
in interfaceContentContainer
- Specified by:
getContent
in interfaceDocxContext<T>
- Returns:
- list of content
-
getLastContentElement
public java.lang.Object getLastContentElement()
Description copied from interface:ContentContainer
Get the last added content element.May not be the last element of
ContentContainer.getContent()
if elements are being inserted into the middle of content.- Specified by:
getLastContentElement
in interfaceContentContainer
- Returns:
- last content element or null if none
-
addContentElement
public void addContentElement(java.lang.Object element)
Description copied from interface:ContentContainer
Add element to contentMay not be added at the end of content but inserted into the content list
- Specified by:
addContentElement
in interfaceContentContainer
- Parameters:
element
- element to add
-
setContentContainer
public void setContentContainer(ContentContainer container)
- Specified by:
setContentContainer
in interfaceDocxContext<T>
-
setParaContainer
public void setParaContainer(ParaContainer container)
- Specified by:
setParaContainer
in interfaceDocxContext<T>
-
setBlockFormatProvider
public void setBlockFormatProvider(BlockFormatProvider<T> formatProvider)
- Specified by:
setBlockFormatProvider
in interfaceDocxContext<T>
-
getBlockFormatProvider
public BlockFormatProvider<T> getBlockFormatProvider(T node)
- Specified by:
getBlockFormatProvider
in interfaceDocxContext<T>
-
getBlockFormatProvider
public BlockFormatProvider<T> getBlockFormatProvider()
Description copied from interface:DocxContext
Get current format provider- Specified by:
getBlockFormatProvider
in interfaceDocxContext<T>
- Returns:
- format provider
-
setRunContainer
public void setRunContainer(RunContainer container)
- Specified by:
setRunContainer
in interfaceDocxContext<T>
-
setRunFormatProvider
public void setRunFormatProvider(RunFormatProvider<T> formatProvider)
- Specified by:
setRunFormatProvider
in interfaceDocxContext<T>
-
getRunFormatProvider
public RunFormatProvider<T> getRunFormatProvider(T node)
- Specified by:
getRunFormatProvider
in interfaceDocxContext<T>
-
getRunFormatProvider
public RunFormatProvider<T> getRunFormatProvider()
- Specified by:
getRunFormatProvider
in interfaceDocxContext<T>
-
getRenderingOptions
public DocxRendererOptions getRenderingOptions()
- Specified by:
getRenderingOptions
in interfaceDocxContext<T>
-
open
public void open()
Description copied from interface:FormatProvider
initialize internal stuff based on the parent for future use optionally add elements to doc before main elements any P creates will call the getPPr(), getParaRPr() and addP() for this provider so don't create elements until you are ready to handle these calls- Specified by:
open
in interfaceFormatProvider<T>
-
close
public void close()
Description copied from interface:FormatProvider
finalize, add elements to the document after main part as needed after this method returns no more calls will be made to this provider- Specified by:
close
in interfaceFormatProvider<T>
-
getBlockParent
public BlockFormatProvider<T> getBlockParent()
- Specified by:
getBlockParent
in interfaceBlockFormatProvider<T>
-
getRunParent
public RunFormatProvider<T> getRunParent()
- Specified by:
getRunParent
in interfaceRunFormatProvider<T>
-
getStyleId
public java.lang.String getStyleId()
Description copied from interface:FormatProvider
these are the hard-coded styles on which this block is based used for reference purposes by children to figure out what they need to combine- Specified by:
getStyleId
in interfaceFormatProvider<T>
- Returns:
- style id
-
getStyle
public org.docx4j.wml.Style getStyle()
- Specified by:
getStyle
in interfaceFormatProvider<T>
-
adjustPPrForFormatting
public void adjustPPrForFormatting(org.docx4j.wml.PPr pP)
- Specified by:
adjustPPrForFormatting
in interfaceBlockFormatProvider<T>
-
getPPr
public void getPPr(org.docx4j.wml.PPr pPr)
- Specified by:
getPPr
in interfaceBlockFormatProvider<T>
-
getParaRPr
public void getParaRPr(org.docx4j.wml.RPr rPr)
- Specified by:
getParaRPr
in interfaceBlockFormatProvider<T>
-
addP
public void addP(org.docx4j.wml.P p)
Description copied from interface:ParaContainer
add a new P. Don't change anything about it, just add it to its proper container- Specified by:
addP
in interfaceParaContainer
- Parameters:
p
- to be added to its parent container
-
addR
public void addR(org.docx4j.wml.R r)
Description copied from interface:RunContainer
add a new R. Don't change anything about it, just add it to its proper container- Specified by:
addR
in interfaceRunContainer
- Parameters:
r
- to be added to its parent container
-
getRPr
public void getRPr(org.docx4j.wml.RPr rPr)
- Specified by:
getRPr
in interfaceRunFormatProvider<T>
-
getLastP
public org.docx4j.wml.P getLastP()
Description copied from interface:ParaContainer
Get the last P of the container or null if there is none- Specified by:
getLastP
in interfaceParaContainer
- Returns:
- last P or none
-
getLastR
public org.docx4j.wml.R getLastR()
Description copied from interface:RunContainer
Get the last R of the container or null if there is none- Specified by:
getLastR
in interfaceRunContainer
- Returns:
- last R or none
-
createPStyle
public org.docx4j.wml.PPrBase.PStyle createPStyle(java.lang.String style)
- Specified by:
createPStyle
in interfaceDocxContext<T>
-
createP
public org.docx4j.wml.P createP()
Description copied from interface:DocxContext
Get a new P element for the current block- Specified by:
createP
in interfaceDocxContext<T>
- Returns:
- current P element or null if none is open
-
createP
public org.docx4j.wml.P createP(java.lang.String style)
- Specified by:
createP
in interfaceDocxContext<T>
-
getP
public org.docx4j.wml.P getP()
Description copied from interface:DocxContext
Get the last P element for the current block- Specified by:
getP
in interfaceDocxContext<T>
- Returns:
- current P element or null if none is open
-
createR
public org.docx4j.wml.R createR()
Description copied from interface:DocxContext
Create R element, with an RPr and add it to current P element- Specified by:
createR
in interfaceDocxContext<T>
- Returns:
- R element
-
getR
public org.docx4j.wml.R getR()
Description copied from interface:DocxContext
Get last R element of current P or create a new one- Specified by:
getR
in interfaceDocxContext<T>
- Returns:
- R element
-
getRPr
public org.docx4j.wml.RPr getRPr()
- Specified by:
getRPr
in interfaceDocxContext<T>
-
getBooleanDefaultTrue
public org.docx4j.wml.BooleanDefaultTrue getBooleanDefaultTrue(boolean value)
- Specified by:
getBooleanDefaultTrue
in interfaceDocxContext<T>
-
getCTShd
public org.docx4j.wml.CTShd getCTShd()
Description copied from interface:DocxContext
Get CTShd from current R or create rPr if none and CTShd if none- Specified by:
getCTShd
in interfaceDocxContext<T>
- Returns:
- CTShd
-
getNextBookmarkId
public int getNextBookmarkId()
Description copied from interface:DocxContext
Increment the last id and return the id- Specified by:
getNextBookmarkId
in interfaceDocxContext<T>
- Returns:
- next bookmark id
-
getBookmarkIdAtomic
public java.util.concurrent.atomic.AtomicInteger getBookmarkIdAtomic()
Description copied from interface:DocxContext
get the atomic integer used to generate bookmark ids- Specified by:
getBookmarkIdAtomic
in interfaceDocxContext<T>
- Returns:
- the id atomic integer
-
createBookmarkStart
public org.docx4j.wml.CTBookmark createBookmarkStart(java.lang.String bookmarkName, boolean isBlockBookmark)
Insert bookmark start into current P- Specified by:
createBookmarkStart
in interfaceDocxContext<T>
- Parameters:
bookmarkName
- name of the bookmark (optional), if not given the it will be BM_{id}isBlockBookmark
- true if block bookmark- Returns:
- CTBookmark
-
createBookmarkEnd
public org.docx4j.wml.CTMarkupRange createBookmarkEnd(org.docx4j.wml.CTBookmark bookmarkStart, boolean isBlockBookmark)
Description copied from interface:DocxContext
Insert bookmark end into current P for given bookmark- Specified by:
createBookmarkEnd
in interfaceDocxContext<T>
- Parameters:
bookmarkStart
- starting bookmark to closeisBlockBookmark
- true if block bookmark- Returns:
- CTMarkupRange
-
createBookmarkHyperlink
public org.docx4j.wml.P.Hyperlink createBookmarkHyperlink(java.lang.String bookmarkName, java.lang.String linkText)
Description copied from interface:DocxContext
Get a hyperlink to a bookmark in the document- Specified by:
createBookmarkHyperlink
in interfaceDocxContext<T>
- Parameters:
bookmarkName
- name of the bookmark to link tolinkText
- text of the link- Returns:
- hyperlink
-
getHelper
public DocxHelper getHelper()
- Specified by:
getHelper
in interfaceDocxContext<T>
-
getFactory
public org.docx4j.wml.ObjectFactory getFactory()
Description copied from interface:DocxContext
Get the wml object factory- Specified by:
getFactory
in interfaceDocxContext<T>
- Returns:
- object factory
-
addBlankLine
public void addBlankLine(int size, java.lang.String styleId)
- Specified by:
addBlankLine
in interfaceDocxContext<T>
-
addBlankLine
public void addBlankLine(long size, java.lang.String styleId)
- Specified by:
addBlankLine
in interfaceDocxContext<T>
-
addBlankLine
public void addBlankLine(java.math.BigInteger size, java.lang.String styleId)
- Specified by:
addBlankLine
in interfaceDocxContext<T>
-
addBlankLines
public void addBlankLines(int count)
- Specified by:
addBlankLines
in interfaceDocxContext<T>
-
addText
public org.docx4j.wml.Text addText(java.lang.String value, boolean noProofRPr, boolean createR)
Description copied from interface:DocxContext
Create and add wrapped Text element to R element set value and optionally space preserve if value starts or ends in a space- Specified by:
addText
in interfaceDocxContext<T>
- Parameters:
value
- value to setnoProofRPr
- if true will add rPr with noProof tag to RcreateR
- if true then create a new R, otherwise add to existing one- Returns:
- Text element
-
addInstrText
public org.docx4j.wml.Text addInstrText(java.lang.String value, boolean noProofRPr, boolean createR)
Description copied from interface:DocxContext
Create and add wrapped Text element to R element as RInstrText set value and optionally space preserve if value starts or ends in a space- Specified by:
addInstrText
in interfaceDocxContext<T>
- Parameters:
value
- instrText ValuenoProofRPr
- if true will add rPr with noProof #BooleanDefaultTruecreateR
- if true then create a new R, otherwise add to existing one- Returns:
- Text element
-
addFldChar
public org.docx4j.wml.FldChar addFldChar(org.docx4j.wml.STFldCharType charType, boolean createR)
Description copied from interface:DocxContext
Create and add wrapped Text element to R element as RInstrText- Specified by:
addFldChar
in interfaceDocxContext<T>
- Parameters:
charType
- char type to setcreateR
- if true then create a new R, otherwise add to existing one- Returns:
- FldChar element
-
addLineBreak
public void addLineBreak()
Description copied from interface:DocxContext
Add a line break to current R- Specified by:
addLineBreak
in interfaceDocxContext<T>
-
contextFramed
public void contextFramed(java.lang.Runnable runnable)
Description copied from interface:DocxContext
Run within a context, after run the format providers and containers will be restored.Use when you need to create a container or format provider but only for a part of the node rendering process.
- Specified by:
contextFramed
in interfaceDocxContext<T>
- Parameters:
runnable
- code to run
-
addPageBreak
public void addPageBreak()
- Specified by:
addPageBreak
in interfaceDocxContext<T>
-
addBreak
public void addBreak(org.docx4j.wml.STBrType breakType)
- Specified by:
addBreak
in interfaceDocxContext<T>
-
addBold
public org.docx4j.wml.RPr addBold()
- Specified by:
addBold
in interfaceDocxContext<T>
-
createColor
public org.docx4j.wml.Color createColor()
- Specified by:
createColor
in interfaceDocxContext<T>
-
createHpsMeasure
public org.docx4j.wml.HpsMeasure createHpsMeasure(long val)
- Specified by:
createHpsMeasure
in interfaceDocxContext<T>
-
createHorizontalLine
public void createHorizontalLine()
-
getPackage
public org.docx4j.openpackaging.packages.WordprocessingMLPackage getPackage()
- Specified by:
getPackage
in interfaceDocxContext<T>
- Returns:
- the Wordprocessing package
-
getDocxDocument
public org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart getDocxDocument()
- Specified by:
getDocxDocument
in interfaceDocxContext<T>
- Returns:
- the main document
-
getStyle
public org.docx4j.wml.Style getStyle(java.lang.String styleName)
Description copied from interface:DocxContext
Get a paragraph style of given name- Specified by:
getStyle
in interfaceDocxContext<T>
- Parameters:
styleName
- name of the style- Returns:
- style
-
getRelationshipsPart
public org.docx4j.openpackaging.parts.relationships.RelationshipsPart getRelationshipsPart()
Description copied from interface:ContentContainer
Get the containers relationship. Needed for footnotes that contain links and probably images- Specified by:
getRelationshipsPart
in interfaceContentContainer
- Returns:
- relationship part for the container.
-
getContainerPart
public org.docx4j.openpackaging.parts.Part getContainerPart()
- Specified by:
getContainerPart
in interfaceContentContainer
- Specified by:
getContainerPart
in interfaceDocxContext<T>
-
getHyperlinkRelationship
public org.docx4j.relationships.Relationship getHyperlinkRelationship(java.lang.String url)
Description copied from interface:DocxContext
Get an external hyperlink relationship for the given url- Specified by:
getHyperlinkRelationship
in interfaceDocxContext<T>
- Parameters:
url
- url- Returns:
- relationship
-
renderFencedCodeLines
public void renderFencedCodeLines(java.lang.CharSequence... lines)
- Specified by:
renderFencedCodeLines
in interfaceDocxContext<T>
-
renderFencedCodeLines
public void renderFencedCodeLines(java.util.List<? extends java.lang.CharSequence> lines)
- Specified by:
renderFencedCodeLines
in interfaceDocxContext<T>
-
getFootnotesPart
public org.docx4j.openpackaging.parts.WordprocessingML.FootnotesPart getFootnotesPart() throws org.docx4j.openpackaging.exceptions.Docx4JException
Description copied from interface:DocxContext
Get or create FootnotesPart for the document- Specified by:
getFootnotesPart
in interfaceDocxContext<T>
- Returns:
- footnotes part
- Throws:
org.docx4j.openpackaging.exceptions.Docx4JException
- if cannot create part
-
addFootnote
public org.docx4j.wml.CTFtnEdn addFootnote(java.math.BigInteger footnoteID) throws org.docx4j.openpackaging.exceptions.Docx4JException
Description copied from interface:DocxContext
Add footnote and return it- Specified by:
addFootnote
in interfaceDocxContext<T>
- Parameters:
footnoteID
- re-use footnote id or 0 if new footnote- Returns:
- footnote element
- Throws:
org.docx4j.openpackaging.exceptions.Docx4JException
- thrown if cannot get or create footnotes part of the document
-
-