Package writer2latex.xhtml
Class StyleConverterHelper
- java.lang.Object
-
- writer2latex.xhtml.ConverterHelper
-
- writer2latex.xhtml.StyleConverterHelper
-
- Direct Known Subclasses:
HeadingStyleConverter
,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
Fields Modifier and Type Field Description 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
Constructors Constructor Description StyleConverterHelper(OfficeReader ofr, XhtmlConfig config, Converter converter, int nType)
Create a newStyleConverterHelper
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static void
applyDirection(StyleWithProperties style, StyleInfo info)
Apply the writing direction (ltr or rtl) attribute from a styleprotected static void
applyLang(StyleWithProperties style, StyleInfo info)
Apply language+country from a styleprotected java.lang.String
colScale(java.lang.String s)
abstract java.lang.String
getStyleDeclarations(java.lang.String sIndent)
Convert style information for used stylesabstract OfficeStyleFamily
getStyles()
Get the OpenDocument style family associated with this StyleConverterHelperprotected java.lang.String
scale(java.lang.String s)
-
Methods inherited from class writer2latex.xhtml.ConverterHelper
applyStyle, getCellSc, getDrawCv, getFrameSc, getHeadingSc, getListSc, getMathCv, getPageSc, getParSc, getPresentationSc, getRowSc, getSectionSc, getStyleCv, getTableCv, getTableSc, getTextCv, getTextSc
-
-
-
-
Field Detail
-
styleNames
protected ExportNameCollection styleNames
-
styleMap
protected XhtmlStyleMap styleMap
-
bConvertStyles
protected boolean bConvertStyles
-
bConvertHard
protected boolean bConvertHard
-
nType
protected int nType
-
-
Constructor Detail
-
StyleConverterHelper
public StyleConverterHelper(OfficeReader ofr, XhtmlConfig config, Converter converter, int nType)
Create a newStyleConverterHelper
- Parameters:
ofr
- anOfficeReader
to read style information fromconfig
- the configuration to useconverter
- the mainConverter
classnType
- the type of xhtml to use
-
-
Method Detail
-
scale
protected java.lang.String scale(java.lang.String s)
-
colScale
protected java.lang.String colScale(java.lang.String s)
-
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 useinfo
- theStyleInfo
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 useinfo
- theStyleInfo
object to add information to
-
getStyles
public abstract OfficeStyleFamily getStyles()
Get the OpenDocument style family associated with this StyleConverterHelper- Returns:
- the style family
-
getStyleDeclarations
public abstract java.lang.String getStyleDeclarations(java.lang.String sIndent)
Convert style information for used styles
- Parameters:
sIndent
- a String of spaces to add before each line
-
-