writer2latex.latex
Class BlockConverter

java.lang.Object
  extended by writer2latex.latex.ConverterHelper
      extended by writer2latex.latex.BlockConverter

public class BlockConverter
extends ConverterHelper

This class handles basic block content, including the main text body, sections, tables, lists, headings and paragraphs.


Field Summary
 
Fields inherited from class writer2latex.latex.ConverterHelper
config, ofr, palette
 
Constructor Summary
BlockConverter(OfficeReader ofr, Config config, ConverterPalette palette)
           
 
Method Summary
 void appendDeclarations(LaTeXDocumentPortion pack, LaTeXDocumentPortion decl)
           
 void handleList(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
           Process a list (text:ordered-lst or text:unordered-list tag)
private  void handleListItem(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
           
private  boolean listContainsHeadings(org.w3c.dom.Node node)
           
private  boolean listItemContainsHeadings(org.w3c.dom.Node node)
           
 void traverseBlockText(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
           Traverse block text (eg. content of body, section, list item).
private  void traverseList(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockConverter

public BlockConverter(OfficeReader ofr,
                      Config config,
                      ConverterPalette palette)
Method Detail

appendDeclarations

public void appendDeclarations(LaTeXDocumentPortion pack,
                               LaTeXDocumentPortion decl)
Overrides:
appendDeclarations in class ConverterHelper

traverseBlockText

public void traverseBlockText(org.w3c.dom.Element node,
                              LaTeXDocumentPortion ldp,
                              Context oc)

Traverse block text (eg. content of body, section, list item). This is traversed in logical order and dedicated handlers take care of each block element.

(Note: As a rule, all handling of block level elements should add a newline to the LaTeX document at the end of the block)

Parameters:
node - The element containing the block text
ldp - the LaTeXDocumentPortion to which LaTeX code should be added
oc - the current context

handleList

public void handleList(org.w3c.dom.Element node,
                       LaTeXDocumentPortion ldp,
                       Context oc)

Process a list (text:ordered-lst or text:unordered-list tag)

Parameters:
node - The element containing the list
ldp - the LaTeXDocumentPortion to which LaTeX code should be added
oc - the current context

traverseList

private void traverseList(org.w3c.dom.Element node,
                          LaTeXDocumentPortion ldp,
                          Context oc)

handleListItem

private void handleListItem(org.w3c.dom.Element node,
                            LaTeXDocumentPortion ldp,
                            Context oc)

listContainsHeadings

private boolean listContainsHeadings(org.w3c.dom.Node node)

listItemContainsHeadings

private boolean listItemContainsHeadings(org.w3c.dom.Node node)