writer2latex.xhtml
Class TableConverter

java.lang.Object
  extended by writer2latex.xhtml.ConverterHelper
      extended by writer2latex.xhtml.TableConverter

public class TableConverter
extends ConverterHelper


Field Summary
protected  java.util.Vector<java.lang.String> sheetNames
           
 
Fields inherited from class writer2latex.xhtml.ConverterHelper
config, converter, ofr
 
Constructor Summary
TableConverter(OfficeReader ofr, XhtmlConfig config, Converter converter)
           
 
Method Summary
private  void applyCellStyle(java.lang.String sStyleName, java.lang.String sTotalWidth, java.lang.String sValueType, org.w3c.dom.Element cell, boolean bIsSubTable)
           
private  void applyRowStyle(java.lang.String sStyleName, org.w3c.dom.Element row)
           
private  void applyTableStyle(java.lang.String sStyleName, org.w3c.dom.Element table, boolean bIsSubTable)
           
 java.lang.String borderWidth(java.lang.String sBorder)
           
 void convertTableContent(org.w3c.dom.Element onode)
          Converts an office node as a complete table (spreadsheet) document
private  org.w3c.dom.Element createTable(TableReader tblr)
           
 void handleTable(org.w3c.dom.Node onode, org.w3c.dom.Node hnode)
          Process a table:table tag
private  boolean isEmptyCell(org.w3c.dom.Node cell)
           
private  org.w3c.dom.Element nextOutFile()
           
private  void traverseRows(TableView view, int nFirstRow, int nLastRow, org.w3c.dom.Element hnode)
           
private  void traverseTable(TableView view, org.w3c.dom.Element hnode)
           
 
Methods inherited from class writer2latex.xhtml.ConverterHelper
applyStyle, getCellSc, getDrawCv, getFrameSc, getListSc, getMathCv, getPageSc, getParSc, getPresentationSc, getRowSc, getSectionSc, getStyleCv, getTableCv, getTableSc, getTextCv, getTextSc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sheetNames

protected java.util.Vector<java.lang.String> sheetNames
Constructor Detail

TableConverter

public TableConverter(OfficeReader ofr,
                      XhtmlConfig config,
                      Converter converter)
Method Detail

convertTableContent

public void convertTableContent(org.w3c.dom.Element onode)
Converts an office node as a complete table (spreadsheet) document

Parameters:
onode - the Office node containing the content to convert

nextOutFile

private org.w3c.dom.Element nextOutFile()

handleTable

public void handleTable(org.w3c.dom.Node onode,
                        org.w3c.dom.Node hnode)
Process a table:table tag

Parameters:
onode - the Office node containing the table element
hnode - the XHTML node to which the table should be attached

createTable

private org.w3c.dom.Element createTable(TableReader tblr)

traverseTable

private void traverseTable(TableView view,
                           org.w3c.dom.Element hnode)

traverseRows

private void traverseRows(TableView view,
                          int nFirstRow,
                          int nLastRow,
                          org.w3c.dom.Element hnode)

isEmptyCell

private boolean isEmptyCell(org.w3c.dom.Node cell)

applyTableStyle

private void applyTableStyle(java.lang.String sStyleName,
                             org.w3c.dom.Element table,
                             boolean bIsSubTable)

applyRowStyle

private void applyRowStyle(java.lang.String sStyleName,
                           org.w3c.dom.Element row)

applyCellStyle

private void applyCellStyle(java.lang.String sStyleName,
                            java.lang.String sTotalWidth,
                            java.lang.String sValueType,
                            org.w3c.dom.Element cell,
                            boolean bIsSubTable)

borderWidth

public java.lang.String borderWidth(java.lang.String sBorder)