[][src]Struct oox::shared::drawingml::sharedstylesheet::ObjectStyleDefaults

pub struct ObjectStyleDefaults {
    pub shape_definition: Option<Box<DefaultShapeDefinition>>,
    pub line_definition: Option<Box<DefaultShapeDefinition>>,
    pub text_definition: Option<Box<DefaultShapeDefinition>>,
}

Fields

shape_definition: Option<Box<DefaultShapeDefinition>>

This element defines the formatting that is associated with the default shape. The default formatting can be applied to a shape when it is initially inserted into a document.

Xml example

<spDef>
  <spPr>
    <solidFill>
      <schemeClr val="accent2">
        <shade val="75000"/>
      </schemeClr>
    </solidFill>
  </spPr>
  <bodyPr rtlCol="0" anchor="ctr"/>
  <lstStyle>
    <defPPr algn="ctr">
      <defRPr/>
    </defPPr>
  </lstStyle>
  <style>
    <lnRef idx="1">
      <schemeClr val="accent1"/>
    </lnRef>
    <fillRef idx="2">
      <schemeClr val="accent1"/>
    </fillRef>
    <effectRef idx="1">
      <schemeClr val="accent1"/>
    </effectRef>
    <fontRef idx="minor">
      <schemeClr val="dk1"/>
    </fontRef>
  </style>
</spDef>

In this example, we see a default shape which references a certain themed fill, line, effect, and font along with an override fill to these.

line_definition: Option<Box<DefaultShapeDefinition>>

This element defines a default line that is used within a document.

Xml example

<lnDef>
  <spPr/>
  <bodyPr/>
  <lstStyle/>
  <style>
    <lnRef idx="1">
      <schemeClr val="accent2"/>
    </lnRef>
    <fillRef idx="0">
      <schemeClr val="accent2"/>
    </fillRef>
    <effectRef idx="0">
      <schemeClr val="accent2"/>
    </effectRef>
    <fontRef idx="minor">
      <schemeClr val="tx1"/>
    </fontRef>
  </style>
</lnDef>

In this example, we see that the default line for the document is being defined as a themed line which references the subtle line style with idx equal to 1.

text_definition: Option<Box<DefaultShapeDefinition>>

This element defines the default formatting which is applied to text in a document by default. The default formatting can and should be applied to the shape when it is initially inserted into a document.

<txDef>
  <spPr>
    <solidFill>
      <schemeClr val="accent2">
        <shade val="75000"/>
      </schemeClr>
    </solidFill>
  </spPr>
  <bodyPr rtlCol="0" anchor="ctr"/>
  <lstStyle>
    <defPPr algn="ctr">
      <defRPr/>
    </defPPr>
  </lstStyle>
  <style>
    <lnRef idx="1">
      <schemeClr val="accent1"/>
    </lnRef>
    <fillRef idx="2">
      <schemeClr val="accent1"/>
    </fillRef>
    <effectRef idx="1">
      <schemeClr val="accent1"/>
    </effectRef>
    <fontRef idx="minor">
      <schemeClr val="dk1"/>
    </fontRef>
  </style>
</txDef>

Methods

impl ObjectStyleDefaults[src]

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

Trait Implementations

impl Clone for ObjectStyleDefaults[src]

impl Debug for ObjectStyleDefaults[src]

impl Default for ObjectStyleDefaults[src]

impl PartialEq<ObjectStyleDefaults> for ObjectStyleDefaults[src]

impl StructuralPartialEq for ObjectStyleDefaults[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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.