From d95137cb9f54889e4a4e5085e13c5e991946b3d4 Mon Sep 17 00:00:00 2001 From: bokuweb Date: Fri, 2 May 2025 21:32:26 +0900 Subject: [PATCH] Revert "Change Style RunProperty internal structs val to public (#814)" (#818) This reverts commit fbe87945e0385f0c1d02ed37e18d0b99ea164e96. --- 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 a2f6461..edc6be1 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 { - pub val: bool, + 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 098ac0d..ce32e39 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 { - pub val: bool, + val: bool, } impl BoldCs { diff --git a/docx-core/src/documents/elements/caps.rs b/docx-core/src/documents/elements/caps.rs index 880b807..37be22c 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 { - pub val: bool, + 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 683aa0f..acba6b4 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 { - pub value: i32, + value: i32, } impl CharacterSpacing { diff --git a/docx-core/src/documents/elements/color.rs b/docx-core/src/documents/elements/color.rs index fbc69d5..c00d73a 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 { - pub val: String, + val: String, } impl Color { diff --git a/docx-core/src/documents/elements/highlight.rs b/docx-core/src/documents/elements/highlight.rs index 7f29e07..25799c4 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 { - pub val: String, + val: String, } impl Highlight { diff --git a/docx-core/src/documents/elements/italic.rs b/docx-core/src/documents/elements/italic.rs index 2867eef..029b0b8 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 { - pub val: bool, + 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 3b70f7a..eaabfbc 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 { - pub val: bool, + 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 f651685..6775e6c 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")] - pub line_rule: Option, + line_rule: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub before: Option, + before: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub after: Option, + after: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub before_lines: Option, + before_lines: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub after_lines: Option, + after_lines: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub line: Option, + line: Option, } impl LineSpacing { diff --git a/docx-core/src/documents/elements/link.rs b/docx-core/src/documents/elements/link.rs index 9088ed7..69b70cc 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 { - pub val: String, + 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 3c2b4ee..e334ca6 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")] - pub ascii: Option, + ascii: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub hi_ansi: Option, + hi_ansi: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub east_asia: Option, + east_asia: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub cs: Option, + cs: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub ascii_theme: Option, + ascii_theme: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub hi_ansi_theme: Option, + hi_ansi_theme: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub east_asia_theme: Option, + east_asia_theme: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub cs_theme: Option, + cs_theme: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub hint: Option, + hint: Option, } impl RunFonts { diff --git a/docx-core/src/documents/elements/sz.rs b/docx-core/src/documents/elements/sz.rs index 94f8f09..a87173f 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 { - pub val: usize, + 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 a42a6ee..274e6e8 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 { - pub val: usize, + val: usize, } impl SzCs { diff --git a/docx-core/src/documents/elements/underline.rs b/docx-core/src/documents/elements/underline.rs index e829ccf..b64e55e 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 { - pub val: String, + 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 ae1c462..1eab4ad 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 { - pub val: VertAlignType, + val: VertAlignType, } impl VertAlign {