xlsx-0.3.0: Simple and incomplete Excel file parser/writer

Safe HaskellNone
LanguageHaskell2010

Codec.Xlsx.Types.RichText

Contents

Synopsis

Main types

data RichTextRun Source #

Rich Text Run

This element represents a run of rich text. A rich text run is a region of text that share a common set of properties, such as formatting properties.

Section 18.4.4, "r (Rich Text Run)" (p. 1724)

Constructors

RichTextRun 

Fields

  • _richTextRunProperties :: Maybe RunProperties

    This element represents a set of properties to apply to the contents of this rich text run.

  • _richTextRunText :: Text

    This element represents the text content shown as part of a string.

    NOTE: RichTextRun elements with an empty text field will result in an error when opening the file in Excel.

    Section 18.4.12, "t (Text)" (p. 1727)

data RunProperties Source #

Run properties

Section 18.4.7, "rPr (Run Properties)" (p. 1725)

Constructors

RunProperties 

Fields

  • _runPropertiesBold :: Maybe Bool

    Displays characters in bold face font style.

    Section 18.8.2, "b (Bold)" (p. 1757)

  • _runPropertiesCharset :: Maybe Int

    This element defines the font character set of this font.

    Section 18.4.1, "charset (Character Set)" (p. 1721)

  • _runPropertiesColor :: Maybe Color

    One of the colors associated with the data bar or color scale.

    Section 18.3.1.15, "color (Data Bar Color)" (p. 1608)

  • _runPropertiesCondense :: Maybe Bool

    Macintosh compatibility setting. Represents special word/character rendering on Macintosh, when this flag is set. The effect is to condense the text (squeeze it together).

    Section 18.8.12, "condense (Condense)" (p. 1764)

  • _runPropertiesExtend :: Maybe Bool

    This element specifies a compatibility setting used for previous spreadsheet applications, resulting in special word/character rendering on those legacy applications, when this flag is set. The effect extends or stretches out the text.

    Section 18.8.17, "extend (Extend)" (p. 1766)

  • _runPropertiesFontFamily :: Maybe FontFamily

    The font family this font belongs to. A font family is a set of fonts having common stroke width and serif characteristics. This is system level font information. The font name overrides when there are conflicting values.

    Section 18.8.18, "family (Font Family)" (p. 1766)

  • _runPropertiesItalic :: Maybe Bool

    Displays characters in italic font style. The italic style is defined by the font at a system level and is not specified by ECMA-376.

    Section 18.8.26, "i (Italic)" (p. 1773)

  • _runPropertiesOutline :: Maybe Bool

    This element displays only the inner and outer borders of each character. This is very similar to Bold in behavior.

    Section 18.4.2, "outline (Outline)" (p. 1722)

  • _runPropertiesFont :: Maybe Text

    This element is a string representing the name of the font assigned to display this run.

    Section 18.4.5, "rFont (Font)" (p. 1724)

  • _runPropertiesScheme :: Maybe FontScheme

    Defines the font scheme, if any, to which this font belongs. When a font definition is part of a theme definition, then the font is categorized as either a major or minor font scheme component. When a new theme is chosen, every font that is part of a theme definition is updated to use the new major or minor font definition for that theme. Usually major fonts are used for styles like headings, and minor fonts are used for body and paragraph text.

    Section 18.8.35, "scheme (Scheme)" (p. 1794)

  • _runPropertiesShadow :: Maybe Bool

    Macintosh compatibility setting. Represents special word/character rendering on Macintosh, when this flag is set. The effect is to render a shadow behind, beneath and to the right of the text.

    Section 18.8.36, "shadow (Shadow)" (p. 1795)

  • _runPropertiesStrikeThrough :: Maybe Bool

    This element draws a strikethrough line through the horizontal middle of the text.

    Section 18.4.10, "strike (Strike Through)" (p. 1726)

  • _runPropertiesSize :: Maybe Double

    This element represents the point size (1/72 of an inch) of the Latin and East Asian text.

    Section 18.4.11, "sz (Font Size)" (p. 1727)

  • _runPropertiesUnderline :: Maybe FontUnderline

    This element represents the underline formatting style.

    Section 18.4.13, "u (Underline)" (p. 1728)

  • _runPropertiesVertAlign :: Maybe FontVerticalAlignment

    This element adjusts the vertical position of the text relative to the text's default appearance for this run. It is used to get superscript or subscript texts, and shall reduce the font size (if a smaller size is available) accordingly.

    Section 18.4.14, "vertAlign (Vertical Alignment)" (p. 1728)

applyRunProperties :: RunProperties -> RichTextRun -> RichTextRun Source #

Apply properties to a RichTextRun

If the RichTextRun specifies its own properties, then these overrule the properties specified here. For example, adding bold to a RichTextRun which is already italic will make the RichTextRun both bold and italic@ but adding it to one that that is explicitly _not_ bold will leave the RichTextRun unchanged.

Lenses

RichTextRun

RunProperties