#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum MsoThemeColorIndex {
NotThemeColor,
Accent1,
Accent2,
Accent3,
Accent4,
Accent5,
Accent6,
Background1,
Background2,
Dark1,
Dark2,
FollowedHyperlink,
Hyperlink,
Light1,
Light2,
Text1,
Text2,
}
pub type MsoThemeColor = MsoThemeColorIndex;
impl MsoThemeColorIndex {
#[must_use]
pub const fn to_xml_str(self) -> &'static str {
match self {
Self::NotThemeColor => "",
Self::Accent1 => "accent1",
Self::Accent2 => "accent2",
Self::Accent3 => "accent3",
Self::Accent4 => "accent4",
Self::Accent5 => "accent5",
Self::Accent6 => "accent6",
Self::Background1 => "bg1",
Self::Background2 => "bg2",
Self::Dark1 => "dk1",
Self::Dark2 => "dk2",
Self::FollowedHyperlink => "folHlink",
Self::Hyperlink => "hlink",
Self::Light1 => "lt1",
Self::Light2 => "lt2",
Self::Text1 => "tx1",
Self::Text2 => "tx2",
}
}
#[must_use]
pub fn from_xml_str(s: &str) -> Option<Self> {
match s {
"" => Some(Self::NotThemeColor),
"accent1" => Some(Self::Accent1),
"accent2" => Some(Self::Accent2),
"accent3" => Some(Self::Accent3),
"accent4" => Some(Self::Accent4),
"accent5" => Some(Self::Accent5),
"accent6" => Some(Self::Accent6),
"bg1" => Some(Self::Background1),
"bg2" => Some(Self::Background2),
"dk1" => Some(Self::Dark1),
"dk2" => Some(Self::Dark2),
"folHlink" => Some(Self::FollowedHyperlink),
"hlink" => Some(Self::Hyperlink),
"lt1" => Some(Self::Light1),
"lt2" => Some(Self::Light2),
"tx1" => Some(Self::Text1),
"tx2" => Some(Self::Text2),
_ => None,
}
}
}
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum MsoLineDashStyle {
Dash,
DashDot,
DashDotDot,
LongDash,
LongDashDot,
RoundDot,
Solid,
SquareDot,
}
impl MsoLineDashStyle {
#[must_use]
pub const fn to_xml_str(self) -> &'static str {
match self {
Self::Dash => "dash",
Self::DashDot => "dashDot",
Self::DashDotDot => "lgDashDotDot",
Self::LongDash => "lgDash",
Self::LongDashDot => "lgDashDot",
Self::RoundDot => "sysDot",
Self::Solid => "solid",
Self::SquareDot => "sysDash",
}
}
#[must_use]
pub fn from_xml_str(s: &str) -> Option<Self> {
match s {
"dash" => Some(Self::Dash),
"dashDot" => Some(Self::DashDot),
"lgDashDotDot" => Some(Self::DashDotDot),
"lgDash" => Some(Self::LongDash),
"lgDashDot" => Some(Self::LongDashDot),
"sysDot" => Some(Self::RoundDot),
"solid" => Some(Self::Solid),
"sysDash" => Some(Self::SquareDot),
_ => None,
}
}
}
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum MsoFillType {
Background,
Gradient,
Group,
Patterned,
Picture,
Solid,
Textured,
}
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum MsoColorType {
Rgb,
Scheme,
Hsl,
Preset,
ScRgb,
System,
}