writer2latex.latex

Class FieldConverter


public class FieldConverter
extends ConverterHelper

This class handles text fields and links in the document.

Packages: lastpage, hyperref, titleref, oooref (all optional)

TODO: Need proper treatment of "caption" and "text" for sequence references not to figures and tables (should be fairly rare, though)

Field Summary

Fields inherited from class writer2latex.latex.ConverterHelper

config, ofr, palette

Constructor Summary

FieldConverter(OfficeReader ofr, Config config, ConverterPalette palette)

Method Summary

void
addTarget(Element node, String sSuffix, LaTeXDocumentPortion ldp)
Add a \\hypertarget
void
addTarget(String sName, 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(Element node, LaTeXDocumentPortion ldp, Context oc)
Process a hyperlink (text:a tag)
void
handleBookmark(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(Element node, LaTeXDocumentPortion ldp, Context oc)
Process a bookmark reference (text:bookmark-ref tag).
void
handlePageCount(Element node, LaTeXDocumentPortion ldp, Context oc)
Process a page count field (text:page-count tag)
void
handlePageNumber(Element node, LaTeXDocumentPortion ldp, Context oc)
Process a page number field (text:page-number tag)
void
handleReferenceMark(Element node, LaTeXDocumentPortion ldp, Context oc)
Process a reference mark (text:reference-mark tag)
void
handleReferenceRef(Element node, LaTeXDocumentPortion ldp, Context oc)
Process a reference (text:reference-ref tag)
void
handleSequence(Element node, LaTeXDocumentPortion ldp, Context oc)
Process a sequence field (text:sequence tag)
void
handleSequenceDecls(Element node)
Process sequence declarations
void
handleSequenceRef(Element node, LaTeXDocumentPortion ldp, Context oc)
Process a sequence reference (text:sequence-ref tag)

Methods inherited from class writer2latex.latex.ConverterHelper

appendDeclarations

Constructor Details

FieldConverter

public FieldConverter(OfficeReader ofr,
                      Config config,
                      ConverterPalette palette)

Method Details

addTarget

public void addTarget(Element node,
                      String sSuffix,
                      LaTeXDocumentPortion ldp)
Add a \\hypertarget
Parameters:

addTarget

public void addTarget(String sName,
                      String sSuffix,
                      LaTeXDocumentPortion ldp)
Add a \\hypertarget
Parameters:

appendDeclarations

public void appendDeclarations(LaTeXDocumentPortion pack,
                               LaTeXDocumentPortion decl)
Append declarations needed by the FieldConverter to the preamble.
Overrides:
appendDeclarations in interface ConverterHelper
Parameters:

flushReferenceMarks

public void flushReferenceMarks(LaTeXDocumentPortion ldp,
                                Context oc)
Process pending reference marks and bookmarks (which may have been postponed within sections, captions or verbatim text.
Parameters:

handleAnchor

public void handleAnchor(Element node,
                         LaTeXDocumentPortion ldp,
                         Context oc)
Process a hyperlink (text:a tag)
Parameters:

handleBookmark

public void handleBookmark(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

Parameters:

handleBookmarkRef

public void handleBookmarkRef(Element node,
                              LaTeXDocumentPortion ldp,
                              Context oc)
Process a bookmark reference (text:bookmark-ref tag).
Parameters:

handlePageCount

public void handlePageCount(Element node,
                            LaTeXDocumentPortion ldp,
                            Context oc)
Process a page count field (text:page-count tag)
Parameters:

handlePageNumber

public void handlePageNumber(Element node,
                             LaTeXDocumentPortion ldp,
                             Context oc)
Process a page number field (text:page-number tag)
Parameters:

handleReferenceMark

public void handleReferenceMark(Element node,
                                LaTeXDocumentPortion ldp,
                                Context oc)
Process a reference mark (text:reference-mark tag)
Parameters:

handleReferenceRef

public void handleReferenceRef(Element node,
                               LaTeXDocumentPortion ldp,
                               Context oc)
Process a reference (text:reference-ref tag)
Parameters:

handleSequence

public void handleSequence(Element node,
                           LaTeXDocumentPortion ldp,
                           Context oc)
Process a sequence field (text:sequence tag)
Parameters:

handleSequenceDecls

public void handleSequenceDecls(Element node)
Process sequence declarations
Parameters:
node - the text:sequence-decls node

handleSequenceRef

public void handleSequenceRef(Element node,
                              LaTeXDocumentPortion ldp,
                              Context oc)
Process a sequence reference (text:sequence-ref tag)
Parameters: