docx_reader/documents/elements/
wps_text_box.rsuse super::*;
use serde::Serialize;
#[derive(Debug, Clone, Serialize, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct WpsTextBox {
pub children: Vec<TextBoxContent>,
pub has_numbering: bool,
}
impl WpsTextBox {
pub fn new() -> WpsTextBox {
Default::default()
}
pub fn add_content(mut self, c: TextBoxContent) -> Self {
if c.has_numbering {
self.has_numbering = true
}
self.children.push(c);
self
}
}
impl Default for WpsTextBox {
fn default() -> Self {
WpsTextBox {
children: vec![],
has_numbering: false,
}
}
}