[][src]Struct msoffice_shared::drawingml::OfficeStyleSheet

pub struct OfficeStyleSheet {
    pub name: Option<String>,
    pub theme_elements: Box<BaseStyles>,
    pub object_defaults: Option<ObjectStyleDefaults>,
    pub extra_color_scheme_list: Vec<ColorSchemeAndMapping>,
    pub custom_color_list: Vec<CustomColor>,
}

Fields

name: Option<String>theme_elements: Box<BaseStyles>

This element defines the theme formatting options for the theme and is the workhorse of the theme. This is where the bulk of the shared theme information is contained and used by a document. This element contains the color scheme, font scheme, and format scheme elements which define the different formatting aspects of what a theme defines.

Xml example

<themeElements>
  <clrScheme name="sample">
    ...
  </clrScheme>
  <fontScheme name="sample">
    ...
  </fontScheme>
  <fmtScheme name="sample">
    <fillStyleLst>
      ...
    </fillStyleLst>
    <lnStyleLst>
      ...
    </lnStyleLst>
    <effectStyleLst>
      ...
    </effectStyleLst>
    <bgFillStyleLst>
      ...
    </bgFillStyleLst>
  </fmtScheme>
</themeElements>

In this example, we see the basic structure of how a theme elements is defined and have left out the true guts of each individual piece to save room. Each part (color scheme, font scheme, format scheme) is defined elsewhere within DrawingML.

object_defaults: Option<ObjectStyleDefaults>

This element allows for the definition of default shape, line, and textbox formatting properties. An application can use this information to format a shape (or text) initially on insertion into a document.

extra_color_scheme_list: Vec<ColorSchemeAndMapping>

This element is a container for the list of extra color schemes present in a document.

An ColorSchemeAndMapping element defines an auxiliary color scheme, which includes both a color scheme and color mapping. This is mainly used for backward compatibility concerns and roundtrips information required by earlier versions.

Xml example

<extraClrScheme>
  <clrScheme name="extraColorSchemeSample">
    <dk1>
      <sysClr val="windowText"/>
    </dk1>
    <lt1>
      <sysClr val="window"/>
    </lt1>
    <dk2>
      <srgbClr val="04617B"/>
    </dk2>
    <lt2>
      <srgbClr val="DBF5F9"/>
    </lt2>
    <accent1>
      <srgbClr val="0F6FC6"/>
    </accent1>
    <accent2>
      <srgbClr val="009DD9"/>
    </accent2>
    <accent3>
      <srgbClr val="0BD0D9"/>
    </accent3>
    <accent4>
      <srgbClr val="10CF9B"/>
    </accent4>
    <accent5>
      <srgbClr val="7CCA62"/>
    </accent5>
    <accent6>
      <srgbClr val="A5C249"/>
    </accent6>
    <hlink>
      <srgbClr val="FF9800"/>
    </hlink>
    <folHlink>
      <srgbClr val="F45511"/>
    </folHlink>
  </clrScheme>
  <clrMap bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1"
    accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5"
    accent6="accent6" hlink="hlink" folHlink="folHlink"/>
</extraClrScheme>
custom_color_list: Vec<CustomColor>

This element allows for a custom color palette to be created and which shows up alongside other color schemes. This can be very useful, for example, when someone would like to maintain a corporate color palette.

Methods

impl OfficeStyleSheet[src]

pub fn from_zip_file(zip_file: &mut ZipFile) -> Result<Self, Box<dyn Error>>[src]

pub fn from_xml_element(xml_node: &XmlNode) -> Result<Self, Box<dyn Error>>[src]

Trait Implementations

impl Clone for OfficeStyleSheet[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for OfficeStyleSheet[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]