#[cfg(feature = "serde")]
use serde::Serialize;
use crate::raw::drawing::{st_types::emu_to_pt, text::paragraph::tab_stop::XlsxTabStop};
use super::tab_alignment_values::TextTabAlignmentValues;
#[derive(Debug, Clone, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize))]
pub struct TabStop {
pub alignment: TextTabAlignmentValues,
pub position: f64,
}
impl TabStop {
pub(crate) fn from_raw(raw: XlsxTabStop) -> Self {
return Self {
alignment: TextTabAlignmentValues::from_string(raw.alignment),
position: emu_to_pt(raw.position.unwrap_or(914400)), };
}
}