public class TableFormatter
extends java.lang.Object
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.
Constructor and Description |
---|
TableFormatter(OfficeReader ofr,
LaTeXConfig config,
ConverterPalette palette,
TableReader table,
boolean bAllowPageBreak,
boolean bIsInTable)
Constructor: Create from a TableReader.
|
Modifier and Type | Method and Description |
---|---|
void |
appendDeclarations(LaTeXDocumentPortion pack,
LaTeXDocumentPortion decl) |
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,
boolean bInFloat)
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?
|
public TableFormatter(OfficeReader ofr, LaTeXConfig config, ConverterPalette palette, TableReader table, boolean bAllowPageBreak, boolean bIsInTable)
Constructor: Create from a TableReader.
public void appendDeclarations(LaTeXDocumentPortion pack, LaTeXDocumentPortion decl)
public boolean isLongtable()
public boolean isSupertabular()
public boolean isTabulary()
public boolean isColortbl()
public boolean isSimple()
public void applyTableStyle(BeforeAfter ba, BeforeAfter baAlign, boolean bInFloat)
Create table environment based on table style.
Returns eg. "\begin{longtable}{m{2cm}|m{4cm}}", "\end{longtable}".
ba
- the BeforeAfter
to contain the table codebaAlign
- the BeforeAfter
to contain the alignment code, if it's separatebInFloat
- true if the table should be floatingpublic java.lang.String getInterrowMaterial(int nRow)
Create interrow material
public void applyRowStyle(int nRow, BeforeAfter ba, Context context)
Get material to put before a table row (background color)
public void applyCellStyle(int nRow, int nCol, BeforeAfter ba, Context context)