Skip to main content

easydoc_core/document/
document_text_run.rs

1/// 带常用富文本属性的文本片段。
2///
3/// 对应 OOXML `<w:r>` 元素,包含 `<w:rPr>` 属性(粗体/斜体/删除线等)。
4/// 无直接 Java 对应,是 easydoc-rust 自创的语义模型。
5#[derive(Clone, Debug, Default, PartialEq, Eq)]
6pub struct DocumentTextRun {
7    /// 原始文本。
8    pub text: String,
9    /// 是否加粗。
10    pub bold: bool,
11    /// 是否斜体。
12    pub italic: bool,
13    /// 是否删除线。
14    pub strikethrough: bool,
15    /// 可选超链接地址。
16    pub hyperlink: Option<String>,
17}