Skip to main content

TableCellProperties

Struct TableCellProperties 

Source
pub struct TableCellProperties {
    pub margin_left_emu: Option<i64>,
    pub margin_top_emu: Option<i64>,
    pub margin_right_emu: Option<i64>,
    pub margin_bottom_emu: Option<i64>,
    pub anchor: Option<TextAnchor>,
    pub border_left: Option<Line>,
    pub border_right: Option<Line>,
    pub border_top: Option<Line>,
    pub border_bottom: Option<Line>,
    pub fill: Option<Fill>,
}
Expand description

A TableCell’s own property overrides (<a:tcPr>, CT_TableCellProperties). Not modeled: anchorCtr/horzOverflow attributes, the diagonal borders (<a:lnTlToBr>/<a:lnBlToTr>), and <a:cell3D> (bevel/lighting effects) — all secondary refinements on top of margins, vertical anchor, four straight borders, and background fill. Grounded against a real fixture, which confirmed the attribute set and the lnL/lnR/lnT/lnB then fill-choice element order (CT_TableCellProperties’s own sequence).

Fields§

§margin_left_emu: Option<i64>

marL, in EMUs.

§margin_top_emu: Option<i64>

marT, in EMUs.

§margin_right_emu: Option<i64>

marR, in EMUs.

§margin_bottom_emu: Option<i64>

marB, in EMUs.

§anchor: Option<TextAnchor>

anchor — vertical alignment of this cell’s text within its own height. Reuses drawing::TextAnchor directly, the same type <a:bodyPr anchor=".."> uses (CT_TableCellProperties and CT_TextBodyProperties both reference ST_TextAnchoringType).

§border_left: Option<Line>

<a:lnL> — this cell’s left border.

§border_right: Option<Line>

<a:lnR> — this cell’s right border.

§border_top: Option<Line>

<a:lnT> — this cell’s top border.

§border_bottom: Option<Line>

<a:lnB> — this cell’s bottom border.

§fill: Option<Fill>

EG_FillProperties — this cell’s own background fill, overriding the table style’s own cell fill.

Implementations§

Source§

impl TableCellProperties

Source

pub fn new() -> TableCellProperties

Source

pub fn with_margins_emu( self, left: i64, top: i64, right: i64, bottom: i64, ) -> TableCellProperties

Sets all four margins at once, in EMUs.

Source

pub fn with_anchor(self, anchor: TextAnchor) -> TableCellProperties

Sets this cell’s vertical text anchor.

Source

pub fn with_border_left(self, border: Line) -> TableCellProperties

Sets this cell’s left border.

Source

pub fn with_border_right(self, border: Line) -> TableCellProperties

Sets this cell’s right border.

Source

pub fn with_border_top(self, border: Line) -> TableCellProperties

Sets this cell’s top border.

Source

pub fn with_border_bottom(self, border: Line) -> TableCellProperties

Sets this cell’s bottom border.

Source

pub fn with_fill(self, fill: Fill) -> TableCellProperties

Sets this cell’s own background fill.

Trait Implementations§

Source§

impl Clone for TableCellProperties

Source§

fn clone(&self) -> TableCellProperties

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TableCellProperties

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for TableCellProperties

Source§

fn default() -> TableCellProperties

Returns the “default value” for a type. Read more
Source§

impl PartialEq for TableCellProperties

Source§

fn eq(&self, other: &TableCellProperties) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TableCellProperties

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.