spreadsheet_ods/style/
tabstop.rs

1//!
2//! Defines tabstops for paragraph styles.
3//!
4
5use crate::attrmap2::AttrMap2;
6use crate::color::Rgb;
7use crate::style::color_string;
8use crate::style::units::{Length, LineStyle, LineType, LineWidth, TabStopType};
9use crate::style::TextStyleRef;
10use get_size2::GetSize;
11
12/// The <style:tab-stops> element is a container for <style:tab-stop> elements.
13/// If a style contains a <style:tab-stops> element, it overrides the entire <style:tab-stops>
14/// element of the parent style such that no <style:tab-stop> children are inherited; otherwise,
15/// the style inherits the entire <style:tab-stops> element as specified in section 16.2
16/// <style:style>.
17#[derive(Clone, Debug, Default, GetSize)]
18pub struct TabStop {
19    attr: AttrMap2,
20}
21
22impl TabStop {
23    /// Empty.
24    pub fn new() -> Self {
25        Self {
26            attr: Default::default(),
27        }
28    }
29
30    /// General attributes.
31    pub fn attrmap(&self) -> &AttrMap2 {
32        &self.attr
33    }
34
35    /// General attributes.
36    pub fn attrmap_mut(&mut self) -> &mut AttrMap2 {
37        &mut self.attr
38    }
39
40    style_char!(attr);
41    style_leader_color!(attr);
42    style_leader_style!(attr);
43    style_leader_text!(attr);
44    style_leader_text_style!(attr);
45    style_leader_type!(attr);
46    style_leader_width!(attr);
47    style_position!(attr);
48    style_type!(attr);
49}