Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## writer2latex.latex
Class TableFormatter

    java.lang.Object
      writer2latex.latex.ConverterHelper
          writer2latex.latex.TableFormatter

    public class TableFormatter

extends ConverterHelper

This class converts OOo table styles to LaTeX.

In OOo the table style is distributed on table, column and cell styles.

In LaTeX we have to rearrange this information slightly, so this class takes care of that.

Field Summary
`private boolean` | `bApplyCellFormat`
`private boolean[]` | `bGlobalVBorder`
`private boolean[][]` | `bHBorder`
`private boolean` | `bIsColortbl`
`private boolean` | `bIsLongtable`
`private boolean` | `bIsSimple`
`private boolean` | `bIsSupertabular`
`private boolean` | `bIsTabulary`
`private boolean[][]` | `bVBorder`
`private char[][]` | `cAlign`
`private char[]` | `cGlobalAlign`
`private java.lang.String[][]` | `sCellColor`
`private java.lang.String[]` | `sColumnWidth`
`private java.lang.String[]` | `sRowColor`
`private TableReader` | `table`

Fields inherited from class writer2latex.latex.ConverterHelper
`config, ofr, palette`

Constructor Summary
`TableFormatter(OfficeReader ofr, Config config, ConverterPalette palette, TableReader table, boolean bAllowPageBreak, boolean bIsInTable)` Constructor: Create from a TableReader.

Method Summary
`void` | `applyCellStyle(int nRow, int nCol, BeforeAfter ba, Context context)` Get material to put before and after a table cell.
`void` | `applyRowStyle(int nRow, BeforeAfter ba, Context context)` Get material to put before a table row (background color)
`void` | `applyTableStyle(BeforeAfter ba, BeforeAfter baAlign)` Create table environment based on table style.
`java.lang.String` | `getInterrowMaterial(int nRow)` Create interrow material
`boolean` | `isColortbl()` is this a colortbl?
`boolean` | `isLongtable()` is this a longtable?
`boolean` | `isSimple()` is this a simple table (lcr columns rather than p{})?
`boolean` | `isSupertabular()` is this a supertabular?
`boolean` | `isTabulary()` is this a tabulary?

Methods inherited from class writer2latex.latex.ConverterHelper
`appendDeclarations`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### bApplyCellFormat

    private boolean bApplyCellFormat

### table

    private TableReader table

### cAlign

    private char[][] cAlign

### cGlobalAlign

    private char[] cGlobalAlign

### bHBorder

    private boolean[][] bHBorder

### bVBorder

    private boolean[][] bVBorder

### bGlobalVBorder

    private boolean[] bGlobalVBorder

### sRowColor

    private java.lang.String[] sRowColor

### sCellColor

    private java.lang.String[][] sCellColor

### sColumnWidth

    private java.lang.String[] sColumnWidth

### bIsLongtable

    private boolean bIsLongtable

### bIsSupertabular

    private boolean bIsSupertabular

### bIsTabulary

    private boolean bIsTabulary

### bIsColortbl

    private boolean bIsColortbl

### bIsSimple

    private boolean bIsSimple

Constructor Detail

### TableFormatter

    public TableFormatter(OfficeReader ofr,
                          Config config,
                          ConverterPalette palette,
                          TableReader table,
                          boolean bAllowPageBreak,
                          boolean bIsInTable)

  Constructor: Create from a TableReader.

Method Detail

### isLongtable

    public boolean isLongtable()

  is this a longtable?

### isSupertabular

    public boolean isSupertabular()

  is this a supertabular?

### isTabulary

    public boolean isTabulary()

  is this a tabulary?

### isColortbl

    public boolean isColortbl()

  is this a colortbl?

### isSimple

    public boolean isSimple()

  is this a simple table (lcr columns rather than p{})?

### applyTableStyle

    public void applyTableStyle(BeforeAfter ba,
                                BeforeAfter baAlign)

  Create table environment based on table style.

  Returns eg. "\begin{longtable}{m{2cm}|m{4cm}}", "\end{longtable}".

### getInterrowMaterial

    public java.lang.String getInterrowMaterial(int nRow)

  Create interrow material

### applyRowStyle

    public void applyRowStyle(int nRow,
                              BeforeAfter ba,
                              Context context)

  Get material to put before a table row (background color)

### applyCellStyle

    public void applyCellStyle(int nRow,
                               int nCol,
                               BeforeAfter ba,
                               Context context)

  Get material to put before and after a table cell. In case of columnspan or different borders this will contain a \multicolumn command. If bApplyCellFormat is true, there will be a minipage environment

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD