public class FieldConverter
extends java.lang.Object
Constructor and Description |
---|
FieldConverter(OfficeReader ofr,
LaTeXConfig config,
ConverterPalette palette) |
Modifier and Type | Method and Description |
---|---|
void |
addTarget(org.w3c.dom.Element node,
java.lang.String sSuffix,
LaTeXDocumentPortion ldp)
Add a
\\hypertarget |
void |
addTarget(java.lang.String sName,
java.lang.String sSuffix,
LaTeXDocumentPortion ldp)
Add a
\\hypertarget |
void |
appendDeclarations(LaTeXDocumentPortion pack,
LaTeXDocumentPortion decl)
Append declarations needed by the
FieldConverter to
the preamble. |
void |
flushReferenceMarks(LaTeXDocumentPortion ldp,
Context oc)
Process pending reference marks and bookmarks (which may have been
postponed within sections, captions or verbatim text.
|
void |
handleAnchor(org.w3c.dom.Element node,
LaTeXDocumentPortion ldp,
Context oc)
Process a hyperlink (text:a tag)
|
void |
handleBookmark(org.w3c.dom.Element node,
LaTeXDocumentPortion ldp,
Context oc)
Process a bookmark (text:bookmark tag)
A bookmark may be the target for either a hyperlink or a reference,
so this will generate a
\\hyperref and/or a \\label |
void |
handleBookmarkRef(org.w3c.dom.Element node,
LaTeXDocumentPortion ldp,
Context oc)
Process a bookmark reference (text:bookmark-ref tag).
|
void |
handlePageCount(org.w3c.dom.Element node,
LaTeXDocumentPortion ldp,
Context oc)
Process a page count field (text:page-count tag)
|
void |
handlePageNumber(org.w3c.dom.Element node,
LaTeXDocumentPortion ldp,
Context oc)
Process a page number field (text:page-number tag)
|
void |
handleReferenceMark(org.w3c.dom.Element node,
LaTeXDocumentPortion ldp,
Context oc)
Process a reference mark (text:reference-mark or text:reference-mark-start tag)
|
void |
handleReferenceMarkEnd(org.w3c.dom.Element node,
LaTeXDocumentPortion ldp,
Context oc)
Process a reference mark end (text:reference-mark-end tag)
|
void |
handleReferenceRef(org.w3c.dom.Element node,
LaTeXDocumentPortion ldp,
Context oc)
Process a reference (text:reference-ref tag)
|
void |
handleSequence(org.w3c.dom.Element node,
LaTeXDocumentPortion ldp,
Context oc)
Process a sequence field (text:sequence tag)
|
void |
handleSequenceDecls(org.w3c.dom.Element node)
Process sequence declarations
|
void |
handleSequenceLabel(org.w3c.dom.Element node,
LaTeXDocumentPortion ldp)
Create label for a sequence field (text:sequence tag)
|
void |
handleSequenceRef(org.w3c.dom.Element node,
LaTeXDocumentPortion ldp,
Context oc)
Process a sequence reference (text:sequence-ref tag)
|
boolean |
hasPendingReferenceMarks(Context oc)
Do we have any pending reference marks or bookmarks, that may be inserted in this context?
|
public FieldConverter(OfficeReader ofr, LaTeXConfig config, ConverterPalette palette)
public void appendDeclarations(LaTeXDocumentPortion pack, LaTeXDocumentPortion decl)
Append declarations needed by the FieldConverter
to
the preamble.
pack
- the LaTeXDocumentPortion
to which
declarations of packages should be added (\\usepackage
).decl
- the LaTeXDocumentPortion
to which
other declarations should be added.public void handleSequenceDecls(org.w3c.dom.Element node)
Process sequence declarations
node
- the text:sequence-decls nodepublic void handleSequence(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process a sequence field (text:sequence tag)
node
- The element containing the sequence fieldldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedoc
- the current contextpublic void handleSequenceLabel(org.w3c.dom.Element node, LaTeXDocumentPortion ldp)
Create label for a sequence field (text:sequence tag)
node
- The element containing the sequence fieldldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedpublic void handleSequenceRef(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process a sequence reference (text:sequence-ref tag)
node
- The element containing the sequence referenceldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedoc
- the current contextpublic void handleReferenceMarkEnd(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process a reference mark end (text:reference-mark-end tag)
node
- The element containing the reference markldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedoc
- the current contextpublic void handleReferenceMark(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process a reference mark (text:reference-mark or text:reference-mark-start tag)
node
- The element containing the reference markldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedoc
- the current contextpublic void handleReferenceRef(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process a reference (text:reference-ref tag)
node
- The element containing the referenceldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedoc
- the current contextpublic void handleBookmark(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process a bookmark (text:bookmark tag)
A bookmark may be the target for either a hyperlink or a reference,
so this will generate a \\hyperref
and/or a \\label
node
- The element containing the bookmarkldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedoc
- the current contextpublic void handleBookmarkRef(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process a bookmark reference (text:bookmark-ref tag).
node
- The element containing the bookmark referenceldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedoc
- the current contextpublic boolean hasPendingReferenceMarks(Context oc)
oc
- the context to verify againstpublic void flushReferenceMarks(LaTeXDocumentPortion ldp, Context oc)
Process pending reference marks and bookmarks (which may have been postponed within sections, captions or verbatim text.
ldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedoc
- the current contextpublic void handleAnchor(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process a hyperlink (text:a tag)
node
- The element containing the hyperlinkldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedoc
- the current contextpublic void addTarget(org.w3c.dom.Element node, java.lang.String sSuffix, LaTeXDocumentPortion ldp)
Add a \\hypertarget
node
- The element containing the name of the targetsSuffix
- A suffix to be added to the target,
e.g. "|table" for a reference to a table.ldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedpublic void addTarget(java.lang.String sName, java.lang.String sSuffix, LaTeXDocumentPortion ldp)
Add a \\hypertarget
sName
- The name of the targetsSuffix
- A suffix to be added to the target,
e.g. "|table" for a reference to a table.ldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedpublic void handlePageNumber(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process a page number field (text:page-number tag)
node
- The element containing the page number fieldldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedoc
- the current contextpublic void handlePageCount(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process a page count field (text:page-count tag)
node
- The element containing the page count fieldldp
- the LaTeXDocumentPortion
to which
LaTeX code should be addedoc
- the current context