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
public abstract class StyleWithPropertiesConverterHelper extends StyleConverterHelper
This is an abstract class to convert an OpenDocument style family represented by
StyleWithPropertiesto 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
Constructors Constructor Description StyleWithPropertiesConverterHelper(OfficeReader ofr, XhtmlConfig config, Converter converter, int nType)Create a newStyleWithPropertiesConverterHelper
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidapplyProperties(StyleWithProperties style, CSVList props, boolean bInherit)Convert formatting properties for a specific style.voidapplyStyle(java.lang.String sStyleName, StyleInfo info)Apply a style, either by converting the style or by applying the style map from the configuarionjava.lang.StringgetClassNamePrefix()Return a prefix to be used in generated css class namesabstract java.lang.StringgetDefaultTagName(StyleWithProperties style)Create default tag name to represent a specific style, e.g.java.lang.StringgetStyleDeclarations(java.lang.String sIndent)Convert style information for used styles-
Methods 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 Detail
-
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 Detail
-
applyStyle
public void applyStyle(java.lang.String sStyleName, StyleInfo info)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
public java.lang.String getStyleDeclarations(java.lang.String sIndent)
Convert style information for used styles- Specified by:
getStyleDeclarationsin classStyleConverterHelper- Parameters:
sIndent- a String of spaces to add before each line
-
getClassNamePrefix
public java.lang.String getClassNamePrefix()
Return a prefix to be used in generated css class names- Returns:
- the prefix
-
getDefaultTagName
public abstract java.lang.String getDefaultTagName(StyleWithProperties style)
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
public abstract void applyProperties(StyleWithProperties style, CSVList props, boolean bInherit)
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)
-
-