Package writer2latex.xhtml
Class StyleWithPropertiesConverterHelper
java.lang.Object
writer2latex.xhtml.ConverterHelper
writer2latex.xhtml.StyleConverterHelper
writer2latex.xhtml.StyleWithPropertiesConverterHelper
- Direct Known Subclasses:
CellStyleConverter
,FrameStyleConverter
,ParStyleConverter
,RowStyleConverter
,SectionStyleConverter
,TableStyleConverter
,TextStyleConverter
This is an abstract class to convert an OpenDocument style family
represented by StyleWithProperties
to CSS2 styles.
-
Field Summary
Fields inherited from class writer2latex.xhtml.StyleConverterHelper
bConvertHard, bConvertStyles, nType, styleMap, styleNames
Fields inherited from class writer2latex.xhtml.ConverterHelper
config, converter, ofr
-
Constructor Summary
ConstructorsConstructorDescriptionStyleWithPropertiesConverterHelper
(OfficeReader ofr, XhtmlConfig config, Converter converter, int nType) Create a newStyleWithPropertiesConverterHelper
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
applyProperties
(StyleWithProperties style, CSVList props, boolean bInherit) Convert formatting properties for a specific style.void
applyStyle
(String sStyleName, StyleInfo info) Apply a style, either by converting the style or by applying the style map from the configuarionReturn a prefix to be used in generated css class namesabstract String
Create default tag name to represent a specific style, e.g.getStyleDeclarations
(String sIndent) Convert style information for used stylesMethods inherited from class writer2latex.xhtml.StyleConverterHelper
applyDirection, applyLang, colScale, getStyles, scale
Methods inherited from class writer2latex.xhtml.ConverterHelper
applyStyle, getCellSc, getDrawCv, getFrameSc, getHeadingSc, getListSc, getMathCv, getPageSc, getParSc, getPresentationSc, getRowSc, getSectionSc, getStyleCv, getTableCv, getTableSc, getTextCv, getTextSc
-
Constructor Details
-
StyleWithPropertiesConverterHelper
public StyleWithPropertiesConverterHelper(OfficeReader ofr, XhtmlConfig config, Converter converter, int nType) Create a newStyleWithPropertiesConverterHelper
- Parameters:
ofr
- anOfficeReader
to read style information fromconfig
- the configuration to useconverter
- the mainConverter
classnType
- the type of xhtml to use
-
-
Method Details
-
applyStyle
Apply a style, either by converting the style or by applying the style map from the configuarion- Parameters:
sStyleName
- name of the OpenDocument styleinfo
- theStyleInfo
object to add information to
-
getStyleDeclarations
Convert style information for used styles- Specified by:
getStyleDeclarations
in classStyleConverterHelper
- Parameters:
sIndent
- a String of spaces to add before each line
-
getClassNamePrefix
Return a prefix to be used in generated css class names- Returns:
- the prefix
-
getDefaultTagName
Create default tag name to represent a specific style, e.g.span
(text style) orul
(unordered list)- Parameters:
style
- to use- Returns:
- the tag name. If the style is null, a default result should be returned.
-
applyProperties
Convert formatting properties for a specific style.- Parameters:
style
- the style to convertprops
- theCSVList
object to add information tobInherit
- true if properties should be inherited from parent style(s)
-