From fbe87945e0385f0c1d02ed37e18d0b99ea164e96 Mon Sep 17 00:00:00 2001 From: "Carlos M." <104429706+CMGSK@users.noreply.github.com> Date: Fri, 2 May 2025 14:28:08 +0200 Subject: [PATCH] Change Style RunProperty internal structs val to public (#814) --- docx-core/src/documents/elements/bold.rs | 2 +- docx-core/src/documents/elements/bold_cs.rs | 2 +- docx-core/src/documents/elements/caps.rs | 2 +- .../documents/elements/character_spacing.rs | 2 +- docx-core/src/documents/elements/color.rs | 2 +- docx-core/src/documents/elements/highlight.rs | 2 +- docx-core/src/documents/elements/italic.rs | 2 +- docx-core/src/documents/elements/italic_cs.rs | 2 +- .../src/documents/elements/line_spacing.rs | 12 ++++++------ docx-core/src/documents/elements/link.rs | 2 +- docx-core/src/documents/elements/run_fonts.rs | 18 +++++++++--------- docx-core/src/documents/elements/sz.rs | 2 +- docx-core/src/documents/elements/sz_cs.rs | 2 +- docx-core/src/documents/elements/underline.rs | 2 +- docx-core/src/documents/elements/vert_align.rs | 2 +- 15 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docx-core/src/documents/elements/bold.rs b/docx-core/src/documents/elements/bold.rs index edc6be1..a2f6461 100644 --- a/docx-core/src/documents/elements/bold.rs +++ b/docx-core/src/documents/elements/bold.rs @@ -6,7 +6,7 @@ use crate::xml_builder::*; #[derive(Debug, Clone, Deserialize, PartialEq)] pub struct Bold { - val: bool, + pub val: bool, } impl Bold { diff --git a/docx-core/src/documents/elements/bold_cs.rs b/docx-core/src/documents/elements/bold_cs.rs index ce32e39..098ac0d 100644 --- a/docx-core/src/documents/elements/bold_cs.rs +++ b/docx-core/src/documents/elements/bold_cs.rs @@ -6,7 +6,7 @@ use crate::xml_builder::*; #[derive(Debug, Clone, Deserialize, PartialEq)] pub struct BoldCs { - val: bool, + pub val: bool, } impl BoldCs { diff --git a/docx-core/src/documents/elements/caps.rs b/docx-core/src/documents/elements/caps.rs index 37be22c..880b807 100644 --- a/docx-core/src/documents/elements/caps.rs +++ b/docx-core/src/documents/elements/caps.rs @@ -8,7 +8,7 @@ use crate::{xml_builder::XMLBuilder, BuildXML}; #[derive(Debug, Clone, Deserialize, PartialEq)] pub struct Caps { - val: bool, + pub val: bool, } impl Caps { diff --git a/docx-core/src/documents/elements/character_spacing.rs b/docx-core/src/documents/elements/character_spacing.rs index acba6b4..683aa0f 100644 --- a/docx-core/src/documents/elements/character_spacing.rs +++ b/docx-core/src/documents/elements/character_spacing.rs @@ -7,7 +7,7 @@ use serde::*; #[derive(Debug, Clone, Deserialize, PartialEq)] #[serde(rename_all = "camelCase")] pub struct CharacterSpacing { - value: i32, + pub value: i32, } impl CharacterSpacing { diff --git a/docx-core/src/documents/elements/color.rs b/docx-core/src/documents/elements/color.rs index c00d73a..fbc69d5 100644 --- a/docx-core/src/documents/elements/color.rs +++ b/docx-core/src/documents/elements/color.rs @@ -6,7 +6,7 @@ use crate::xml_builder::*; #[derive(Deserialize, Debug, Clone, PartialEq)] pub struct Color { - val: String, + pub val: String, } impl Color { diff --git a/docx-core/src/documents/elements/highlight.rs b/docx-core/src/documents/elements/highlight.rs index 25799c4..7f29e07 100644 --- a/docx-core/src/documents/elements/highlight.rs +++ b/docx-core/src/documents/elements/highlight.rs @@ -6,7 +6,7 @@ use crate::xml_builder::*; #[derive(Debug, Clone, Deserialize, PartialEq)] pub struct Highlight { - val: String, + pub val: String, } impl Highlight { diff --git a/docx-core/src/documents/elements/italic.rs b/docx-core/src/documents/elements/italic.rs index 029b0b8..2867eef 100644 --- a/docx-core/src/documents/elements/italic.rs +++ b/docx-core/src/documents/elements/italic.rs @@ -6,7 +6,7 @@ use crate::xml_builder::*; #[derive(Debug, Clone, Deserialize, PartialEq)] pub struct Italic { - val: bool, + pub val: bool, } impl Italic { diff --git a/docx-core/src/documents/elements/italic_cs.rs b/docx-core/src/documents/elements/italic_cs.rs index eaabfbc..3b70f7a 100644 --- a/docx-core/src/documents/elements/italic_cs.rs +++ b/docx-core/src/documents/elements/italic_cs.rs @@ -6,7 +6,7 @@ use crate::xml_builder::*; #[derive(Debug, Clone, Deserialize, PartialEq)] pub struct ItalicCs { - val: bool, + pub val: bool, } impl ItalicCs { diff --git a/docx-core/src/documents/elements/line_spacing.rs b/docx-core/src/documents/elements/line_spacing.rs index 6775e6c..f651685 100644 --- a/docx-core/src/documents/elements/line_spacing.rs +++ b/docx-core/src/documents/elements/line_spacing.rs @@ -9,17 +9,17 @@ use serde::*; #[serde(rename_all = "camelCase")] pub struct LineSpacing { #[serde(skip_serializing_if = "Option::is_none")] - line_rule: Option, + pub line_rule: Option, #[serde(skip_serializing_if = "Option::is_none")] - before: Option, + pub before: Option, #[serde(skip_serializing_if = "Option::is_none")] - after: Option, + pub after: Option, #[serde(skip_serializing_if = "Option::is_none")] - before_lines: Option, + pub before_lines: Option, #[serde(skip_serializing_if = "Option::is_none")] - after_lines: Option, + pub after_lines: Option, #[serde(skip_serializing_if = "Option::is_none")] - line: Option, + pub line: Option, } impl LineSpacing { diff --git a/docx-core/src/documents/elements/link.rs b/docx-core/src/documents/elements/link.rs index 69b70cc..9088ed7 100644 --- a/docx-core/src/documents/elements/link.rs +++ b/docx-core/src/documents/elements/link.rs @@ -7,7 +7,7 @@ use crate::xml_builder::*; #[derive(Debug, Clone, PartialEq)] pub struct Link { - val: String, + pub val: String, } impl Link { diff --git a/docx-core/src/documents/elements/run_fonts.rs b/docx-core/src/documents/elements/run_fonts.rs index e334ca6..3c2b4ee 100644 --- a/docx-core/src/documents/elements/run_fonts.rs +++ b/docx-core/src/documents/elements/run_fonts.rs @@ -17,23 +17,23 @@ use crate::xml_builder::*; #[serde(rename_all = "camelCase")] pub struct RunFonts { #[serde(skip_serializing_if = "Option::is_none")] - ascii: Option, + pub ascii: Option, #[serde(skip_serializing_if = "Option::is_none")] - hi_ansi: Option, + pub hi_ansi: Option, #[serde(skip_serializing_if = "Option::is_none")] - east_asia: Option, + pub east_asia: Option, #[serde(skip_serializing_if = "Option::is_none")] - cs: Option, + pub cs: Option, #[serde(skip_serializing_if = "Option::is_none")] - ascii_theme: Option, + pub ascii_theme: Option, #[serde(skip_serializing_if = "Option::is_none")] - hi_ansi_theme: Option, + pub hi_ansi_theme: Option, #[serde(skip_serializing_if = "Option::is_none")] - east_asia_theme: Option, + pub east_asia_theme: Option, #[serde(skip_serializing_if = "Option::is_none")] - cs_theme: Option, + pub cs_theme: Option, #[serde(skip_serializing_if = "Option::is_none")] - hint: Option, + pub hint: Option, } impl RunFonts { diff --git a/docx-core/src/documents/elements/sz.rs b/docx-core/src/documents/elements/sz.rs index a87173f..94f8f09 100644 --- a/docx-core/src/documents/elements/sz.rs +++ b/docx-core/src/documents/elements/sz.rs @@ -6,7 +6,7 @@ use crate::xml_builder::*; #[derive(Debug, Clone, Deserialize, PartialEq)] pub struct Sz { - val: usize, + pub val: usize, } impl Sz { diff --git a/docx-core/src/documents/elements/sz_cs.rs b/docx-core/src/documents/elements/sz_cs.rs index 274e6e8..a42a6ee 100644 --- a/docx-core/src/documents/elements/sz_cs.rs +++ b/docx-core/src/documents/elements/sz_cs.rs @@ -5,7 +5,7 @@ use std::io::Write; #[derive(Deserialize, Debug, Clone, PartialEq)] pub struct SzCs { - val: usize, + pub val: usize, } impl SzCs { diff --git a/docx-core/src/documents/elements/underline.rs b/docx-core/src/documents/elements/underline.rs index b64e55e..e829ccf 100644 --- a/docx-core/src/documents/elements/underline.rs +++ b/docx-core/src/documents/elements/underline.rs @@ -6,7 +6,7 @@ use crate::xml_builder::*; #[derive(Debug, Clone, Deserialize, PartialEq)] pub struct Underline { - val: String, + pub val: String, } impl Underline { diff --git a/docx-core/src/documents/elements/vert_align.rs b/docx-core/src/documents/elements/vert_align.rs index 1eab4ad..ae1c462 100644 --- a/docx-core/src/documents/elements/vert_align.rs +++ b/docx-core/src/documents/elements/vert_align.rs @@ -7,7 +7,7 @@ use crate::xml_builder::*; #[derive(Debug, Clone, PartialEq)] pub struct VertAlign { - val: VertAlignType, + pub val: VertAlignType, } impl VertAlign {