Package writer2latex.latex
Class CharStyleConverter
java.lang.Object
writer2latex.latex.ConverterHelper
writer2latex.latex.StyleConverter
writer2latex.latex.CharStyleConverter
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
ConstructorsConstructorDescriptionCharStyleConverter
(OfficeReader ofr, LaTeXConfig config, ConverterPalette palette) Constructs a newCharStyleConverter
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Apply hard character formatting (no inheritance).void
Reset to normal font, size and color.void
applyTextStyle
(String sName, BeforeAfter ba, Context context) Use a text style in LaTeX.getFontName
(String sStyleName) getFontName
(StyleWithProperties style)
-
Constructor Details
-
CharStyleConverter
Constructs a new
CharStyleConverter
.
-
-
Method Details
-
appendDeclarations
- Overrides:
appendDeclarations
in classStyleConverter
-
applyTextStyle
Use a text style in LaTeX.
- Parameters:
sName
- the name of the text styleba
- aBeforeAfter
to put code into
-
getFontName
-
getFontName
-
applyHardCharFormatting
Apply hard character formatting (no inheritance).
This is used in sections and {foot|end}notes
- Parameters:
style
- the style to useba
- theBeforeAfter
to add LaTeX code to
-
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:
style
- the OOo style to read attributesfrombDecl
- true if declaration form is requiredbInherit
- true if inherited properties should be usedba
- theBeforeAfter
to add LaTeX code to.
-
applyNormalFont
Reset to normal font, size and color.
- Parameters:
ba
- theBeforeAfter
to add LaTeX code to.
-
applyDefaultFont
Apply default font attributes (family, series, shape, size and color).
- Parameters:
style
- the OOo style to read attributesfromldp
- theLaTeXDocumentPortion
to add LaTeX code to.
-
applyFontEffects
Apply font effects (position, underline, crossout, change case.
- Parameters:
style
- the OOo style to read attributesfrombInherit
- true if inherited properties should be usedba
- theBeforeAfter
to add LaTeX code to.
-