writer2latex.xhtml

Class StyleConverterHelper

public abstract class StyleConverterHelper extends ConverterHelper

This is an abstract base class to convert an OpenDocument style family to CSS2 styles.

Field Summary
protected booleanbConvertHard
protected booleanbConvertStyles
protected intnType
protected XhtmlStyleMapstyleMap
protected ExportNameCollectionstyleNames
Constructor Summary
StyleConverterHelper(OfficeReader ofr, XhtmlConfig config, Converter converter, int nType)
Create a new StyleConverterHelper
Method Summary
protected static voidapplyDirection(StyleWithProperties style, StyleInfo info)
Apply the writing direction (ltr or rtl) attribute from a style
protected static voidapplyLang(StyleWithProperties style, StyleInfo info)
Apply language+country from a style
protected StringcolScale(String s)
abstract StringgetStyleDeclarations(String sIndent)

Convert style information for used styles

abstract OfficeStyleFamilygetStyles()
Get the OpenDocument style family associated with this StyleConverterHelper
protected Stringscale(String s)

Field Detail

bConvertHard

protected boolean bConvertHard

bConvertStyles

protected boolean bConvertStyles

nType

protected int nType

styleMap

protected XhtmlStyleMap styleMap

styleNames

protected ExportNameCollection styleNames

Constructor Detail

StyleConverterHelper

public StyleConverterHelper(OfficeReader ofr, XhtmlConfig config, Converter converter, int nType)
Create a new StyleConverterHelper

Parameters: ofr an OfficeReader to read style information from config the configuration to use converter the main Converter class nType the type of xhtml to use

Method Detail

applyDirection

protected static void applyDirection(StyleWithProperties style, StyleInfo info)
Apply the writing direction (ltr or rtl) attribute from a style

Parameters: style the OpenDocument style to use info the StyleInfo object to add information to

applyLang

protected static void applyLang(StyleWithProperties style, StyleInfo info)
Apply language+country from a style

Parameters: style the OpenDocument style to use info the StyleInfo object to add information to

colScale

protected String colScale(String s)

getStyleDeclarations

public abstract String getStyleDeclarations(String sIndent)

Convert style information for used styles

Parameters: sIndent a String of spaces to add before each line

getStyles

public abstract OfficeStyleFamily getStyles()
Get the OpenDocument style family associated with this StyleConverterHelper

Returns: the style family

scale

protected String scale(String s)