writer2latex.latex

Class CharStyleConverter


public class CharStyleConverter
extends StyleConverter

This class creates LaTeX code from OOo character formatting Character formatting in OOo includes font, font effects/decorations and color. In addition it includes color and language/country information, this is however handled by the classes writer2latex.latex.ColorConverter and writer2latex.latex.style.I18n

Field Summary

Fields inherited from class writer2latex.latex.StyleConverter

declarations, styleMap, styleNames

Fields inherited from class writer2latex.latex.ConverterHelper

config, ofr, palette

Constructor Summary

CharStyleConverter(OfficeReader ofr, Config config, ConverterPalette palette)
Constructs a new CharStyleConverter.

Method Summary

void
appendDeclarations(LaTeXDocumentPortion pack, LaTeXDocumentPortion decl)
void
applyDefaultFont(StyleWithProperties style, LaTeXDocumentPortion ldp)
Apply default font attributes (family, series, shape, size and color).
void
applyFont(StyleWithProperties style, boolean bDecl, boolean bInherit, BeforeAfter ba, Context context)
Apply all font attributes (family, series, shape, size and color).
void
applyFontEffects(StyleWithProperties style, boolean bInherit, BeforeAfter ba)
Apply font effects (position, underline, crossout, change case.
void
applyHardCharFormatting(StyleWithProperties style, BeforeAfter ba)
Apply hard character formatting (no inheritance).
void
applyNormalFont(BeforeAfter ba)
Reset to normal font, size and color.
void
applyTextStyle(String sName, BeforeAfter ba, Context context)
Use a text style in LaTeX.
String
getFontName(String sStyleName)
String
getFontName(StyleWithProperties style)

Methods inherited from class writer2latex.latex.StyleConverter

appendDeclarations

Methods inherited from class writer2latex.latex.ConverterHelper

appendDeclarations

Constructor Details

CharStyleConverter

public CharStyleConverter(OfficeReader ofr,
                          Config config,
                          ConverterPalette palette)
Constructs a new CharStyleConverter.

Method Details

appendDeclarations

public void appendDeclarations(LaTeXDocumentPortion pack,
                               LaTeXDocumentPortion decl)
Overrides:
appendDeclarations in interface StyleConverter

applyDefaultFont

public void applyDefaultFont(StyleWithProperties style,
                             LaTeXDocumentPortion ldp)
Apply default font attributes (family, series, shape, size and color).
Parameters:

applyFont

public void applyFont(StyleWithProperties style,
                      boolean bDecl,
                      boolean bInherit,
                      BeforeAfter ba,
                      Context context)
Apply all font attributes (family, series, shape, size and color).
Parameters:

applyFontEffects

public void applyFontEffects(StyleWithProperties style,
                             boolean bInherit,
                             BeforeAfter ba)
Apply font effects (position, underline, crossout, change case.
Parameters:

applyHardCharFormatting

public void applyHardCharFormatting(StyleWithProperties style,
                                    BeforeAfter ba)
Apply hard character formatting (no inheritance).

This is used in sections and {foot|end}notes

Parameters:

applyNormalFont

public void applyNormalFont(BeforeAfter ba)
Reset to normal font, size and color.
Parameters:

applyTextStyle

public void applyTextStyle(String sName,
                           BeforeAfter ba,
                           Context context)
Use a text style in LaTeX.
Parameters:

getFontName

public String getFontName(String sStyleName)

getFontName

public String getFontName(StyleWithProperties style)