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, styleNamesFields 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 voidapplyProperties(StyleWithProperties style, CSVList props, boolean bInherit) Convert formatting properties for a specific style.voidapplyStyle(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 StringCreate 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, scaleMethods inherited from class writer2latex.xhtml.ConverterHelper
applyStyle, getCellSc, getDrawCv, getFrameSc, 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- anOfficeReaderto read style information fromconfig- the configuration to useconverter- the mainConverterclassnType- 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- theStyleInfoobject to add information to
-
getStyleDeclarations
Convert style information for used styles- Specified by:
getStyleDeclarationsin 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- theCSVListobject to add information tobInherit- true if properties should be inherited from parent style(s)
-