Struct Annotation

Source
pub struct Annotation { /* private fields */ }
Expand description

The office:annotation element specifies an OpenDocument annotation. The annotation’s text is contained in text:p and text:list elements.

Implementations§

Source§

impl Annotation

Source

pub fn new_empty() -> Self

New annotation.

Source

pub fn new<S: Into<String>>(annotation: S) -> Self

New annotation.

Source

pub fn attrmap(&self) -> &AttrMap2

Allows access to all attributes of the style itself.

Source

pub fn attrmap_mut(&mut self) -> &mut AttrMap2

Allows access to all attributes of the style itself.

Source

pub fn name(&self) -> &str

Name

Source

pub fn set_name<S: Into<String>>(&mut self, name: S)

Name

Source

pub fn display(&self) -> bool

Display

Source

pub fn set_display(&mut self, display: bool)

Name

Source

pub fn creator(&self) -> Option<&String>

Creator

Source

pub fn set_creator<S: Into<String>>(&mut self, creator: Option<S>)

Creator

Source

pub fn date(&self) -> Option<&NaiveDateTime>

Date of the annotation.

Source

pub fn set_date(&mut self, date: Option<NaiveDateTime>)

Date of the annotation.

Source

pub fn text(&self) -> &Vec<TextTag>

Text.

Source

pub fn push_text(&mut self, text: TextTag)

Text.

Source

pub fn push_text_str<S: Into<String>>(&mut self, text: S)

Text.

Source

pub fn set_text(&mut self, text: Vec<TextTag>)

Text.

Source

pub fn set_draw_caption_point_x(&mut self, x: Length)

The draw:caption-point-x attribute, along with draw:caption-point-y specifies the position of a point that is captioned. A set of lines is rendered to that point from the caption area.

Source

pub fn set_draw_caption_point_y(&mut self, y: Length)

The draw:caption-point-y attribute, along with draw:caption-point-y specifies the position of a point that is captioned. A set of lines is rendered to that point from the caption area.

Source

pub fn set_draw_class_names(&mut self, names: &[GraphicStyleRef])

The draw:class-names attribute specifies a white-space-separated list of styles with the family value of graphic. The referenced styles are applied in the order they are contained in the list. If both draw:style-name and draw:class-names are present, the style referenced by the draw:style-name attribute is applied before the styles referenced by the draw:class-names attribute.

Source

pub fn set_draw_corner_radius(&mut self, radius: u32)

The draw:corner-radius attribute specifies the radius of the circle used to round off the corners of a caption draw:caption, rectangle draw:rect, or a text-box draw:textbox. The svg:rx 19.554 and svg:ry 19.555 attributes can also be used to round off the corners of a rectangle draw:rect.

If svg:rx and/or svg:ry and draw:corner-radius attributes are present on an element, the svg:rx and svg:ry attributes control the rounding applied to the shape defined by the element. If one or both of svg:rx and svg:ry attributes are present, any draw:corner-radius attribute is ignored.

Source

pub fn set_draw_id<S: Into<String>>(&mut self, id: S)

The draw:id attribute specifies identifiers for draw elements. OpenDocument consumers shall ignore a draw:id attribute if it occurs on a draw element with an xml:id attribute value. OpenDocument producers may write draw:id attributes for any draw element in addition to an xml:id attribute. The value of a draw:id attribute shall equal the value of an xml:id attribute on the same element.

The draw:id attribute is deprecated in favor of xml:id

Source

pub fn set_draw_layer<S: Into<String>>(&mut self, layer: S)

The draw:layer attribute specifies the name of a layer in the layer-set of a document.

Note: The effect of this attribute is to assign a shape to a particular layer.

Source

pub fn set_draw_style_name(&mut self, style: GraphicStyleRef)

The draw:style-name attribute specifies the name of a style:style element with a style:family attribute value value of graphic.

Source

pub fn set_draw_text_style_name(&mut self, style: ParagraphStyleRef)

The draw:text-style-name attribute specifies a style for formatting of text in a shape. The value of this attribute is the name of a style:style 16.2 element with a style:family 19.480 attribute value of paragraph.

Source

pub fn set_draw_transform<S: AsRef<str>>(&mut self, transform: &[S])

