Package writer2latex.xhtml
Class PageStyleConverter
java.lang.Object
writer2latex.xhtml.StyleConverterHelper
writer2latex.xhtml.PageStyleConverter
This class converts OpenDocument page styles to CSS2 styles.
A page style in a presentation is represented through the master page,
which links to a page layout defining the geometry and optionally a drawing
page defining the drawing background.
In a presentation document we export the full page style.
In a text document we export the writing direction, background color and footnote rule for the first master page only
-
Field Summary
Fields inherited from class writer2latex.xhtml.StyleConverterHelper
bConvertHard, bConvertStyles, nType, styleMap, styleNames -
Constructor Summary
ConstructorsConstructorDescriptionPageStyleConverter(OfficeReader ofr, XhtmlConfig config, Converter converter, int nType) Create a newPageStyleConverter -
Method Summary
Modifier and TypeMethodDescriptionvoidApply default writing direction (based on first master page)voidApply footnote rule formatting (based on first master page)voidapplyStyle(String sStyleName, StyleInfo info) Apply a master page style - currently only for presentationsgetStyleDeclarations(String sIndent) Convert style information for used stylesGet the family of page styles (master pages)Get the text width of the first master page (page width minus left and right margin)Methods inherited from class writer2latex.xhtml.StyleConverterHelper
applyDirection, applyLang, colScale, scale
-
Constructor Details
-
PageStyleConverter
Create a newPageStyleConverter- Parameters:
ofr- anOfficeReaderto read style information fromconfig- the configuration to useconverter- the mainConverterclassnType- the type of xhtml to use
-
-
Method Details
-
getTextWidth
Get the text width of the first master page (page width minus left and right margin)- Returns:
- the text width
-
applyFootnoteRuleStyle
Apply footnote rule formatting (based on first master page)- Parameters:
info- then StyleInfo to which style information should be attached
-
applyDefaultWritingDirection
Apply default writing direction (based on first master page)- Parameters:
info- then StyleInfo to which style information should be attached
-
applyStyle
Apply a master page style - currently only for presentations- Parameters:
sStyleName- The name of the master pageinfo- the StyleInfo to which style information should be attached
-
getStyleDeclarations
Convert style information for used styles- Specified by:
getStyleDeclarationsin classStyleConverterHelper- Parameters:
sIndent- a String of spaces to add before each line
-
getStyles
Get the family of page styles (master pages)- Specified by:
getStylesin classStyleConverterHelper- Returns:
- the style family
-