Class PageStyleConverter


public class PageStyleConverter extends StyleConverterHelper
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
  • Constructor Details

    • PageStyleConverter

      public PageStyleConverter(OfficeReader ofr, XhtmlConfig config, Converter converter, int nType)
      Create a new PageStyleConverter
      Parameters:
      ofr - an OfficeReader to read style information from
      config - the configuration to use
      converter - the main Converter class
      nType - the type of xhtml to use
  • Method Details

    • getTextWidth

      public String getTextWidth()
      Get the text width of the first master page (page width minus left and right margin)
      Returns:
      the text width
    • applyFootnoteRuleStyle

      public void applyFootnoteRuleStyle(StyleInfo info)
      Apply footnote rule formatting (based on first master page)
      Parameters:
      info - then StyleInfo to which style information should be attached
    • applyDefaultWritingDirection

      public void applyDefaultWritingDirection(StyleInfo info)
      Apply default writing direction (based on first master page)
      Parameters:
      info - then StyleInfo to which style information should be attached
    • applyStyle

      public void applyStyle(String sStyleName, StyleInfo info)
      Apply a master page style - currently only for presentations
      Parameters:
      sStyleName - The name of the master page
      info - the StyleInfo to which style information should be attached
    • getStyleDeclarations

      public String getStyleDeclarations(String sIndent)
      Convert style information for used styles
      Specified by:
      getStyleDeclarations in class StyleConverterHelper
      Parameters:
      sIndent - a String of spaces to add before each line
    • getStyles

      public OfficeStyleFamily getStyles()
      Get the family of page styles (master pages)
      Specified by:
      getStyles in class StyleConverterHelper
      Returns:
      the style family