writer2latex.xhtml

Class StyleConverterHelper

Known Direct Subclasses:
ListStyleConverter, PageStyleConverter, StyleWithPropertiesConverterHelper

public abstract class StyleConverterHelper
extends ConverterHelper

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

Field Summary

protected boolean
bConvertHard
protected boolean
bConvertStyles
protected int
nType
protected XhtmlStyleMap
styleMap
protected ExportNameCollection
styleNames

Fields inherited from class writer2latex.xhtml.ConverterHelper

config, converter, ofr

Constructor Summary

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

Method Summary

protected static void
applyDirection(StyleWithProperties style, StyleInfo info)
Apply the writing direction (ltr or rtl) attribute from a style
protected static void
applyLang(StyleWithProperties style, StyleInfo info)
Apply language+country from a style
protected String
colScale(String s)
abstract String
getStyleDeclarations(String sIndent)
Convert style information for used styles
abstract OfficeStyleFamily
getStyles()
Get the OpenDocument style family associated with this StyleConverterHelper
protected String
scale(String s)

Methods inherited from class writer2latex.xhtml.ConverterHelper

applyStyle, getCellSc, getDrawCv, getFrameSc, getListSc, getMathCv, getPageSc, getParSc, getPresentationSc, getRowSc, getSectionSc, getStyleCv, getTableCv, getTableSc, getTextCv, getTextSc

Field Details

bConvertHard

protected boolean bConvertHard

bConvertStyles

protected boolean bConvertStyles

nType

protected int nType

styleMap

protected XhtmlStyleMap styleMap

styleNames

protected ExportNameCollection styleNames

Constructor Details

StyleConverterHelper

public StyleConverterHelper(OfficeReader ofr,
                            Config 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 Details

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)