The draw:transform attribute specifies a list of transformations that can be applied to a drawing shape. The value of this attribute is a list of transform definitions, which are applied to the drawing shape in the order in which they are listed. The transform definitions in the list shall be separated by a white space and/or a comma “,” (U+002C, COMMA). Unless otherwise stated, the parameters of the transform definitions are double values (18.2)

The defined transforms are: • matrix(a b c d e f), specifies a transformation in the form of a transformation matrix of six values. “The values describe a standard 3x2 homogeneous transformation matrix in column-major order, where the right column (e, f) describes the translation. • rotate(rotate-angle), specifies a rotation by rotate-angle degrees about the origin of the shape’s coordinate system. • scale(sx [sy]), specifies a scale operation by sx and sy. If sy is not provided, it is assumed to be equal to sx. • skewX(skew-angle), specifies a skew transformation by skew-angle degrees along the x-axis. • skewY(skew-angle), specifies a skew transformation by skew-angle degrees along the y-axis. • translate(tx [ty]), specifies a translation by tx and ty, where tx and ty are lengths (18.3.18). If ty is not provided, it is assumed to be zero.

Source

pub fn set_draw_z_index(&mut self, z_index: u32)

The draw:z-index attribute defines a rendering order for shapes in a document instance. In the absence of this attribute, shapes are rendered in the order in which they appear in the document. The draw:z-index values increase from back to front.

For a shape on which the style:run-through 20.351 attribute with value foreground is in effect, producers should not generate a draw:z-index value that is smaller than the value of any draw:z-index on a shape on which the style:run-through attribute with value background is in effect.

Producers shall not generate a draw:z-index for shapes that are children of a draw:g element 10.3.15 or a dr3d:scene element 10.5.2.

Source

pub fn set_height(&mut self, height: Length)

Height.

Source

pub fn set_width(&mut self, width: Length)

Width.

Source

pub fn svg_x(&mut self, x: Length)

See §5.1.2 of SVG. For drawing shapes that have a non-rectangular shape, the coordinate refers to the drawing shape’s bounding box.

Source

pub fn svg_y(&mut self, y: Length)

See §5.1.2 of SVG. For drawing shapes that have a non-rectangular shape, the coordinate refers to the drawing shape’s bounding box.

Source

pub fn set_table_end_cell_address(&mut self, cellref: CellRef)

The table:end-cell-address attribute specifies the end position of the shape if it is included in a spreadsheet document.

Source

pub fn set_table_end_x(&mut self, x: Length)

The table:end-x attribute specifies the x-coordinate of the end position of a shape relative to the top-left edge of a cell. The size attributes of the shape are ignored.

Source

pub fn set_table_end_y(&mut self, y: Length)

The table:end-y attribute specifies the y-coordinate of the end position of a shape relative to the top-left edge of a cell. The size attributes of the shape are ignored.

Source

pub fn set_table_table_background(&mut self, is_bg: bool)

The table:table-background attribute specifies whether a shape is in the table background if the drawing shape is included in a spreadsheet document.

The defined values for the table:table-background attribute are:

  • false: shape is included in foreground of a table.
  • true: shape is included in background of a table.
Source

pub fn set_xml_id<S: Into<String>>(&mut self, id: S)

The table:end-y attribute specifies the y-coordinate of the end position of a shape relative to the top-left edge of a cell. The size attributes of the shape are ignored.

Trait Implementations§

Source§

impl Clone for Annotation

Source§

fn clone(&self) -> Annotation

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Annotation

Source§

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

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

impl GetSize for Annotation

Source§

fn get_heap_size(&self) -> usize

Determines how many bytes this object occupies inside the heap. Read more
Source§

fn get_stack_size() -> usize

Determines how may bytes this object occupies inside the stack. Read more
Source§

fn get_heap_size_with_tracker<T>(&self, tracker: T) -> (usize, T)
where T: GetSizeTracker,

Determines how many bytes this object occupies inside the heap while using a tracker. Read more
Source§

fn get_size(&self) -> usize

Determines the total size of the object. Read more
Source§

fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)
where T: GetSizeTracker,

Determines the total size of the object while using a tracker. Read more

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> 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.