docx_rust/formatting/
table_row_property.rs1use hard_xml::{XmlRead, XmlWrite};
2
3use crate::{__setter, __xml_test_suites, formatting::TableHeader, formatting::TableJustification};
4
5#[derive(Debug, Default, XmlRead, XmlWrite, Clone)]
14#[cfg_attr(test, derive(PartialEq))]
15#[xml(tag = "w:trPr")]
16pub struct TableRowProperty {
17 #[xml(child = "w:jc")]
19 pub justification: Option<TableJustification>,
20 #[xml(child = "w:tblHeader")]
22 pub table_header: Option<TableHeader>,
23}
24
25impl TableRowProperty {
26 __setter!(justification: Option<TableJustification>);
27 __setter!(table_header: Option<TableHeader>);
28}
29
30__xml_test_suites!(
31 TableRowProperty,
32 TableRowProperty::default(),
33 r#"<w:trPr/>"#,
34 TableRowProperty::default()
35 .justification(crate::formatting::TableJustificationVal::Start)
36 .table_header(crate::formatting::OnOffOnlyType::On),
37 r#"<w:trPr><w:jc w:val="start"/><w:tblHeader w:val="on"/></w:trPr>"#,
38);