diff --git a/docx-core/examples/history.rs b/docx-core/examples/history.rs index 0758acb..6739e1e 100644 --- a/docx-core/examples/history.rs +++ b/docx-core/examples/history.rs @@ -11,7 +11,7 @@ pub fn main() -> Result<(), DocxError> { .author("bokuweb") .date("2019-01-01T00:00:00Z"), ) - .add_delete(Delete::new(Run::new().add_delete_text("World"))), + .add_delete(Delete::new().add_run(Run::new().add_delete_text("World"))), ) .build() .pack(file)?; diff --git a/docx-core/examples/reader.rs b/docx-core/examples/reader.rs index fe3f575..56d849d 100644 --- a/docx-core/examples/reader.rs +++ b/docx-core/examples/reader.rs @@ -4,7 +4,7 @@ use std::fs::File; use std::io::{Read, Write}; pub fn main() { - let mut file = File::open("./test.docx").unwrap(); + let mut file = File::open("./commenta.docx").unwrap(); let mut buf = vec![]; file.read_to_end(&mut buf).unwrap(); diff --git a/docx-core/src/documents/elements/comment_range_start.rs b/docx-core/src/documents/elements/comment_range_start.rs index 0413c9b..1faeb3e 100644 --- a/docx-core/src/documents/elements/comment_range_start.rs +++ b/docx-core/src/documents/elements/comment_range_start.rs @@ -38,6 +38,13 @@ impl BuildXML for CommentRangeStart { } } +impl BuildXML for Box { + fn build(&self) -> Vec { + let b = XMLBuilder::new(); + b.comment_range_start(&format!("{}", self.id)).build() + } +} + #[cfg(test)] mod tests { diff --git a/docx-core/src/documents/elements/delete.rs b/docx-core/src/documents/elements/delete.rs index 28f423f..a0fde2e 100644 --- a/docx-core/src/documents/elements/delete.rs +++ b/docx-core/src/documents/elements/delete.rs @@ -1,13 +1,49 @@ +use serde::ser::{SerializeStruct, Serializer}; use serde::Serialize; -use crate::documents::{BuildXML, HistoryId, Run}; +use crate::documents::*; use crate::xml_builder::*; #[derive(Serialize, Debug, Clone, PartialEq)] pub struct Delete { pub author: String, pub date: String, - pub runs: Vec, + pub children: Vec, +} + +#[derive(Debug, Clone, PartialEq)] +pub enum DeleteChild { + Run(Run), + CommentStart(Box), + CommentEnd(CommentRangeEnd), +} + +impl Serialize for DeleteChild { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + match *self { + DeleteChild::Run(ref r) => { + let mut t = serializer.serialize_struct("Run", 2)?; + t.serialize_field("type", "run")?; + t.serialize_field("data", r)?; + t.end() + } + DeleteChild::CommentStart(ref r) => { + let mut t = serializer.serialize_struct("CommentRangeStart", 2)?; + t.serialize_field("type", "commentRangeStart")?; + t.serialize_field("data", r)?; + t.end() + } + DeleteChild::CommentEnd(ref r) => { + let mut t = serializer.serialize_struct("CommentRangeEnd", 2)?; + t.serialize_field("type", "commentRangeEnd")?; + t.serialize_field("data", r)?; + t.end() + } + } + } } impl Default for Delete { @@ -15,21 +51,35 @@ impl Default for Delete { Delete { author: "unnamed".to_owned(), date: "1970-01-01T00:00:00Z".to_owned(), - runs: vec![], + children: vec![], } } } impl Delete { - pub fn new(run: Run) -> Delete { + pub fn new() -> Delete { Self { - runs: vec![run], + children: vec![], ..Default::default() } } pub fn add_run(mut self, run: Run) -> Delete { - self.runs.push(run); + self.children.push(DeleteChild::Run(run)); + self + } + + pub fn add_comment_start(mut self, comment: Comment) -> Delete { + self.children + .push(DeleteChild::CommentStart(Box::new(CommentRangeStart::new( + comment, + )))); + self + } + + pub fn add_comment_end(mut self, id: usize) -> Delete { + self.children + .push(DeleteChild::CommentEnd(CommentRangeEnd::new(id))); self } @@ -48,11 +98,15 @@ impl HistoryId for Delete {} impl BuildXML for Delete { fn build(&self) -> Vec { - XMLBuilder::new() - .open_delete(&self.generate(), &self.author, &self.date) - .add_children(&self.runs) - .close() - .build() + let mut b = XMLBuilder::new().open_delete(&self.generate(), &self.author, &self.date); + for c in &self.children { + match c { + DeleteChild::Run(t) => b = b.add_child(t), + DeleteChild::CommentStart(c) => b = b.add_child(c), + DeleteChild::CommentEnd(c) => b = b.add_child(c), + } + } + b.close().build() } } @@ -66,7 +120,7 @@ mod tests { #[test] fn test_delete_default() { - let b = Delete::new(Run::new()).build(); + let b = Delete::new().add_run(Run::new()).build(); assert_eq!( str::from_utf8(&b).unwrap(), r#""# diff --git a/docx-core/src/documents/elements/run.rs b/docx-core/src/documents/elements/run.rs index b0d13e0..3fac4ad 100644 --- a/docx-core/src/documents/elements/run.rs +++ b/docx-core/src/documents/elements/run.rs @@ -30,6 +30,8 @@ pub enum RunChild { Tab(Tab), Break(Break), Drawing(Box), + CommentStart(Box), + CommentEnd(CommentRangeEnd), } impl Serialize for RunChild { @@ -67,6 +69,18 @@ impl Serialize for RunChild { t.serialize_field("data", s)?; t.end() } + RunChild::CommentStart(ref r) => { + let mut t = serializer.serialize_struct("CommentRangeStart", 2)?; + t.serialize_field("type", "commentRangeStart")?; + t.serialize_field("data", r)?; + t.end() + } + RunChild::CommentEnd(ref r) => { + let mut t = serializer.serialize_struct("CommentRangeEnd", 2)?; + t.serialize_field("type", "commentRangeEnd")?; + t.serialize_field("data", r)?; + t.end() + } } } } @@ -180,6 +194,8 @@ impl BuildXML for Run { RunChild::Tab(t) => b = b.add_child(t), RunChild::Break(t) => b = b.add_child(t), RunChild::Drawing(t) => b = b.add_child(t), + RunChild::CommentStart(c) => b = b.add_child(c), + RunChild::CommentEnd(c) => b = b.add_child(c), } } b.close().build() diff --git a/docx-core/src/documents/mod.rs b/docx-core/src/documents/mod.rs index b8235c0..88ee929 100644 --- a/docx-core/src/documents/mod.rs +++ b/docx-core/src/documents/mod.rs @@ -444,6 +444,19 @@ impl Docx { } } } + if let ParagraphChild::Delete(ref mut delete) = child { + for child in &mut delete.children { + if let DeleteChild::CommentStart(ref mut c) = child { + let comment_id = c.get_id(); + if let Some(comment) = + comments.iter().find(|c| c.id() == comment_id) + { + let comment = comment.clone(); + c.as_mut().comment(comment); + } + } + } + } } } DocumentChild::Table(table) => { @@ -478,6 +491,22 @@ impl Docx { } } } + if let ParagraphChild::Delete(ref mut delete) = child { + for child in &mut delete.children { + if let DeleteChild::CommentStart(ref mut c) = + child + { + let comment_id = c.get_id(); + if let Some(comment) = comments + .iter() + .find(|c| c.id() == comment_id) + { + let comment = comment.clone(); + c.as_mut().comment(comment); + } + } + } + } } } } diff --git a/docx-core/src/reader/delete.rs b/docx-core/src/reader/delete.rs index 73c7750..4aec2ae 100644 --- a/docx-core/src/reader/delete.rs +++ b/docx-core/src/reader/delete.rs @@ -11,26 +11,40 @@ impl ElementReader for Delete { r: &mut EventReader, attrs: &[OwnedAttribute], ) -> Result { - let mut runs: Vec = vec![]; + let mut del = Delete::new(); loop { let e = r.next(); match e { - Ok(XmlEvent::StartElement { name, .. }) => { + Ok(XmlEvent::StartElement { + name, attributes, .. + }) => { let e = XMLElement::from_str(&name.local_name) .expect("should convert to XMLElement"); - if let XMLElement::Run = e { - runs.push(Run::read(r, attrs)?); + match e { + XMLElement::Run => { + del = del.add_run(Run::read(r, attrs)?); + } + XMLElement::CommentRangeStart => { + if let Some(id) = read(&attributes, "id") { + if let Ok(id) = usize::from_str(&id) { + let comment = Comment::new(id); + del = del.add_comment_start(comment); + } + } + } + XMLElement::CommentRangeEnd => { + if let Some(id) = read(&attributes, "id") { + if let Ok(id) = usize::from_str(&id) { + del = del.add_comment_end(id); + } + } + } + _ => {} } } Ok(XmlEvent::EndElement { name, .. }) => { let e = XMLElement::from_str(&name.local_name).unwrap(); - let run = if !runs.is_empty() { - std::mem::replace(&mut runs[0], Run::new()) - } else { - Run::new() - }; if e == XMLElement::Delete { - let mut del = Delete::new(run); for attr in attrs { let local_name = &attr.name.local_name; if local_name == "author" { @@ -39,11 +53,6 @@ impl ElementReader for Delete { del = del.date(&attr.value); } } - if runs.len() > 1 { - for r in runs.into_iter().skip(1) { - del = del.add_run(r); - } - } return Ok(del); } } diff --git a/docx-core/src/reader/paragraph.rs b/docx-core/src/reader/paragraph.rs index 0d880ef..245437a 100644 --- a/docx-core/src/reader/paragraph.rs +++ b/docx-core/src/reader/paragraph.rs @@ -330,7 +330,8 @@ mod tests { Paragraph { id: "12345678".to_owned(), children: vec![ParagraphChild::Delete( - Delete::new(Run::new().add_delete_text("Hello ")) + Delete::new() + .add_run(Run::new().add_delete_text("Hello ")) .author("unknown") .date("2019-11-15T14:19:04Z") )], diff --git a/docx-core/tests/lib.rs b/docx-core/tests/lib.rs index 29dcda6..20c73f1 100644 --- a/docx-core/tests/lib.rs +++ b/docx-core/tests/lib.rs @@ -8,410 +8,410 @@ pub const DUMMY: &str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit #[test] pub fn hello() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/hello.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))) - .build() - .pack(file)?; - Ok(()) + let path = std::path::Path::new("./tests/output/hello.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn indent() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/indent.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph(Paragraph::new().add_run(Run::new().add_text(DUMMY)).indent( - Some(840), - None, - None, - None, - )) - .add_paragraph(Paragraph::new()) - .add_paragraph(Paragraph::new().add_run(Run::new().add_text(DUMMY)).indent( - Some(840), - Some(SpecialIndentType::FirstLine(720)), - None, - None, - )) - .add_paragraph(Paragraph::new()) - .add_paragraph(Paragraph::new().add_run(Run::new().add_text(DUMMY)).indent( - Some(1560), - Some(SpecialIndentType::Hanging(720)), - None, - None, - )) - .build() - .pack(file)?; - Ok(()) + let path = std::path::Path::new("./tests/output/indent.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph(Paragraph::new().add_run(Run::new().add_text(DUMMY)).indent( + Some(840), + None, + None, + None, + )) + .add_paragraph(Paragraph::new()) + .add_paragraph(Paragraph::new().add_run(Run::new().add_text(DUMMY)).indent( + Some(840), + Some(SpecialIndentType::FirstLine(720)), + None, + None, + )) + .add_paragraph(Paragraph::new()) + .add_paragraph(Paragraph::new().add_run(Run::new().add_text(DUMMY)).indent( + Some(1560), + Some(SpecialIndentType::Hanging(720)), + None, + None, + )) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn size() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/size.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello").size(60))) - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text(" Wor").size(50)) - .add_run(Run::new().add_text("ld")), - ) - .build() - .pack(file)?; - Ok(()) + let path = std::path::Path::new("./tests/output/size.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello").size(60))) + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text(" Wor").size(50)) + .add_run(Run::new().add_text("ld")), + ) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn alignment() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/alignment.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))) - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text(" World")) - .align(AlignmentType::Right), - ) - .build() - .pack(file)?; - Ok(()) + let path = std::path::Path::new("./tests/output/alignment.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))) + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text(" World")) + .align(AlignmentType::Right), + ) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn table() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/table.docx"); - let file = std::fs::File::create(&path).unwrap(); + let path = std::path::Path::new("./tests/output/table.docx"); + let file = std::fs::File::create(&path).unwrap(); - let table = Table::new(vec![ - TableRow::new(vec![ - TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))), - TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("World"))), - ]), - TableRow::new(vec![ - TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("Foo"))), - TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("Bar"))), - ]), - ]); - Docx::new().add_table(table).build().pack(file)?; - Ok(()) + let table = Table::new(vec![ + TableRow::new(vec![ + TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))), + TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("World"))), + ]), + TableRow::new(vec![ + TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("Foo"))), + TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("Bar"))), + ]), + ]); + Docx::new().add_table(table).build().pack(file)?; + Ok(()) } #[test] pub fn table_with_grid() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/table_with_grid.docx"); - let file = std::fs::File::create(&path).unwrap(); + let path = std::path::Path::new("./tests/output/table_with_grid.docx"); + let file = std::fs::File::create(&path).unwrap(); - let table = Table::new(vec![ - TableRow::new(vec![ - TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))), - TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("World"))), - ]), - TableRow::new(vec![ - TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("Foo"))), - TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("Bar"))), - ]), - ]) - .set_grid(vec![3000, 3000]); - Docx::new().add_table(table).build().pack(file)?; - Ok(()) + let table = Table::new(vec![ + TableRow::new(vec![ + TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))), + TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("World"))), + ]), + TableRow::new(vec![ + TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("Foo"))), + TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("Bar"))), + ]), + ]) + .set_grid(vec![3000, 3000]); + Docx::new().add_table(table).build().pack(file)?; + Ok(()) } #[test] pub fn table_merged() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/table_merged.docx"); - let file = std::fs::File::create(&path).unwrap(); + let path = std::path::Path::new("./tests/output/table_merged.docx"); + let file = std::fs::File::create(&path).unwrap(); - let table = Table::new(vec![ - TableRow::new(vec![ - TableCell::new() - .add_paragraph(Paragraph::new()) - .grid_span(2), - TableCell::new() - .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))) - .vertical_merge(VMergeType::Restart), - ]), - TableRow::new(vec![ - TableCell::new() - .add_paragraph(Paragraph::new()) - .vertical_merge(VMergeType::Restart), - TableCell::new().add_paragraph(Paragraph::new()), - TableCell::new() - .add_paragraph(Paragraph::new()) - .vertical_merge(VMergeType::Continue), - ]), - TableRow::new(vec![ - TableCell::new() - .add_paragraph(Paragraph::new()) - .vertical_merge(VMergeType::Continue), - TableCell::new().add_paragraph(Paragraph::new()), - TableCell::new() - .add_paragraph(Paragraph::new()) - .vertical_merge(VMergeType::Continue), - ]), - ]) - .set_grid(vec![2000, 2000, 2000]); - Docx::new().add_table(table).build().pack(file)?; - Ok(()) + let table = Table::new(vec![ + TableRow::new(vec![ + TableCell::new() + .add_paragraph(Paragraph::new()) + .grid_span(2), + TableCell::new() + .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))) + .vertical_merge(VMergeType::Restart), + ]), + TableRow::new(vec![ + TableCell::new() + .add_paragraph(Paragraph::new()) + .vertical_merge(VMergeType::Restart), + TableCell::new().add_paragraph(Paragraph::new()), + TableCell::new() + .add_paragraph(Paragraph::new()) + .vertical_merge(VMergeType::Continue), + ]), + TableRow::new(vec![ + TableCell::new() + .add_paragraph(Paragraph::new()) + .vertical_merge(VMergeType::Continue), + TableCell::new().add_paragraph(Paragraph::new()), + TableCell::new() + .add_paragraph(Paragraph::new()) + .vertical_merge(VMergeType::Continue), + ]), + ]) + .set_grid(vec![2000, 2000, 2000]); + Docx::new().add_table(table).build().pack(file)?; + Ok(()) } #[test] pub fn decoration() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/decoration.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text("Hello")) - .add_run(Run::new().add_text(" World").bold()), - ) - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text("Hello")) - .add_run(Run::new().add_text(" World").highlight("yellow")), - ) - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text("Hello")) - .add_run(Run::new().add_text(" World").italic()), - ) - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text("Hello")) - .add_run(Run::new().add_text(" World").color("FF0000")), - ) - .build() - .pack(file)?; - Ok(()) + let path = std::path::Path::new("./tests/output/decoration.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text("Hello")) + .add_run(Run::new().add_text(" World").bold()), + ) + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text("Hello")) + .add_run(Run::new().add_text(" World").highlight("yellow")), + ) + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text("Hello")) + .add_run(Run::new().add_text(" World").italic()), + ) + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text("Hello")) + .add_run(Run::new().add_text(" World").color("FF0000")), + ) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn tab_and_break() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/tab_and_break.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph( - Paragraph::new().add_run( - Run::new() - .add_text("Hello") - .add_tab() - .add_text("World") - .add_break(BreakType::Page) - .add_text("Foo"), - ), - ) - .build() - .pack(file)?; - Ok(()) + let path = std::path::Path::new("./tests/output/tab_and_break.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph( + Paragraph::new().add_run( + Run::new() + .add_text("Hello") + .add_tab() + .add_text("World") + .add_break(BreakType::Page) + .add_text("Foo"), + ), + ) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn history() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/history.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph( - Paragraph::new() - .add_insert( - Insert::new(Run::new().add_text("Hello")) - .author("bokuweb") - .date("2019-01-01T00:00:00Z"), + let path = std::path::Path::new("./tests/output/history.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph( + Paragraph::new() + .add_insert( + Insert::new(Run::new().add_text("Hello")) + .author("bokuweb") + .date("2019-01-01T00:00:00Z"), + ) + .add_delete(Delete::new().add_run(Run::new().add_delete_text("World"))), ) - .add_delete(Delete::new(Run::new().add_delete_text("World"))), - ) - .build() - .pack(file)?; - Ok(()) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn underline() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/underline.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello").underline("single"))) - .build() - .pack(file)?; - Ok(()) + let path = std::path::Path::new("./tests/output/underline.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello").underline("single"))) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn highlight() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/highlight.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text("Hello").highlight("cyan")) - .add_run(Run::new().add_text(" World!").highlight("yellow")), - ) - .build() - .pack(file)?; - Ok(()) + let path = std::path::Path::new("./tests/output/highlight.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text("Hello").highlight("cyan")) + .add_run(Run::new().add_text(" World!").highlight("yellow")), + ) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn comments() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/comments.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph( - Paragraph::new() - .add_comment_start( - Comment::new(1) - .author("bokuweb") - .date("2019-01-01T00:00:00Z") - .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))), + let path = std::path::Path::new("./tests/output/comments.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph( + Paragraph::new() + .add_comment_start( + Comment::new(1) + .author("bokuweb") + .date("2019-01-01T00:00:00Z") + .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))), + ) + .add_run(Run::new().add_text("Hello").highlight("cyan")) + .add_run(Run::new().add_text(" World!").highlight("yellow")) + .add_comment_end(1), ) - .add_run(Run::new().add_text("Hello").highlight("cyan")) - .add_run(Run::new().add_text(" World!").highlight("yellow")) - .add_comment_end(1), - ) - .build() - .pack(file)?; - Ok(()) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn comments_to_table() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/comments_table.docx"); - let file = std::fs::File::create(&path).unwrap(); - let table = Table::new(vec![TableRow::new(vec![ - TableCell::new().add_paragraph( - Paragraph::new() - .add_comment_start( - Comment::new(1) - .author("bokuweb") - .date("2019-01-01T00:00:00Z") - .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))), + let path = std::path::Path::new("./tests/output/comments_table.docx"); + let file = std::fs::File::create(&path).unwrap(); + let table = Table::new(vec![TableRow::new(vec![ + TableCell::new().add_paragraph( + Paragraph::new() + .add_comment_start( + Comment::new(1) + .author("bokuweb") + .date("2019-01-01T00:00:00Z") + .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))), + ) + .add_run(Run::new().add_text("Hello")) + .add_comment_end(1), + ), + TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("World"))), + ])]); + Docx::new() + .add_paragraph( + Paragraph::new() + .add_comment_start( + Comment::new(1) + .author("bokuweb") + .date("2019-01-01T00:00:00Z") + .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Comment!!"))), + ) + .add_run(Run::new().add_text("Hello").highlight("cyan")) + .add_comment_end(1), ) - .add_run(Run::new().add_text("Hello")) - .add_comment_end(1), - ), - TableCell::new().add_paragraph(Paragraph::new().add_run(Run::new().add_text("World"))), - ])]); - Docx::new() - .add_paragraph( - Paragraph::new() - .add_comment_start( - Comment::new(1) - .author("bokuweb") - .date("2019-01-01T00:00:00Z") - .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Comment!!"))), - ) - .add_run(Run::new().add_text("Hello").highlight("cyan")) - .add_comment_end(1), - ) - .add_table(table) - .build() - .pack(file)?; - Ok(()) + .add_table(table) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn default_numbering() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/default_numbering.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text("Hello")) - .numbering(NumberingId::new(1), IndentLevel::new(0)), - ) - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text("World!")) - .numbering(NumberingId::new(1), IndentLevel::new(1)), - ) - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text("Foooo!")) - .numbering(NumberingId::new(1), IndentLevel::new(2)), - ) - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text("Bar!")) - .numbering(NumberingId::new(1), IndentLevel::new(3)), - ) - .build() - .pack(file)?; - Ok(()) + let path = std::path::Path::new("./tests/output/default_numbering.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text("Hello")) + .numbering(NumberingId::new(1), IndentLevel::new(0)), + ) + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text("World!")) + .numbering(NumberingId::new(1), IndentLevel::new(1)), + ) + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text("Foooo!")) + .numbering(NumberingId::new(1), IndentLevel::new(2)), + ) + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text("Bar!")) + .numbering(NumberingId::new(1), IndentLevel::new(3)), + ) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn user_numbering() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/user_numbering.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text("Hello")) - .numbering(NumberingId::new(2), IndentLevel::new(0)), - ) - .add_abstract_numbering( - AbstractNumbering::new(2).add_level( - Level::new( - 0, - Start::new(1), - NumberFormat::new("decimal"), - LevelText::new("Section %1."), - LevelJc::new("left"), + let path = std::path::Path::new("./tests/output/user_numbering.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text("Hello")) + .numbering(NumberingId::new(2), IndentLevel::new(0)), ) - .indent( - Some(1620), - Some(SpecialIndentType::Hanging(320)), - None, - None, - ), - ), - ) - .add_numbering(Numbering::new(2, 2)) - .build() - .pack(file)?; - Ok(()) + .add_abstract_numbering( + AbstractNumbering::new(2).add_level( + Level::new( + 0, + Start::new(1), + NumberFormat::new("decimal"), + LevelText::new("Section %1."), + LevelJc::new("left"), + ) + .indent( + Some(1620), + Some(SpecialIndentType::Hanging(320)), + None, + None, + ), + ), + ) + .add_numbering(Numbering::new(2, 2)) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn escape() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/escape.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text("&&&>>><<")) - .numbering(NumberingId::new(2), IndentLevel::new(0)), - ) - .build() - .pack(file)?; - Ok(()) + let path = std::path::Path::new("./tests/output/escape.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text("&&&>>><<")) + .numbering(NumberingId::new(2), IndentLevel::new(0)), + ) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn vanish() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/vanish.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph( - Paragraph::new() - .add_run(Run::new().add_text("Hello")) - .add_run(Run::new().add_text("Hidden").vanish()) - .add_run(Run::new().add_text(" World!!")), - ) - .build() - .pack(file)?; - Ok(()) + let path = std::path::Path::new("./tests/output/vanish.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph( + Paragraph::new() + .add_run(Run::new().add_text("Hello")) + .add_run(Run::new().add_text("Hidden").vanish()) + .add_run(Run::new().add_text(" World!!")), + ) + .build() + .pack(file)?; + Ok(()) } #[test] pub fn date() -> Result<(), DocxError> { - let path = std::path::Path::new("./tests/output/date.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))) - .created_at("2019-01-01T00:00:00Z") - .updated_at("2019-01-02T10:00:00Z") - .build() - .pack(file)?; - Ok(()) + let path = std::path::Path::new("./tests/output/date.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))) + .created_at("2019-01-01T00:00:00Z") + .updated_at("2019-01-02T10:00:00Z") + .build() + .pack(file)?; + Ok(()) } diff --git a/docx-core/tests/snapshots/lib__reader__read_history.snap b/docx-core/tests/snapshots/lib__reader__read_history.snap index e4265fe..1e8f079 100644 --- a/docx-core/tests/snapshots/lib__reader__read_history.snap +++ b/docx-core/tests/snapshots/lib__reader__read_history.snap @@ -2,4 +2,4 @@ source: docx-core/tests/reader.rs expression: "&json" --- -"{\n \"contentType\": {\n \"types\": {\n \"/_rels/.rels\": \"application/vnd.openxmlformats-package.relationships+xml\",\n \"/docProps/app.xml\": \"application/vnd.openxmlformats-officedocument.extended-properties+xml\",\n \"/docProps/core.xml\": \"application/vnd.openxmlformats-package.core-properties+xml\",\n \"/word/_rels/document.xml.rels\": \"application/vnd.openxmlformats-package.relationships+xml\",\n \"/word/comments.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml\",\n \"/word/commentsExtended.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml\",\n \"/word/document.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\",\n \"/word/fontTable.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml\",\n \"/word/header1.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml\",\n \"/word/numbering.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml\",\n \"/word/settings.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml\",\n \"/word/styles.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\"\n }\n },\n \"rels\": {\n \"rels\": [\n [\n \"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\",\n \"rId1\",\n \"docProps/core.xml\"\n ],\n [\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\",\n \"rId2\",\n \"docProps/app.xml\"\n ],\n [\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\",\n \"rId3\",\n \"word/document.xml\"\n ]\n ]\n },\n \"documentRels\": {\n \"hasComments\": false,\n \"hasNumberings\": false,\n \"imageIds\": []\n },\n \"docProps\": {\n \"app\": {},\n \"core\": {\n \"config\": {\n \"created\": null,\n \"creator\": null,\n \"description\": null,\n \"language\": null,\n \"lastModifiedBy\": null,\n \"modified\": null,\n \"revision\": null,\n \"subject\": null,\n \"title\": null\n }\n }\n },\n \"styles\": {\n \"docDefaults\": {\n \"runPropertyDefault\": {\n \"runProperty\": {\n \"sz\": 20,\n \"szCs\": 20,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n }\n }\n },\n \"styles\": [\n {\n \"styleId\": \"Normal\",\n \"name\": \"Normal\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": 24,\n \"szCs\": 24,\n \"color\": \"auto\",\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": \"left\",\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": null\n },\n {\n \"styleId\": \"Style14\",\n \"name\": \"見出し\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": 28,\n \"szCs\": 28,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n },\n {\n \"styleId\": \"Style15\",\n \"name\": \"Body Text\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n },\n {\n \"styleId\": \"Style16\",\n \"name\": \"List\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Style15\"\n }\n },\n {\n \"styleId\": \"Style17\",\n \"name\": \"Caption\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": 24,\n \"szCs\": 24,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": true,\n \"italicCs\": true,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n },\n {\n \"styleId\": \"Style18\",\n \"name\": \"索引\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n }\n ]\n },\n \"document\": {\n \"children\": [\n {\n \"type\": \"paragraph\",\n \"data\": {\n \"id\": \"00000001\",\n \"children\": [\n {\n \"type\": \"insert\",\n \"data\": {\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"text\",\n \"data\": {\n \"preserveSpace\": true,\n \"text\": \"W\"\n }\n }\n ]\n }\n }\n ],\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\"\n }\n },\n {\n \"type\": \"insert\",\n \"data\": {\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"text\",\n \"data\": {\n \"preserveSpace\": true,\n \"text\": \"a\"\n }\n }\n ]\n }\n }\n ],\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\"\n }\n },\n {\n \"type\": \"insert\",\n \"data\": {\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"text\",\n \"data\": {\n \"preserveSpace\": true,\n \"text\": \"rld\"\n }\n }\n ]\n }\n }\n ],\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\"\n }\n },\n {\n \"type\": \"delete\",\n \"data\": {\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\",\n \"runs\": [\n {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"deleteText\",\n \"data\": {\n \"text\": \"Hello \",\n \"preserveSpace\": true\n }\n }\n ]\n }\n ]\n }\n }\n ],\n \"property\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": \"Normal\",\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"hasNumbering\": false\n }\n }\n ],\n \"sectionProperty\": {\n \"pageSize\": {\n \"w\": 11906,\n \"h\": 16838\n },\n \"pageMargin\": {\n \"top\": 1134,\n \"left\": 1134,\n \"bottom\": 1134,\n \"right\": 1134,\n \"header\": 0,\n \"footer\": 0,\n \"gutter\": 0\n },\n \"columns\": 425,\n \"documentGrid\": 360,\n \"headerReference\": {\n \"headerType\": \"default\",\n \"id\": \"rId4\"\n },\n \"sectionType\": null\n },\n \"hasNumbering\": false\n },\n \"comments\": {\n \"comments\": []\n },\n \"numberings\": {\n \"abstractNums\": [],\n \"numberings\": []\n },\n \"settings\": {\n \"defaultTabStop\": 709,\n \"zoom\": 100,\n \"docId\": null,\n \"docVars\": []\n },\n \"fontTable\": {},\n \"media\": [],\n \"header\": {\n \"children\": []\n },\n \"commentsExtended\": {\n \"children\": []\n }\n}" +"{\n \"contentType\": {\n \"types\": {\n \"/_rels/.rels\": \"application/vnd.openxmlformats-package.relationships+xml\",\n \"/docProps/app.xml\": \"application/vnd.openxmlformats-officedocument.extended-properties+xml\",\n \"/docProps/core.xml\": \"application/vnd.openxmlformats-package.core-properties+xml\",\n \"/word/_rels/document.xml.rels\": \"application/vnd.openxmlformats-package.relationships+xml\",\n \"/word/comments.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml\",\n \"/word/commentsExtended.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml\",\n \"/word/document.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\",\n \"/word/fontTable.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml\",\n \"/word/header1.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml\",\n \"/word/numbering.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml\",\n \"/word/settings.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml\",\n \"/word/styles.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\"\n }\n },\n \"rels\": {\n \"rels\": [\n [\n \"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\",\n \"rId1\",\n \"docProps/core.xml\"\n ],\n [\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\",\n \"rId2\",\n \"docProps/app.xml\"\n ],\n [\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\",\n \"rId3\",\n \"word/document.xml\"\n ]\n ]\n },\n \"documentRels\": {\n \"hasComments\": false,\n \"hasNumberings\": false,\n \"imageIds\": []\n },\n \"docProps\": {\n \"app\": {},\n \"core\": {\n \"config\": {\n \"created\": null,\n \"creator\": null,\n \"description\": null,\n \"language\": null,\n \"lastModifiedBy\": null,\n \"modified\": null,\n \"revision\": null,\n \"subject\": null,\n \"title\": null\n }\n }\n },\n \"styles\": {\n \"docDefaults\": {\n \"runPropertyDefault\": {\n \"runProperty\": {\n \"sz\": 20,\n \"szCs\": 20,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n }\n }\n },\n \"styles\": [\n {\n \"styleId\": \"Normal\",\n \"name\": \"Normal\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": 24,\n \"szCs\": 24,\n \"color\": \"auto\",\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": \"left\",\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": null\n },\n {\n \"styleId\": \"Style14\",\n \"name\": \"見出し\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": 28,\n \"szCs\": 28,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n },\n {\n \"styleId\": \"Style15\",\n \"name\": \"Body Text\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n },\n {\n \"styleId\": \"Style16\",\n \"name\": \"List\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Style15\"\n }\n },\n {\n \"styleId\": \"Style17\",\n \"name\": \"Caption\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": 24,\n \"szCs\": 24,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": true,\n \"italicCs\": true,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n },\n {\n \"styleId\": \"Style18\",\n \"name\": \"索引\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n }\n ]\n },\n \"document\": {\n \"children\": [\n {\n \"type\": \"paragraph\",\n \"data\": {\n \"id\": \"00000001\",\n \"children\": [\n {\n \"type\": \"insert\",\n \"data\": {\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"text\",\n \"data\": {\n \"preserveSpace\": true,\n \"text\": \"W\"\n }\n }\n ]\n }\n }\n ],\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\"\n }\n },\n {\n \"type\": \"insert\",\n \"data\": {\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"text\",\n \"data\": {\n \"preserveSpace\": true,\n \"text\": \"a\"\n }\n }\n ]\n }\n }\n ],\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\"\n }\n },\n {\n \"type\": \"insert\",\n \"data\": {\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"text\",\n \"data\": {\n \"preserveSpace\": true,\n \"text\": \"rld\"\n }\n }\n ]\n }\n }\n ],\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\"\n }\n },\n {\n \"type\": \"delete\",\n \"data\": {\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\",\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"deleteText\",\n \"data\": {\n \"text\": \"Hello \",\n \"preserveSpace\": true\n }\n }\n ]\n }\n }\n ]\n }\n }\n ],\n \"property\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": \"Normal\",\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"hasNumbering\": false\n }\n }\n ],\n \"sectionProperty\": {\n \"pageSize\": {\n \"w\": 11906,\n \"h\": 16838\n },\n \"pageMargin\": {\n \"top\": 1134,\n \"left\": 1134,\n \"bottom\": 1134,\n \"right\": 1134,\n \"header\": 0,\n \"footer\": 0,\n \"gutter\": 0\n },\n \"columns\": 425,\n \"documentGrid\": 360,\n \"headerReference\": {\n \"headerType\": \"default\",\n \"id\": \"rId4\"\n },\n \"sectionType\": null\n },\n \"hasNumbering\": false\n },\n \"comments\": {\n \"comments\": []\n },\n \"numberings\": {\n \"abstractNums\": [],\n \"numberings\": []\n },\n \"settings\": {\n \"defaultTabStop\": 709,\n \"zoom\": 100,\n \"docId\": null,\n \"docVars\": []\n },\n \"fontTable\": {},\n \"media\": [],\n \"header\": {\n \"children\": []\n },\n \"commentsExtended\": {\n \"children\": []\n }\n}" diff --git a/docx-core/tests/snapshots/reader__read_history.snap b/docx-core/tests/snapshots/reader__read_history.snap index e4265fe..1e8f079 100644 --- a/docx-core/tests/snapshots/reader__read_history.snap +++ b/docx-core/tests/snapshots/reader__read_history.snap @@ -2,4 +2,4 @@ source: docx-core/tests/reader.rs expression: "&json" --- -"{\n \"contentType\": {\n \"types\": {\n \"/_rels/.rels\": \"application/vnd.openxmlformats-package.relationships+xml\",\n \"/docProps/app.xml\": \"application/vnd.openxmlformats-officedocument.extended-properties+xml\",\n \"/docProps/core.xml\": \"application/vnd.openxmlformats-package.core-properties+xml\",\n \"/word/_rels/document.xml.rels\": \"application/vnd.openxmlformats-package.relationships+xml\",\n \"/word/comments.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml\",\n \"/word/commentsExtended.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml\",\n \"/word/document.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\",\n \"/word/fontTable.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml\",\n \"/word/header1.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml\",\n \"/word/numbering.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml\",\n \"/word/settings.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml\",\n \"/word/styles.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\"\n }\n },\n \"rels\": {\n \"rels\": [\n [\n \"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\",\n \"rId1\",\n \"docProps/core.xml\"\n ],\n [\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\",\n \"rId2\",\n \"docProps/app.xml\"\n ],\n [\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\",\n \"rId3\",\n \"word/document.xml\"\n ]\n ]\n },\n \"documentRels\": {\n \"hasComments\": false,\n \"hasNumberings\": false,\n \"imageIds\": []\n },\n \"docProps\": {\n \"app\": {},\n \"core\": {\n \"config\": {\n \"created\": null,\n \"creator\": null,\n \"description\": null,\n \"language\": null,\n \"lastModifiedBy\": null,\n \"modified\": null,\n \"revision\": null,\n \"subject\": null,\n \"title\": null\n }\n }\n },\n \"styles\": {\n \"docDefaults\": {\n \"runPropertyDefault\": {\n \"runProperty\": {\n \"sz\": 20,\n \"szCs\": 20,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n }\n }\n },\n \"styles\": [\n {\n \"styleId\": \"Normal\",\n \"name\": \"Normal\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": 24,\n \"szCs\": 24,\n \"color\": \"auto\",\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": \"left\",\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": null\n },\n {\n \"styleId\": \"Style14\",\n \"name\": \"見出し\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": 28,\n \"szCs\": 28,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n },\n {\n \"styleId\": \"Style15\",\n \"name\": \"Body Text\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n },\n {\n \"styleId\": \"Style16\",\n \"name\": \"List\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Style15\"\n }\n },\n {\n \"styleId\": \"Style17\",\n \"name\": \"Caption\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": 24,\n \"szCs\": 24,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": true,\n \"italicCs\": true,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n },\n {\n \"styleId\": \"Style18\",\n \"name\": \"索引\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n }\n ]\n },\n \"document\": {\n \"children\": [\n {\n \"type\": \"paragraph\",\n \"data\": {\n \"id\": \"00000001\",\n \"children\": [\n {\n \"type\": \"insert\",\n \"data\": {\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"text\",\n \"data\": {\n \"preserveSpace\": true,\n \"text\": \"W\"\n }\n }\n ]\n }\n }\n ],\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\"\n }\n },\n {\n \"type\": \"insert\",\n \"data\": {\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"text\",\n \"data\": {\n \"preserveSpace\": true,\n \"text\": \"a\"\n }\n }\n ]\n }\n }\n ],\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\"\n }\n },\n {\n \"type\": \"insert\",\n \"data\": {\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"text\",\n \"data\": {\n \"preserveSpace\": true,\n \"text\": \"rld\"\n }\n }\n ]\n }\n }\n ],\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\"\n }\n },\n {\n \"type\": \"delete\",\n \"data\": {\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\",\n \"runs\": [\n {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"deleteText\",\n \"data\": {\n \"text\": \"Hello \",\n \"preserveSpace\": true\n }\n }\n ]\n }\n ]\n }\n }\n ],\n \"property\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": \"Normal\",\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"hasNumbering\": false\n }\n }\n ],\n \"sectionProperty\": {\n \"pageSize\": {\n \"w\": 11906,\n \"h\": 16838\n },\n \"pageMargin\": {\n \"top\": 1134,\n \"left\": 1134,\n \"bottom\": 1134,\n \"right\": 1134,\n \"header\": 0,\n \"footer\": 0,\n \"gutter\": 0\n },\n \"columns\": 425,\n \"documentGrid\": 360,\n \"headerReference\": {\n \"headerType\": \"default\",\n \"id\": \"rId4\"\n },\n \"sectionType\": null\n },\n \"hasNumbering\": false\n },\n \"comments\": {\n \"comments\": []\n },\n \"numberings\": {\n \"abstractNums\": [],\n \"numberings\": []\n },\n \"settings\": {\n \"defaultTabStop\": 709,\n \"zoom\": 100,\n \"docId\": null,\n \"docVars\": []\n },\n \"fontTable\": {},\n \"media\": [],\n \"header\": {\n \"children\": []\n },\n \"commentsExtended\": {\n \"children\": []\n }\n}" +"{\n \"contentType\": {\n \"types\": {\n \"/_rels/.rels\": \"application/vnd.openxmlformats-package.relationships+xml\",\n \"/docProps/app.xml\": \"application/vnd.openxmlformats-officedocument.extended-properties+xml\",\n \"/docProps/core.xml\": \"application/vnd.openxmlformats-package.core-properties+xml\",\n \"/word/_rels/document.xml.rels\": \"application/vnd.openxmlformats-package.relationships+xml\",\n \"/word/comments.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml\",\n \"/word/commentsExtended.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml\",\n \"/word/document.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\",\n \"/word/fontTable.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml\",\n \"/word/header1.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml\",\n \"/word/numbering.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml\",\n \"/word/settings.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml\",\n \"/word/styles.xml\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\"\n }\n },\n \"rels\": {\n \"rels\": [\n [\n \"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\",\n \"rId1\",\n \"docProps/core.xml\"\n ],\n [\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\",\n \"rId2\",\n \"docProps/app.xml\"\n ],\n [\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\",\n \"rId3\",\n \"word/document.xml\"\n ]\n ]\n },\n \"documentRels\": {\n \"hasComments\": false,\n \"hasNumberings\": false,\n \"imageIds\": []\n },\n \"docProps\": {\n \"app\": {},\n \"core\": {\n \"config\": {\n \"created\": null,\n \"creator\": null,\n \"description\": null,\n \"language\": null,\n \"lastModifiedBy\": null,\n \"modified\": null,\n \"revision\": null,\n \"subject\": null,\n \"title\": null\n }\n }\n },\n \"styles\": {\n \"docDefaults\": {\n \"runPropertyDefault\": {\n \"runProperty\": {\n \"sz\": 20,\n \"szCs\": 20,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n }\n }\n },\n \"styles\": [\n {\n \"styleId\": \"Normal\",\n \"name\": \"Normal\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": 24,\n \"szCs\": 24,\n \"color\": \"auto\",\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": \"left\",\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": null\n },\n {\n \"styleId\": \"Style14\",\n \"name\": \"見出し\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": 28,\n \"szCs\": 28,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n },\n {\n \"styleId\": \"Style15\",\n \"name\": \"Body Text\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n },\n {\n \"styleId\": \"Style16\",\n \"name\": \"List\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Style15\"\n }\n },\n {\n \"styleId\": \"Style17\",\n \"name\": \"Caption\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": 24,\n \"szCs\": 24,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": true,\n \"italicCs\": true,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n },\n {\n \"styleId\": \"Style18\",\n \"name\": \"索引\",\n \"styleType\": \"paragraph\",\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"paragraphProperty\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": null,\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"tableProperty\": {\n \"width\": {\n \"width\": 0,\n \"widthType\": \"Auto\"\n },\n \"justification\": \"left\",\n \"borders\": {\n \"top\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"top\",\n \"space\": 0\n },\n \"left\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"left\",\n \"space\": 0\n },\n \"bottom\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"bottom\",\n \"space\": 0\n },\n \"right\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"right\",\n \"space\": 0\n },\n \"insideH\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideH\",\n \"space\": 0\n },\n \"insideV\": {\n \"borderType\": \"single\",\n \"size\": 2,\n \"color\": \"000000\",\n \"position\": \"insideV\",\n \"space\": 0\n }\n },\n \"margins\": {\n \"top\": 55,\n \"left\": 54,\n \"bottom\": 55,\n \"right\": 55\n },\n \"indent\": null,\n \"style\": null\n },\n \"basedOn\": {\n \"val\": \"Normal\"\n }\n }\n ]\n },\n \"document\": {\n \"children\": [\n {\n \"type\": \"paragraph\",\n \"data\": {\n \"id\": \"00000001\",\n \"children\": [\n {\n \"type\": \"insert\",\n \"data\": {\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"text\",\n \"data\": {\n \"preserveSpace\": true,\n \"text\": \"W\"\n }\n }\n ]\n }\n }\n ],\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\"\n }\n },\n {\n \"type\": \"insert\",\n \"data\": {\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"text\",\n \"data\": {\n \"preserveSpace\": true,\n \"text\": \"a\"\n }\n }\n ]\n }\n }\n ],\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\"\n }\n },\n {\n \"type\": \"insert\",\n \"data\": {\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"text\",\n \"data\": {\n \"preserveSpace\": true,\n \"text\": \"rld\"\n }\n }\n ]\n }\n }\n ],\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\"\n }\n },\n {\n \"type\": \"delete\",\n \"data\": {\n \"author\": \"不明な作成者\",\n \"date\": \"2019-11-15T14:19:04Z\",\n \"children\": [\n {\n \"type\": \"run\",\n \"data\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"children\": [\n {\n \"type\": \"deleteText\",\n \"data\": {\n \"text\": \"Hello \",\n \"preserveSpace\": true\n }\n }\n ]\n }\n }\n ]\n }\n }\n ],\n \"property\": {\n \"runProperty\": {\n \"sz\": null,\n \"szCs\": null,\n \"color\": null,\n \"highlight\": null,\n \"underline\": null,\n \"bold\": null,\n \"boldCs\": null,\n \"italic\": null,\n \"italicCs\": null,\n \"vanish\": null,\n \"spacing\": null,\n \"fonts\": null\n },\n \"style\": \"Normal\",\n \"numberingProperty\": null,\n \"alignment\": null,\n \"indent\": null,\n \"lineHeight\": null\n },\n \"hasNumbering\": false\n }\n }\n ],\n \"sectionProperty\": {\n \"pageSize\": {\n \"w\": 11906,\n \"h\": 16838\n },\n \"pageMargin\": {\n \"top\": 1134,\n \"left\": 1134,\n \"bottom\": 1134,\n \"right\": 1134,\n \"header\": 0,\n \"footer\": 0,\n \"gutter\": 0\n },\n \"columns\": 425,\n \"documentGrid\": 360,\n \"headerReference\": {\n \"headerType\": \"default\",\n \"id\": \"rId4\"\n },\n \"sectionType\": null\n },\n \"hasNumbering\": false\n },\n \"comments\": {\n \"comments\": []\n },\n \"numberings\": {\n \"abstractNums\": [],\n \"numberings\": []\n },\n \"settings\": {\n \"defaultTabStop\": 709,\n \"zoom\": 100,\n \"docId\": null,\n \"docVars\": []\n },\n \"fontTable\": {},\n \"media\": [],\n \"header\": {\n \"children\": []\n },\n \"commentsExtended\": {\n \"children\": []\n }\n}" diff --git a/docx-wasm/js/json/paragraph.ts b/docx-wasm/js/json/paragraph.ts index a4596e0..c3be683 100644 --- a/docx-wasm/js/json/paragraph.ts +++ b/docx-wasm/js/json/paragraph.ts @@ -1,4 +1,4 @@ -import { RunJSON, RunChildJSON, RunPropertyJSON } from "./run"; +import { RunJSON, RunPropertyJSON } from "./run"; import { IndentJSON } from "./indent"; import { CommentRangeStartJSON, CommentRangeEndJSON } from ".."; @@ -51,15 +51,17 @@ export type InsertJSON = { export type DeleteJSON = { type: "delete"; data: { - runs: { - runProperty: RunPropertyJSON; - children: RunChildJSON[]; - }[]; + children: DeleteChildJSON[]; author: string; data: string; }; }; +export type DeleteChildJSON = + | RunJSON + | CommentRangeStartJSON + | CommentRangeEndJSON; + export type BookmarkStartJSON = { type: "bookmarkStart"; data: { diff --git a/docx-wasm/js/json/run.ts b/docx-wasm/js/json/run.ts index b9c0c45..1258d69 100644 --- a/docx-wasm/js/json/run.ts +++ b/docx-wasm/js/json/run.ts @@ -1,4 +1,5 @@ import { DrawingJSON } from "./drawing"; +import { CommentRangeStartJSON, CommentRangeEndJSON } from ".."; export type RunPropertyJSON = { sz: number | null; @@ -19,7 +20,9 @@ export type RunChildJSON = | DeleteTextJSON | TabJSON | BreakJSON - | DrawingJSON; + | DrawingJSON + | CommentRangeStartJSON + | CommentRangeEndJSON; export type TextJSON = { type: "text"; diff --git a/docx-wasm/src/delete.rs b/docx-wasm/src/delete.rs index 2cabe65..d22338a 100644 --- a/docx-wasm/src/delete.rs +++ b/docx-wasm/src/delete.rs @@ -7,7 +7,7 @@ pub struct Delete(docx_rs::Delete); #[wasm_bindgen(js_name = createDelete)] pub fn create_delete(run: Run) -> Delete { - Delete(docx_rs::Delete::new(run.take())) + Delete(docx_rs::Delete::new().add_run(run.take())) } impl Delete {