xlsx-1.1.0.1: Simple and incomplete Excel file parser/writer
Safe HaskellSafe-Inferred
LanguageHaskell2010

Codec.Xlsx.Types.RichText

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)

Instances

Instances details
Generic RichTextRun Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

Associated Types

type Rep RichTextRun :: Type -> Type #

Show RichTextRun Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

Default RichTextRun Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

Methods

def :: RichTextRun #

NFData RichTextRun Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

Methods

rnf :: RichTextRun -> () #

Eq RichTextRun Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

Ord RichTextRun Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

FromCursor RichTextRun Source #

See CT_RElt, p. 3903

Instance details

Defined in Codec.Xlsx.Types.RichText

FromXenoNode RichTextRun Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

ToElement RichTextRun Source #

See CT_RElt, p. 3903

Instance details

Defined in Codec.Xlsx.Types.RichText

type Rep RichTextRun Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

type Rep RichTextRun = D1 ('MetaData "RichTextRun" "Codec.Xlsx.Types.RichText" "xlsx-1.1.0.1-FKUF1Jx3xuq9irRu3xJWCs" 'False) (C1 ('MetaCons "RichTextRun" 'PrefixI 'True) (S1 ('MetaSel ('Just "_richTextRunProperties") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe RunProperties)) :*: S1 ('MetaSel ('Just "_richTextRunText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

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)

Instances

Instances details
Monoid RunProperties Source #

The Monoid instance for RunProperties is biased: later properties override earlier ones.

Instance details

Defined in Codec.Xlsx.Types.RichText

Semigroup RunProperties Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

Generic RunProperties Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

Associated Types

type Rep RunProperties :: Type -> Type #

Show RunProperties Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

Default RunProperties Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

Methods

def :: RunProperties #

NFData RunProperties Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

Methods

rnf :: RunProperties -> () #

Eq RunProperties Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

Ord RunProperties Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

FromCursor RunProperties Source #

See CT_RPrElt, p. 3903

Instance details

Defined in Codec.Xlsx.Types.RichText

FromXenoNode RunProperties Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

ToElement RunProperties Source #

See CT_RPrElt, p. 3903

Instance details

Defined in Codec.Xlsx.Types.RichText

type Rep RunProperties Source # 
Instance details

Defined in Codec.Xlsx.Types.RichText

type Rep RunProperties = D1 ('MetaData "RunProperties" "Codec.Xlsx.Types.RichText" "xlsx-1.1.0.1-FKUF1Jx3xuq9irRu3xJWCs" 'False) (C1 ('MetaCons "RunProperties" 'PrefixI 'True) (((S1 ('MetaSel ('Just "_runPropertiesBold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "_runPropertiesCharset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "_runPropertiesColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Color)))) :*: ((S1 ('MetaSel ('Just "_runPropertiesCondense") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "_runPropertiesExtend") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "_runPropertiesFontFamily") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FontFamily)) :*: S1 ('MetaSel ('Just "_runPropertiesItalic") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))) :*: (((S1 ('MetaSel ('Just "_runPropertiesOutline") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "_runPropertiesFont") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "_runPropertiesScheme") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FontScheme)) :*: S1 ('MetaSel ('Just "_runPropertiesShadow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "_runPropertiesStrikeThrough") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "_runPropertiesSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double))) :*: (S1 ('MetaSel ('Just "_runPropertiesUnderline") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FontUnderline)) :*: S1 ('MetaSel ('Just "_runPropertiesVertAlign") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FontVerticalAlignment)))))))

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