Support nest comment (#116)

* fix: Prepare extended comments

* feat: Append paraId for paragraph

* feat: Support comment extended

* chore: Add fixture

* fix: browser example

* fix: test

* update snaps
main
bokuweb 2020-08-14 01:57:59 +09:00 committed by GitHub
parent c0aab13529
commit 7db426a132
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
82 changed files with 1115 additions and 137 deletions

View File

@ -1,7 +1,7 @@
use docx_rs::*; use docx_rs::*;
pub fn main() -> Result<(), DocxError> { pub fn main() -> Result<(), DocxError> {
let path = std::path::Path::new("./comment.docx"); let path = std::path::Path::new("./output/comment.docx");
let file = std::fs::File::create(&path).unwrap(); let file = std::fs::File::create(&path).unwrap();
Docx::new() Docx::new()
.add_paragraph( .add_paragraph(

View File

@ -0,0 +1,36 @@
use docx_rs::*;
pub fn main() -> Result<(), DocxError> {
let path = std::path::Path::new("./output/nested_comment.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")
.paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))),
)
.add_comment_end(1)
.add_comment_start(
Comment::new(2)
.author("bokuweb")
.date("2019-01-02T00:00:00Z")
.parent_comment_id(1)
.paragraph(Paragraph::new().add_run(Run::new().add_text("World"))),
)
.add_comment_end(2)
.add_comment_start(
Comment::new(3)
.author("bokuweb")
.date("2019-01-02T00:00:00Z")
.parent_comment_id(1)
.paragraph(Paragraph::new().add_run(Run::new().add_text("!!!!!"))),
)
.add_comment_end(3),
)
.build()
.pack(file)?;
Ok(())
}

View File

@ -0,0 +1,57 @@
use serde::Serialize;
use super::*;
use crate::documents::BuildXML;
use crate::xml_builder::*;
// i.e. <w15:commentEx w15:paraId="00000001" w15:paraIdParent="57D1BD7C" w15:done="0"/>
#[derive(Debug, Clone, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct CommentsExtended {
children: Vec<CommentExtended>,
}
impl CommentsExtended {
pub fn new() -> CommentsExtended {
Default::default()
}
pub fn add_comments_extended(&mut self, c: Vec<CommentExtended>) {
self.children = c;
}
}
impl Default for CommentsExtended {
fn default() -> Self {
Self { children: vec![] }
}
}
impl BuildXML for CommentsExtended {
fn build(&self) -> Vec<u8> {
let mut b = XMLBuilder::new();
b = b.open_comments_extended();
for c in &self.children {
b = b.add_child(c)
}
b.close().build()
}
}
#[cfg(test)]
mod tests {
use super::*;
use insta::assert_snapshot;
use std::str;
#[test]
fn test_settings() {
let mut c = CommentsExtended::new();
c.add_comments_extended(vec![CommentExtended::new("123")]);
let b = c.build();
assert_snapshot!("comments_extended_snapshot", str::from_utf8(&b).unwrap());
}
}

View File

@ -72,6 +72,11 @@ impl ContentTypes {
"/word/header1.xml".to_owned(), "/word/header1.xml".to_owned(),
"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml".to_owned(), "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml".to_owned(),
); );
self.types.insert(
"/word/commentsExtended.xml".to_owned(),
"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml"
.to_owned(),
);
self self
} }
} }

View File

@ -106,8 +106,8 @@ mod tests {
assert_eq!( assert_eq!(
str::from_utf8(&b).unwrap(), str::from_utf8(&b).unwrap(),
r#"<?xml version="1.0" encoding="UTF-8" standalone="yes"?> r#"<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" mc:Ignorable="w14 wp14"> <w:document xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" mc:Ignorable="w14 wp14">
<w:body><w:p><w:pPr><w:rPr /></w:pPr><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r></w:p><w:sectPr><w:pgSz w:w="11906" w:h="16838" /><w:pgMar w:top="1985" w:right="1701" w:bottom="1701" w:left="1701" w:header="851" w:footer="992" w:gutter="0" /><w:headerReference w:type="default" r:id="rId4" /><w:cols w:space="425" /> <w:body><w:p w14:paraId="12345678"><w:pPr><w:rPr /></w:pPr><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r></w:p><w:sectPr><w:pgSz w:w="11906" w:h="16838" /><w:pgMar w:top="1985" w:right="1701" w:bottom="1701" w:left="1701" w:header="851" w:footer="992" w:gutter="0" /><w:headerReference w:type="default" r:id="rId4" /><w:cols w:space="425" />
<w:docGrid w:type="lines" w:linePitch="360" /> <w:docGrid w:type="lines" w:linePitch="360" />
</w:sectPr></w:body> </w:sectPr></w:body>
</w:document>"# </w:document>"#

View File

@ -53,11 +53,16 @@ impl BuildXML for DocumentRels {
"rId4", "rId4",
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",
"header1.xml", "header1.xml",
)
.relationship(
"rId5",
"http://schemas.microsoft.com/office/2011/relationships/commentsExtended",
"commentsExtended.xml",
); );
if self.has_comments { if self.has_comments {
b = b.relationship( b = b.relationship(
"rId5", "rId6",
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments", "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",
"comments.xml", "comments.xml",
) )
@ -65,7 +70,7 @@ impl BuildXML for DocumentRels {
if self.has_numberings { if self.has_numberings {
b = b.relationship( b = b.relationship(
"rId6", "rId7",
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering", "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",
"numbering.xml", "numbering.xml",
) )

View File

@ -59,7 +59,7 @@ mod tests {
); );
assert_eq!( assert_eq!(
serde_json::to_string(&graphic).unwrap(), serde_json::to_string(&graphic).unwrap(),
r#"{"children":[{"dataType":"wpShape","children":[{"type":"shape","data":{"children":[{"type":"textbox","data":{"children":[{"children":[{"type":"paragraph","data":{"children":[{"type":"run","data":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"children":[{"type":"text","data":{"preserveSpace":true,"text":"pattern1"}}]}}],"property":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"style":null,"numberingProperty":null,"alignment":null,"indent":null},"hasNumbering":false,"attrs":[]}}],"has_numbering":false}],"hasNumbering":false}}]}}]}]}"# r#"{"children":[{"dataType":"wpShape","children":[{"type":"shape","data":{"children":[{"type":"textbox","data":{"children":[{"children":[{"type":"paragraph","data":{"id":"12345678","children":[{"type":"run","data":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"children":[{"type":"text","data":{"preserveSpace":true,"text":"pattern1"}}]}}],"property":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"style":null,"numberingProperty":null,"alignment":null,"indent":null},"hasNumbering":false}}],"has_numbering":false}],"hasNumbering":false}}]}}]}]}"#
); );
} }
} }

View File

@ -9,6 +9,7 @@ pub struct Comment {
pub author: String, pub author: String,
pub date: String, pub date: String,
pub paragraph: Paragraph, pub paragraph: Paragraph,
pub parent_comment_id: Option<usize>,
} }
impl Default for Comment { impl Default for Comment {
@ -18,6 +19,7 @@ impl Default for Comment {
author: "unnamed".to_owned(), author: "unnamed".to_owned(),
date: "1970-01-01T00:00:00Z".to_owned(), date: "1970-01-01T00:00:00Z".to_owned(),
paragraph: Paragraph::new(), paragraph: Paragraph::new(),
parent_comment_id: None,
} }
} }
} }
@ -45,6 +47,11 @@ impl Comment {
self self
} }
pub fn parent_comment_id(mut self, parent_comment_id: usize) -> Comment {
self.parent_comment_id = Some(parent_comment_id);
self
}
pub fn id(&self) -> usize { pub fn id(&self) -> usize {
self.id self.id
} }
@ -73,7 +80,7 @@ mod tests {
let b = Comment::new(1).build(); let b = Comment::new(1).build();
assert_eq!( assert_eq!(
str::from_utf8(&b).unwrap(), str::from_utf8(&b).unwrap(),
r#"<w:comment w:id="1" w:author="unnamed" w:date="1970-01-01T00:00:00Z" w:initials=""><w:p><w:pPr><w:rPr /></w:pPr></w:p></w:comment>"# r#"<w:comment w:id="1" w:author="unnamed" w:date="1970-01-01T00:00:00Z" w:initials=""><w:p w14:paraId="12345678"><w:pPr><w:rPr /></w:pPr></w:p></w:comment>"#
); );
} }
} }

View File

@ -0,0 +1,40 @@
use serde::Serialize;
use crate::documents::BuildXML;
use crate::xml_builder::*;
#[derive(Debug, Clone, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct CommentExtended {
paragraph_id: String,
done: bool,
parent_paragraph_id: Option<String>,
}
impl CommentExtended {
pub fn new(paragraph_id: impl Into<String>) -> CommentExtended {
Self {
paragraph_id: paragraph_id.into(),
done: false,
parent_paragraph_id: None,
}
}
pub fn done(mut self) -> CommentExtended {
self.done = true;
self
}
pub fn parent_paragraph_id(mut self, id: impl Into<String>) -> CommentExtended {
self.parent_paragraph_id = Some(id.into());
self
}
}
impl BuildXML for CommentExtended {
fn build(&self) -> Vec<u8> {
XMLBuilder::new()
.comment_extended(&self.paragraph_id, self.done, &self.parent_paragraph_id)
.build()
}
}

View File

@ -9,6 +9,7 @@ mod bookmark_start;
mod br; mod br;
mod color; mod color;
mod comment; mod comment;
mod comment_extended;
mod comment_range_end; mod comment_range_end;
mod comment_range_start; mod comment_range_start;
mod default_tab_stop; mod default_tab_stop;
@ -89,6 +90,7 @@ pub use bookmark_start::*;
pub use br::*; pub use br::*;
pub use color::*; pub use color::*;
pub use comment::*; pub use comment::*;
pub use comment_extended::*;
pub use comment_range_end::*; pub use comment_range_end::*;
pub use comment_range_start::*; pub use comment_range_start::*;
pub use default_tab_stop::*; pub use default_tab_stop::*;

View File

@ -9,19 +9,19 @@ use crate::xml_builder::*;
#[derive(Serialize, Debug, Clone, PartialEq)] #[derive(Serialize, Debug, Clone, PartialEq)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct Paragraph { pub struct Paragraph {
pub id: String,
pub children: Vec<ParagraphChild>, pub children: Vec<ParagraphChild>,
pub property: ParagraphProperty, pub property: ParagraphProperty,
pub has_numbering: bool, pub has_numbering: bool,
pub attrs: Vec<(String, String)>,
} }
impl Default for Paragraph { impl Default for Paragraph {
fn default() -> Self { fn default() -> Self {
Self { Self {
id: crate::generate_para_id(),
children: Vec::new(), children: Vec::new(),
property: ParagraphProperty::new(), property: ParagraphProperty::new(),
has_numbering: false, has_numbering: false,
attrs: Vec::new(),
} }
} }
} }
@ -121,11 +121,6 @@ impl Paragraph {
self self
} }
pub fn add_attr(mut self, key: impl Into<String>, val: impl Into<String>) -> Paragraph {
self.attrs.push((key.into(), val.into()));
self
}
pub fn add_bookmark_start(mut self, id: usize, name: impl Into<String>) -> Paragraph { pub fn add_bookmark_start(mut self, id: usize, name: impl Into<String>) -> Paragraph {
self.children self.children
.push(ParagraphChild::BookmarkStart(BookmarkStart::new(id, name))); .push(ParagraphChild::BookmarkStart(BookmarkStart::new(id, name)));
@ -207,7 +202,7 @@ impl Paragraph {
impl BuildXML for Paragraph { impl BuildXML for Paragraph {
fn build(&self) -> Vec<u8> { fn build(&self) -> Vec<u8> {
XMLBuilder::new() XMLBuilder::new()
.open_paragraph(&self.attrs) .open_paragraph(&self.id)
.add_child(&self.property) .add_child(&self.property)
.add_children(&self.children) .add_children(&self.children)
.close() .close()
@ -230,19 +225,7 @@ mod tests {
.build(); .build();
assert_eq!( assert_eq!(
str::from_utf8(&b).unwrap(), str::from_utf8(&b).unwrap(),
r#"<w:p><w:pPr><w:rPr /></w:pPr><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r></w:p>"# r#"<w:p w14:paraId="12345678"><w:pPr><w:rPr /></w:pPr><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r></w:p>"#
);
}
#[test]
fn test_custom_attr() {
let b = Paragraph::new()
.add_run(Run::new().add_text("Hello"))
.add_attr("customId", "abcd-1234-567890")
.build();
assert_eq!(
str::from_utf8(&b).unwrap(),
r#"<w:p customId="abcd-1234-567890"><w:pPr><w:rPr /></w:pPr><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r></w:p>"#
); );
} }
@ -255,7 +238,7 @@ mod tests {
.build(); .build();
assert_eq!( assert_eq!(
str::from_utf8(&b).unwrap(), str::from_utf8(&b).unwrap(),
r#"<w:p><w:pPr><w:rPr /></w:pPr><w:bookmarkStart w:id="0" w:name="article" /><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r><w:bookmarkEnd w:id="0" /></w:p>"# r#"<w:p w14:paraId="12345678"><w:pPr><w:rPr /></w:pPr><w:bookmarkStart w:id="0" w:name="article" /><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r><w:bookmarkEnd w:id="0" /></w:p>"#
); );
} }
@ -268,7 +251,7 @@ mod tests {
.build(); .build();
assert_eq!( assert_eq!(
str::from_utf8(&b).unwrap(), str::from_utf8(&b).unwrap(),
r#"<w:p><w:pPr><w:rPr /></w:pPr><w:commentRangeStart w:id="1" /><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r><w:r> r#"<w:p w14:paraId="12345678"><w:pPr><w:rPr /></w:pPr><w:commentRangeStart w:id="1" /><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r><w:r>
<w:rPr /> <w:rPr />
</w:r> </w:r>
<w:commentRangeEnd w:id="1" /> <w:commentRangeEnd w:id="1" />
@ -286,7 +269,7 @@ mod tests {
.build(); .build();
assert_eq!( assert_eq!(
str::from_utf8(&b).unwrap(), str::from_utf8(&b).unwrap(),
r#"<w:p><w:pPr><w:rPr /><w:numPr><w:numId w:val="0" /><w:ilvl w:val="1" /></w:numPr></w:pPr><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r></w:p>"# r#"<w:p w14:paraId="12345678"><w:pPr><w:rPr /><w:numPr><w:numId w:val="0" /><w:ilvl w:val="1" /></w:numPr></w:pPr><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r></w:p>"#
); );
} }
@ -296,7 +279,7 @@ mod tests {
let p = Paragraph::new().add_run(run); let p = Paragraph::new().add_run(run);
assert_eq!( assert_eq!(
serde_json::to_string(&p).unwrap(), serde_json::to_string(&p).unwrap(),
r#"{"children":[{"type":"run","data":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"children":[{"type":"text","data":{"preserveSpace":true,"text":"Hello"}}]}}],"property":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"style":null,"numberingProperty":null,"alignment":null,"indent":null},"hasNumbering":false,"attrs":[]}"# r#"{"id":"12345678","children":[{"type":"run","data":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"children":[{"type":"text","data":{"preserveSpace":true,"text":"Hello"}}]}}],"property":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"style":null,"numberingProperty":null,"alignment":null,"indent":null},"hasNumbering":false}"#
); );
} }
@ -307,7 +290,7 @@ mod tests {
let p = Paragraph::new().add_insert(ins); let p = Paragraph::new().add_insert(ins);
assert_eq!( assert_eq!(
serde_json::to_string(&p).unwrap(), serde_json::to_string(&p).unwrap(),
r#"{"children":[{"type":"insert","data":{"runs":[{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"children":[{"type":"text","data":{"preserveSpace":true,"text":"Hello"}}]}],"author":"unnamed","date":"1970-01-01T00:00:00Z"}}],"property":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"style":null,"numberingProperty":null,"alignment":null,"indent":null},"hasNumbering":false,"attrs":[]}"# r#"{"id":"12345678","children":[{"type":"insert","data":{"runs":[{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"children":[{"type":"text","data":{"preserveSpace":true,"text":"Hello"}}]}],"author":"unnamed","date":"1970-01-01T00:00:00Z"}}],"property":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"style":null,"numberingProperty":null,"alignment":null,"indent":null},"hasNumbering":false}"#
); );
} }
} }

View File

@ -135,7 +135,7 @@ mod tests {
.build(); .build();
assert_eq!( assert_eq!(
str::from_utf8(&b).unwrap(), str::from_utf8(&b).unwrap(),
r#"<w:tc><w:tcPr /><w:p><w:pPr><w:rPr /></w:pPr><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r></w:p></w:tc>"# r#"<w:tc><w:tcPr /><w:p w14:paraId="12345678"><w:pPr><w:rPr /></w:pPr><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r></w:p></w:tc>"#
); );
} }
@ -146,7 +146,7 @@ mod tests {
.grid_span(2); .grid_span(2);
assert_eq!( assert_eq!(
serde_json::to_string(&c).unwrap(), serde_json::to_string(&c).unwrap(),
r#"{"children":[{"type":"paragraph","data":{"children":[{"type":"run","data":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"children":[{"type":"text","data":{"preserveSpace":true,"text":"Hello"}}]}}],"property":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"style":null,"numberingProperty":null,"alignment":null,"indent":null},"hasNumbering":false,"attrs":[]}}],"property":{"width":null,"borders":null,"gridSpan":2,"verticalMerge":null,"verticalAlign":null},"hasNumbering":false}"# r#"{"children":[{"type":"paragraph","data":{"id":"12345678","children":[{"type":"run","data":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"children":[{"type":"text","data":{"preserveSpace":true,"text":"Hello"}}]}}],"property":{"runProperty":{"sz":null,"szCs":null,"color":null,"highlight":null,"underline":null,"bold":null,"boldCs":null,"italic":null,"italicCs":null,"vanish":null,"fonts":null},"style":null,"numberingProperty":null,"alignment":null,"indent":null},"hasNumbering":false}}],"property":{"width":null,"borders":null,"gridSpan":2,"verticalMerge":null,"verticalAlign":null},"hasNumbering":false}"#
); );
} }
} }

View File

@ -99,7 +99,7 @@ mod tests {
.build(); .build();
assert_eq!( assert_eq!(
str::from_utf8(&b).unwrap(), str::from_utf8(&b).unwrap(),
r#"<w:txbxContent><w:p><w:pPr><w:rPr /></w:pPr></w:p></w:txbxContent>"# r#"<w:txbxContent><w:p w14:paraId="12345678"><w:pPr><w:rPr /></w:pPr></w:p></w:txbxContent>"#
); );
} }
} }

View File

@ -59,7 +59,7 @@ mod tests {
let b = WpsTextBox::new().add_content(c).build(); let b = WpsTextBox::new().add_content(c).build();
assert_eq!( assert_eq!(
str::from_utf8(&b).unwrap(), str::from_utf8(&b).unwrap(),
r#"<wps:txbx><w:txbxContent><w:p><w:pPr><w:rPr /></w:pPr></w:p></w:txbxContent></wps:txbx>"# r#"<wps:txbx><w:txbxContent><w:p w14:paraId="12345678"><w:pPr><w:rPr /></w:pPr></w:p></w:txbxContent></wps:txbx>"#
); );
} }
} }

View File

@ -1,5 +1,8 @@
use std::collections::HashMap;
mod build_xml; mod build_xml;
mod comments; mod comments;
mod comments_extended;
mod content_types; mod content_types;
mod doc_props; mod doc_props;
mod document; mod document;
@ -10,6 +13,7 @@ mod header;
mod header_id; mod header_id;
mod history_id; mod history_id;
mod numberings; mod numberings;
mod paragraph_id;
mod pic_id; mod pic_id;
mod rels; mod rels;
mod settings; mod settings;
@ -18,9 +22,11 @@ mod xml_docx;
pub(crate) use build_xml::BuildXML; pub(crate) use build_xml::BuildXML;
pub(crate) use history_id::HistoryId; pub(crate) use history_id::HistoryId;
pub(crate) use paragraph_id::*;
pub(crate) use pic_id::*; pub(crate) use pic_id::*;
pub use comments::*; pub use comments::*;
pub use comments_extended::*;
pub use content_types::*; pub use content_types::*;
pub use doc_props::*; pub use doc_props::*;
pub use document::*; pub use document::*;
@ -51,6 +57,7 @@ pub struct Docx {
pub font_table: FontTable, pub font_table: FontTable,
pub media: Vec<(usize, Vec<u8>)>, pub media: Vec<(usize, Vec<u8>)>,
pub header: Header, pub header: Header,
pub comments_extended: CommentsExtended,
} }
impl Default for Docx { impl Default for Docx {
@ -67,6 +74,8 @@ impl Default for Docx {
let numberings = Numberings::new(); let numberings = Numberings::new();
let media = vec![]; let media = vec![];
let header = Header::new(); let header = Header::new();
let comments_extended = CommentsExtended::new();
Docx { Docx {
content_type, content_type,
rels, rels,
@ -80,6 +89,7 @@ impl Default for Docx {
numberings, numberings,
media, media,
header, header,
comments_extended,
} }
} }
} }
@ -187,6 +197,7 @@ impl Docx {
numberings: self.numberings.build(), numberings: self.numberings.build(),
media: images, media: images,
header: self.header.build(), header: self.header.build(),
comments_extended: self.comments_extended.build(),
} }
} }
@ -198,12 +209,59 @@ impl Docx {
// Traverse and clone comments from document and add to comments node. // Traverse and clone comments from document and add to comments node.
fn update_comments(&mut self) { fn update_comments(&mut self) {
let mut comments: Vec<Comment> = vec![]; let mut comments: Vec<Comment> = vec![];
let mut comments_extended: Vec<CommentExtended> = vec![];
let mut comment_map: HashMap<usize, String> = HashMap::new();
for child in &self.document.children { for child in &self.document.children {
match child { match child {
DocumentChild::Paragraph(paragraph) => { DocumentChild::Paragraph(paragraph) => {
for child in &paragraph.children { for child in &paragraph.children {
if let ParagraphChild::CommentStart(c) = child { if let ParagraphChild::CommentStart(c) = child {
let comment = c.comment();
let para_id = comment.paragraph.id.clone();
comment_map.insert(comment.id(), para_id.clone());
}
}
}
DocumentChild::Table(table) => {
for row in &table.rows {
for cell in &row.cells {
for content in &cell.children {
match content {
TableCellContent::Paragraph(paragraph) => {
for child in &paragraph.children {
if let ParagraphChild::CommentStart(c) = child {
let comment = c.comment();
let para_id = comment.paragraph.id.clone();
comment_map.insert(comment.id(), para_id.clone());
}
}
}
}
}
}
}
}
}
}
for child in &self.document.children {
match child {
DocumentChild::Paragraph(paragraph) => {
for child in &paragraph.children {
if let ParagraphChild::CommentStart(c) = child {
let comment = c.comment();
let para_id = comment.paragraph.id.clone();
comments.push(c.comment()); comments.push(c.comment());
let comment_extended = CommentExtended::new(para_id);
if let Some(parent_comment_id) = comment.parent_comment_id {
let parent_para_id =
comment_map.get(&parent_comment_id).unwrap().clone();
comments_extended
.push(comment_extended.parent_paragraph_id(parent_para_id));
} else {
comments_extended.push(comment_extended);
}
} }
} }
} }
@ -231,6 +289,10 @@ impl Docx {
if !comments.is_empty() { if !comments.is_empty() {
self.document_rels.has_comments = true; self.document_rels.has_comments = true;
} }
self.comments_extended
.add_comments_extended(comments_extended);
self.comments.add_comments(comments); self.comments.add_comments(comments);
} }

View File

@ -0,0 +1,18 @@
#[cfg(not(test))]
use std::sync::atomic::AtomicUsize;
#[cfg(not(test))]
static PARA_ID: AtomicUsize = AtomicUsize::new(1);
#[cfg(not(test))]
pub fn generate_para_id() -> String {
use std::sync::atomic::Ordering;
let id = PARA_ID.load(Ordering::Relaxed);
PARA_ID.store(id.wrapping_add(1), Ordering::Relaxed);
format!("{:08x}", id)
}
#[cfg(test)]
pub fn generate_para_id() -> String {
"12345678".to_owned()
}

View File

@ -0,0 +1,5 @@
---
source: docx-core/src/documents/comments_extended.rs
expression: "str::from_utf8(&b).unwrap()"
---
<w15:commentsEx xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010"><w15:commentEx w15:paraId="123" w15:done="0" /></w15:commentsEx>

View File

@ -0,0 +1,5 @@
---
source: docx-core/src/documents/comments_extended.rs
expression: "str::from_utf8(&b).unwrap()"
---
"<w15:commentsEx xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" xmlns:cx=\"http://schemas.microsoft.com/office/drawing/2014/chartex\" xmlns:cx1=\"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex\" xmlns:cx2=\"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex\" xmlns:cx3=\"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex\" xmlns:cx4=\"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex\" xmlns:cx5=\"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex\" xmlns:cx6=\"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex\" xmlns:cx7=\"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex\" xmlns:cx8=\"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:aink=\"http://schemas.microsoft.com/office/drawing/2016/ink\" xmlns:am3d=\"http://schemas.microsoft.com/office/drawing/2017/model3d\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" xmlns:w10=\"urn:schemas-microsoft-com:office:word\" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" xmlns:w15=\"http://schemas.microsoft.com/office/word/2012/wordml\" xmlns:w16cex=\"http://schemas.microsoft.com/office/word/2018/wordml/cex\" xmlns:w16cid=\"http://schemas.microsoft.com/office/word/2016/wordml/cid\" xmlns:w16=\"http://schemas.microsoft.com/office/word/2018/wordml\" xmlns:w16se=\"http://schemas.microsoft.com/office/word/2015/wordml/symex\" xmlns:wpg=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\" xmlns:wpi=\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\" xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\" xmlns:wps=\"http://schemas.microsoft.com/office/word/2010\"><w15:commentEx w15:paraId=\"123\" w15:done=\"0\" /></w15:commentsEx>"

View File

@ -18,6 +18,7 @@ pub struct XMLDocx {
pub numberings: Vec<u8>, pub numberings: Vec<u8>,
pub media: Vec<(usize, Vec<u8>)>, pub media: Vec<(usize, Vec<u8>)>,
pub header: Vec<u8>, pub header: Vec<u8>,
pub comments_extended: Vec<u8>,
} }
impl XMLDocx { impl XMLDocx {

View File

@ -150,6 +150,7 @@ mod tests {
assert_eq!( assert_eq!(
p, p,
Paragraph { Paragraph {
id: "12345678".to_owned(),
children: vec![ParagraphChild::Run(Box::new(Run::new().add_text("a")))], children: vec![ParagraphChild::Run(Box::new(Run::new().add_text("a")))],
property: ParagraphProperty { property: ParagraphProperty {
run_property: RunProperty::new(), run_property: RunProperty::new(),
@ -164,7 +165,6 @@ mod tests {
)), )),
}, },
has_numbering: false, has_numbering: false,
attrs: Vec::new(),
} }
); );
} }
@ -189,6 +189,7 @@ mod tests {
assert_eq!( assert_eq!(
p, p,
Paragraph { Paragraph {
id: "12345678".to_owned(),
children: vec![ParagraphChild::Run(Box::new(Run::new().add_text("a")))], children: vec![ParagraphChild::Run(Box::new(Run::new().add_text("a")))],
property: ParagraphProperty { property: ParagraphProperty {
run_property: RunProperty::new(), run_property: RunProperty::new(),
@ -198,7 +199,6 @@ mod tests {
indent: Some(Indent::new(None, None, None, Some(100))), indent: Some(Indent::new(None, None, None, Some(100))),
}, },
has_numbering: false, has_numbering: false,
attrs: Vec::new(),
} }
); );
} }
@ -218,6 +218,7 @@ mod tests {
assert_eq!( assert_eq!(
p, p,
Paragraph { Paragraph {
id: "12345678".to_owned(),
children: vec![], children: vec![],
property: ParagraphProperty { property: ParagraphProperty {
run_property: RunProperty::new(), run_property: RunProperty::new(),
@ -227,7 +228,6 @@ mod tests {
indent: None, indent: None,
}, },
has_numbering: false, has_numbering: false,
attrs: vec![],
} }
); );
} }
@ -249,6 +249,7 @@ mod tests {
assert_eq!( assert_eq!(
p, p,
Paragraph { Paragraph {
id: "12345678".to_owned(),
children: vec![], children: vec![],
property: ParagraphProperty { property: ParagraphProperty {
run_property: RunProperty::new(), run_property: RunProperty::new(),
@ -260,7 +261,6 @@ mod tests {
indent: None, indent: None,
}, },
has_numbering: true, has_numbering: true,
attrs: vec![],
} }
); );
} }
@ -282,6 +282,7 @@ mod tests {
assert_eq!( assert_eq!(
p, p,
Paragraph { Paragraph {
id: "12345678".to_owned(),
children: vec![ParagraphChild::Insert( children: vec![ParagraphChild::Insert(
Insert::new(Run::new().add_text("W")) Insert::new(Run::new().add_text("W"))
.author("unknown") .author("unknown")
@ -295,7 +296,6 @@ mod tests {
indent: None, indent: None,
}, },
has_numbering: false, has_numbering: false,
attrs: vec![],
} }
); );
} }
@ -318,6 +318,7 @@ mod tests {
assert_eq!( assert_eq!(
p, p,
Paragraph { Paragraph {
id: "12345678".to_owned(),
children: vec![ParagraphChild::Delete( children: vec![ParagraphChild::Delete(
Delete::new(Run::new().add_delete_text("Hello ")) Delete::new(Run::new().add_delete_text("Hello "))
.author("unknown") .author("unknown")
@ -331,7 +332,6 @@ mod tests {
indent: None, indent: None,
}, },
has_numbering: false, has_numbering: false,
attrs: vec![],
} }
); );
} }
@ -354,6 +354,7 @@ mod tests {
assert_eq!( assert_eq!(
p, p,
Paragraph { Paragraph {
id: "12345678".to_owned(),
children: vec![ children: vec![
ParagraphChild::BookmarkStart(BookmarkStart::new(0, "ABCD-1234")), ParagraphChild::BookmarkStart(BookmarkStart::new(0, "ABCD-1234")),
ParagraphChild::Run(Box::new(Run::new().add_text("Bookmarked"))), ParagraphChild::Run(Box::new(Run::new().add_text("Bookmarked"))),
@ -367,7 +368,6 @@ mod tests {
indent: None, indent: None,
}, },
has_numbering: false, has_numbering: false,
attrs: vec![],
} }
); );
} }
@ -395,6 +395,7 @@ mod tests {
assert_eq!( assert_eq!(
p, p,
Paragraph { Paragraph {
id: "12345678".to_owned(),
children: vec![ children: vec![
ParagraphChild::Insert( ParagraphChild::Insert(
Insert::new(Run::new().add_text("W")) Insert::new(Run::new().add_text("W"))
@ -415,7 +416,6 @@ mod tests {
indent: None, indent: None,
}, },
has_numbering: false, has_numbering: false,
attrs: vec![],
} }
); );
} }
@ -441,6 +441,7 @@ mod tests {
assert_eq!( assert_eq!(
p, p,
Paragraph { Paragraph {
id: "12345678".to_owned(),
children: vec![ParagraphChild::Insert( children: vec![ParagraphChild::Insert(
Insert::new(Run::new().add_text("W")) Insert::new(Run::new().add_text("W"))
.author("unknown") .author("unknown")
@ -455,7 +456,6 @@ mod tests {
indent: None, indent: None,
}, },
has_numbering: false, has_numbering: false,
attrs: vec![],
} }
); );
} }

View File

@ -0,0 +1,125 @@
use super::XMLBuilder;
use super::XmlEvent;
impl XMLBuilder {
pub(crate) fn open_comments_extended(mut self) -> Self {
self.writer
.write(
XmlEvent::start_element("w15:commentsEx")
.attr(
"xmlns:wpc",
"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
)
.attr(
"xmlns:cx",
"http://schemas.microsoft.com/office/drawing/2014/chartex",
)
.attr(
"xmlns:cx1",
"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",
)
.attr(
"xmlns:cx2",
"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",
)
.attr(
"xmlns:cx3",
"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",
)
.attr(
"xmlns:cx4",
"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",
)
.attr(
"xmlns:cx5",
"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",
)
.attr(
"xmlns:cx6",
"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",
)
.attr(
"xmlns:cx7",
"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",
)
.attr(
"xmlns:cx8",
"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",
)
.attr(
"xmlns:mc",
"http://schemas.openxmlformats.org/markup-compatibility/2006",
)
.attr(
"xmlns:aink",
"http://schemas.microsoft.com/office/drawing/2016/ink",
)
.attr(
"xmlns:am3d",
"http://schemas.microsoft.com/office/drawing/2017/model3d",
)
.attr("xmlns:o", "urn:schemas-microsoft-com:office:office")
.attr(
"xmlns:r",
"http://schemas.openxmlformats.org/officeDocument/2006/relationships",
)
.attr(
"xmlns:m",
"http://schemas.openxmlformats.org/officeDocument/2006/math",
)
.attr("xmlns:v", "urn:schemas-microsoft-com:vml")
.attr(
"xmlns:wp14",
"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",
)
.attr(
"xmlns:wp",
"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",
)
.attr("xmlns:w10", "urn:schemas-microsoft-com:office:word")
.attr(
"xmlns:w",
"http://schemas.openxmlformats.org/wordprocessingml/2006/main",
)
.attr(
"xmlns:w14",
"http://schemas.microsoft.com/office/word/2010/wordml",
)
.attr(
"xmlns:w15",
"http://schemas.microsoft.com/office/word/2012/wordml",
)
.attr(
"xmlns:w16cex",
"http://schemas.microsoft.com/office/word/2018/wordml/cex",
)
.attr(
"xmlns:w16cid",
"http://schemas.microsoft.com/office/word/2016/wordml/cid",
)
.attr(
"xmlns:w16",
"http://schemas.microsoft.com/office/word/2018/wordml",
)
.attr(
"xmlns:w16se",
"http://schemas.microsoft.com/office/word/2015/wordml/symex",
)
.attr(
"xmlns:wpg",
"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",
)
.attr(
"xmlns:wpi",
"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",
)
.attr(
"xmlns:wne",
"http://schemas.microsoft.com/office/word/2006/wordml",
)
.attr("xmlns:wps", "http://schemas.microsoft.com/office/word/2010"),
)
.expect("should write to buf");
self
}
}

View File

@ -42,6 +42,10 @@ impl XMLBuilder {
"xmlns:w14", "xmlns:w14",
"http://schemas.microsoft.com/office/word/2010/wordml", "http://schemas.microsoft.com/office/word/2010/wordml",
) )
.attr(
"xmlns:w15",
"http://schemas.microsoft.com/office/word/2012/wordml",
)
.attr("mc:Ignorable", "w14 wp14"), .attr("mc:Ignorable", "w14 wp14"),
) )
.expect("should write to buf"); .expect("should write to buf");
@ -63,7 +67,7 @@ mod tests {
let r = b.open_document().close().build(); let r = b.open_document().close().build();
assert_eq!( assert_eq!(
str::from_utf8(&r).unwrap(), str::from_utf8(&r).unwrap(),
r#"<w:document xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" mc:Ignorable="w14 wp14" />"# r#"<w:document xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" mc:Ignorable="w14 wp14" />"#
); );
} }
} }

View File

@ -68,7 +68,7 @@ impl XMLBuilder {
closed!(q_format, "w:qFormat"); closed!(q_format, "w:qFormat");
// i.e. <w:p ... > // i.e. <w:p ... >
// open!(open_paragraph, "w:p"); // open!(open_paragraph, "w:p");
open_with_attrs!(open_paragraph, "w:p"); open!(open_paragraph, "w:p", "w14:paraId");
open!(open_paragraph_property, "w:pPr"); open!(open_paragraph_property, "w:pPr");
open!(open_doc_defaults, "w:docDefaults"); open!(open_doc_defaults, "w:docDefaults");
// i.e. <w:name ... > // i.e. <w:name ... >
@ -263,6 +263,35 @@ impl XMLBuilder {
*/ */
open!(open_level_override, "w:lvlOverride", "w:ilvl"); open!(open_level_override, "w:lvlOverride", "w:ilvl");
closed_with_str!(start_override, "w:startOverride"); closed_with_str!(start_override, "w:startOverride");
// CommentExtended
// w15:commentEx w15:paraId="00000001" w15:paraIdParent="57D1BD7C" w15:done="0"
pub(crate) fn comment_extended(
mut self,
paragraph_id: &str,
done: bool,
parent_paragraph_id: &Option<String>,
) -> Self {
if let Some(parent_paragraph_id) = parent_paragraph_id {
self.writer
.write(
XmlEvent::start_element("w15:commentEx")
.attr("w15:paraId", paragraph_id)
.attr("w15:paraIdParent", parent_paragraph_id)
.attr("w15:done", &format!("{}", done as usize)),
)
.expect(EXPECT_MESSAGE);
return self.close();
}
self.writer
.write(
XmlEvent::start_element("w15:commentEx")
.attr("w15:paraId", paragraph_id)
.attr("w15:done", &format!("{}", done as usize)),
)
.expect(EXPECT_MESSAGE);
self.close()
}
} }
#[cfg(test)] #[cfg(test)]

View File

@ -254,25 +254,6 @@ macro_rules! open {
}; };
} }
macro_rules! open_with_attrs {
($name: ident, $el_name: expr) => {
pub(crate) fn $name(mut self, attrs: &[(String, String)]) -> Self {
let mut e = XmlEvent::start_element($el_name);
#[allow(unused)]
let mut key: &str = "";
#[allow(unused)]
let mut val: &str = "";
for attr in attrs {
key = &attr.0;
val = &attr.1;
e = e.attr(key, val);
}
self.writer.write(e).expect("should write to buf");
self
}
};
}
macro_rules! closed_with_child { macro_rules! closed_with_child {
($name: ident, $el_name: expr) => { ($name: ident, $el_name: expr) => {
#[allow(dead_code)] #[allow(dead_code)]

View File

@ -2,6 +2,7 @@
mod macros; mod macros;
mod comments; mod comments;
mod comments_extended;
mod core_properties; mod core_properties;
mod declaration; mod declaration;
mod document; mod document;

View File

@ -43,6 +43,8 @@ where
zip.write_all(&xml.numberings)?; zip.write_all(&xml.numberings)?;
zip.start_file("word/header1.xml", options)?; zip.start_file("word/header1.xml", options)?;
zip.write_all(&xml.header)?; zip.write_all(&xml.header)?;
zip.start_file("word/CommentsExtended.xml", options)?;
zip.write_all(&xml.comments_extended)?;
if !xml.media.is_empty() { if !xml.media.is_empty() {
zip.add_directory("word/media/", Default::default())?; zip.add_directory("word/media/", Default::default())?;

View File

@ -206,21 +206,6 @@ pub fn tab_and_break() -> Result<(), DocxError> {
Ok(()) Ok(())
} }
#[test]
pub fn custom_attr_paragraph() -> Result<(), DocxError> {
let path = std::path::Path::new("./tests/output/custom_attr_paragraph.docx");
let file = std::fs::File::create(&path).unwrap();
Docx::new()
.add_paragraph(
Paragraph::new()
.add_run(Run::new().add_text("Hello"))
.add_attr("w:customId", "1234-5678"),
)
.build()
.pack(file)?;
Ok(())
}
#[test] #[test]
pub fn history() -> Result<(), DocxError> { pub fn history() -> Result<(), DocxError> {
let path = std::path::Path::new("./tests/output/history.docx"); let path = std::path::Path::new("./tests/output/history.docx");

View File

@ -1,4 +1,4 @@
use insta::assert_debug_snapshot; use insta::assert_json_snapshot;
use docx_rs::*; use docx_rs::*;
use std::fs::*; use std::fs::*;
@ -11,7 +11,7 @@ pub fn read_hello() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_hello", &json);
let path = std::path::Path::new("./tests/output/hello.json"); let path = std::path::Path::new("./tests/output/hello.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();
@ -26,7 +26,7 @@ pub fn read_numbering() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_numbering", &json);
let path = std::path::Path::new("./tests/output/numbering.json"); let path = std::path::Path::new("./tests/output/numbering.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();
@ -41,7 +41,7 @@ pub fn read_decoration() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_decoration", &json);
let path = std::path::Path::new("./tests/output/decoration.json"); let path = std::path::Path::new("./tests/output/decoration.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();
@ -57,7 +57,7 @@ pub fn read_highlight_and_underline() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_highlight_and_underline", &json);
let path = std::path::Path::new("./tests/output/highlight_and_underline.json"); let path = std::path::Path::new("./tests/output/highlight_and_underline.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();
@ -72,7 +72,7 @@ pub fn read_history() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_history", &json);
let path = std::path::Path::new("./tests/output/history.json"); let path = std::path::Path::new("./tests/output/history.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();
@ -87,7 +87,7 @@ pub fn read_indent_word_online() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_indent_word_online", &json);
let path = std::path::Path::new("./tests/output/indent_word_online.json"); let path = std::path::Path::new("./tests/output/indent_word_online.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();
@ -102,7 +102,7 @@ pub fn read_tab_and_break() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_tab_and_break", &json);
let path = std::path::Path::new("./tests/output/tab_and_break.json"); let path = std::path::Path::new("./tests/output/tab_and_break.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();
@ -117,7 +117,7 @@ pub fn read_table_docx() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_table_docx", &json);
let path = std::path::Path::new("./tests/output/table_docx.json"); let path = std::path::Path::new("./tests/output/table_docx.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();
@ -132,7 +132,7 @@ pub fn read_table_merged_libre_office() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_table_merged_libre_office", &json);
let path = std::path::Path::new("./tests/output/table_merged_libre_office.json"); let path = std::path::Path::new("./tests/output/table_merged_libre_office.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();
@ -147,7 +147,7 @@ pub fn read_bom() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_bom", &json);
let path = std::path::Path::new("./tests/output/bom.json"); let path = std::path::Path::new("./tests/output/bom.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();
@ -162,7 +162,7 @@ pub fn read_bookmark() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_bookmark", &json);
let path = std::path::Path::new("./tests/output/bookmark.json"); let path = std::path::Path::new("./tests/output/bookmark.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();
@ -177,7 +177,7 @@ pub fn read_insert_table() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_insert_table", &json);
let path = std::path::Path::new("./tests/output/insert_table.json"); let path = std::path::Path::new("./tests/output/insert_table.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();
@ -192,7 +192,7 @@ pub fn read_textbox() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_textbox", &json);
let path = std::path::Path::new("./tests/output/textbox.json"); let path = std::path::Path::new("./tests/output/textbox.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();
@ -207,7 +207,7 @@ pub fn read_from_doc() {
file.read_to_end(&mut buf).unwrap(); file.read_to_end(&mut buf).unwrap();
let json = read_docx(&buf).unwrap().json(); let json = read_docx(&buf).unwrap().json();
assert_debug_snapshot!(&json); assert_json_snapshot!("read_from_doc", &json);
let path = std::path::Path::new("./tests/output/from_doc.json"); let path = std::path::Path::new("./tests/output/from_doc.json");
let mut file = std::fs::File::create(&path).unwrap(); let mut file = std::fs::File::create(&path).unwrap();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,16 +1,33 @@
import { saveAs } from "file-saver"; import { saveAs } from "file-saver";
import("../js").then(w => { import("../js").then((w) => {
const buf = new w.Docx() const buf = new w.Docx()
.addParagraph( .addParagraph(
new w.Paragraph().addRun(new w.Run().addText("Hello ")).addRun( new w.Paragraph()
new w.Run() .addRun(new w.Run().addText("Hello "))
.addText("World!!") .addRun(
.bold() new w.Run()
.highlight("yellow") .addText("World!!")
.color("FF0000") .bold()
.size(40) .highlight("yellow")
) .color("FF0000")
.size(40)
)
.addCommentStart(
new w.Comment(1)
.author("bokuweb")
.date(new Date().toISOString())
.paragraph(new w.Paragraph().addRun(new w.Run().addText("hello")))
)
.addCommentEnd(new w.CommentEnd(1))
.addCommentStart(
new w.Comment(2)
.author("bokuweb")
.date(new Date().toISOString())
.parentCommentId(1)
.paragraph(new w.Paragraph().addRun(new w.Run().addText("world")))
)
.addCommentEnd(new w.CommentEnd(2))
) )
.build(); .build();
saveAs(new Blob([buf]), "hello.docx"); saveAs(new Blob([buf]), "hello.docx");

View File

@ -5,6 +5,7 @@ export class Comment {
_author: string; _author: string;
_date: string; _date: string;
_paragraph: Paragraph; _paragraph: Paragraph;
_parentCommentId: number;
constructor(id: number) { constructor(id: number) {
this.id = id; this.id = id;
@ -24,4 +25,9 @@ export class Comment {
this._paragraph = p; this._paragraph = p;
return this; return this;
} }
parentCommentId(id: number) {
this._parentCommentId = id;
return this;
}
} }

View File

@ -179,6 +179,9 @@ export class Docx {
if (c._date) { if (c._date) {
comment = comment.date(c._date); comment = comment.date(c._date);
} }
if (c._parentCommentId) {
comment = comment.parent_comment_id(c._parentCommentId);
}
return comment; return comment;
} }

View File

@ -21,7 +21,9 @@
"**/serialize-javascript": "4.0.0" "**/serialize-javascript": "4.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/file-saver": "^2.0.1",
"@wasm-tool/wasm-pack-plugin": "1.3.1", "@wasm-tool/wasm-pack-plugin": "1.3.1",
"file-saver": "^2.0.2",
"html-webpack-plugin": "3.2.0", "html-webpack-plugin": "3.2.0",
"npm-run-all": "4.1.5", "npm-run-all": "4.1.5",
"text-encoding": "0.7.0", "text-encoding": "0.7.0",
@ -29,7 +31,8 @@
"typescript": "3.9.7", "typescript": "3.9.7",
"webpack": "4.39.3", "webpack": "4.39.3",
"webpack-cli": "3.3.8", "webpack-cli": "3.3.8",
"webpack-dev-server": "3.8.0" "webpack-dev-server": "3.8.0",
"webpack-merge": "^5.1.1"
}, },
"files": [ "files": [
"dist" "dist"

View File

@ -33,6 +33,11 @@ impl Comment {
self self
} }
pub fn parent_comment_id(mut self, id: usize) -> Comment {
self.0 = self.0.parent_comment_id(id);
self
}
pub fn id(&self) -> usize { pub fn id(&self) -> usize {
self.0.id self.0.id
} }

View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "esNext",
"moduleResolution": "node",
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noEmitOnError": true,
"strictNullChecks": true,
"target": "es6",
"sourceMap": true,
"esModuleInterop": true,
"outDir": "dist/web",
"declaration": true
},
"include": ["js"]
}

View File

@ -1,5 +1,5 @@
const path = require("path"); const path = require("path");
const merge = require("webpack-merge"); const { merge } = require("webpack-merge");
const common = require("./webpack.common.js"); const common = require("./webpack.common.js");
const HtmlWebpackPlugin = require("html-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin");
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin"); const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");

View File

@ -7,6 +7,11 @@
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==
"@types/file-saver@^2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@types/file-saver/-/file-saver-2.0.1.tgz#e18eb8b069e442f7b956d313f4fadd3ef887354e"
integrity sha512-g1QUuhYVVAamfCifK7oB7G3aIl4BbOyzDOqVyUfEr4tfBKrXfeH+M+Tg7HKCXSrbzxYdhyCP7z9WbKo0R2hBCw==
"@types/glob@^7.1.1": "@types/glob@^7.1.1":
version "7.1.1" version "7.1.1"
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575"
@ -718,6 +723,15 @@ cliui@^5.0.0:
strip-ansi "^5.2.0" strip-ansi "^5.2.0"
wrap-ansi "^5.1.0" wrap-ansi "^5.1.0"
clone-deep@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387"
integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==
dependencies:
is-plain-object "^2.0.4"
kind-of "^6.0.2"
shallow-clone "^3.0.0"
code-point-at@^1.0.0: code-point-at@^1.0.0:
version "1.1.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
@ -1506,6 +1520,11 @@ figgy-pudding@^3.5.1:
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790"
integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w== integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==
file-saver@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/file-saver/-/file-saver-2.0.2.tgz#06d6e728a9ea2df2cce2f8d9e84dfcdc338ec17a"
integrity sha512-Wz3c3XQ5xroCxd1G8b7yL0Ehkf0TC9oYC6buPFkNnU9EnaPlifeAFCyCh+iewXTyFRcg0a6j3J7FmJsIhlhBdw==
fill-range@^4.0.0: fill-range@^4.0.0:
version "4.0.0" version "4.0.0"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
@ -3709,6 +3728,13 @@ sha.js@^2.4.0, sha.js@^2.4.8:
inherits "^2.0.1" inherits "^2.0.1"
safe-buffer "^5.0.1" safe-buffer "^5.0.1"
shallow-clone@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3"
integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==
dependencies:
kind-of "^6.0.2"
shebang-command@^1.2.0: shebang-command@^1.2.0:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
@ -4455,6 +4481,14 @@ webpack-log@^2.0.0:
ansi-colors "^3.0.0" ansi-colors "^3.0.0"
uuid "^3.3.2" uuid "^3.3.2"
webpack-merge@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.1.1.tgz#c79f36b4ad39a597c3bb780f809b514d65d85d01"
integrity sha512-UhIkHAVqeG9EqFfYo7dRELrVfH6HYaOTYM7ssKCwfIIHYnWepGVOFp1E166GwgPGFqV6M68UgRiKOERjVOKIXA==
dependencies:
clone-deep "^4.0.1"
wildcard "^2.0.0"
webpack-sources@^1.4.0, webpack-sources@^1.4.1: webpack-sources@^1.4.0, webpack-sources@^1.4.1:
version "1.4.3" version "1.4.3"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933"
@ -4525,6 +4559,11 @@ wide-align@^1.1.0:
dependencies: dependencies:
string-width "^1.0.2 || 2" string-width "^1.0.2 || 2"
wildcard@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec"
integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==
worker-farm@^1.7.0: worker-farm@^1.7.0:
version "1.7.0" version "1.7.0"
resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8"

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/><Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/><Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/><Override PartName="/word/webSettings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml"/><Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"/><Override PartName="/word/commentsExtended.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml"/><Override PartName="/word/commentsIds.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml"/><Override PartName="/word/commentsExtensible.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml"/><Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/><Override PartName="/word/people.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.people+xml"/><Override PartName="/word/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
</Relationships>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"
xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">
<Template>Normal.dotm</Template>
<TotalTime>1</TotalTime>
<Pages>1</Pages>
<Words>1</Words>
<Characters>7</Characters>
<Application>Microsoft Office Word</Application>
<DocSecurity>0</DocSecurity>
<Lines>1</Lines>
<Paragraphs>1</Paragraphs>
<ScaleCrop>false</ScaleCrop>
<Company></Company>
<LinksUpToDate>false</LinksUpToDate>
<CharactersWithSpaces>7</CharactersWithSpaces>
<SharedDoc>false</SharedDoc>
<HyperlinksChanged>false</HyperlinksChanged>
<AppVersion>16.0000</AppVersion>
</Properties>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:dcmitype="http://purl.org/dc/dcmitype/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<dc:title></dc:title>
<dc:subject></dc:subject>
<dc:creator>bokuweb</dc:creator>
<cp:keywords></cp:keywords>
<dc:description></dc:description>
<cp:lastModifiedBy>bokuweb</cp:lastModifiedBy>
<cp:revision>1</cp:revision>
<dcterms:created xsi:type="dcterms:W3CDTF">2020-08-13T08:38:00Z</dcterms:created>
<dcterms:modified xsi:type="dcterms:W3CDTF">2020-08-13T08:39:00Z</dcterms:modified>
</cp:coreProperties>

Binary file not shown.

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId8" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" Target="fontTable.xml"/><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" Target="webSettings.xml"/><Relationship Id="rId7" Type="http://schemas.microsoft.com/office/2018/08/relationships/commentsExtensible" Target="commentsExtensible.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" Target="settings.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId6" Type="http://schemas.microsoft.com/office/2016/09/relationships/commentsIds" Target="commentsIds.xml"/><Relationship Id="rId5" Type="http://schemas.microsoft.com/office/2011/relationships/commentsExtended" Target="commentsExtended.xml"/><Relationship Id="rId10" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" Target="comments.xml"/><Relationship Id="rId9" Type="http://schemas.microsoft.com/office/2011/relationships/people" Target="people.xml"/></Relationships>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:comments xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"
xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex"
xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex"
xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex"
xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex"
xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex"
xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex"
xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex"
xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex"
xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink"
xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"
xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"
xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml"
xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex"
xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid"
xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml"
xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex"
xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk"
xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"
xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex wp14">
<w:comment w:id="0" w:author="bokuweb" w:date="2020-08-13T17:39:00Z" w:initials="bokuweb">
<w:p w14:paraId="57D1BD7C" w14:textId="77777777" w:rsidR="00EB01C9" w:rsidRDefault="00EB01C9">
<w:pPr>
<w:pStyle w:val="a4"/>
</w:pPr>
<w:r>
<w:rPr>
<w:rStyle w:val="a3"/>
</w:rPr>
<w:annotationRef/>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:t>H</w:t>
</w:r>
<w:r>
<w:t>ello</w:t>
</w:r>
</w:p>
</w:comment>
<w:comment w:id="1" w:author="bokuweb" w:date="2020-08-13T17:39:00Z" w:initials="bokuweb">
<w:p w14:paraId="1" w14:textId="77777777" w:rsidR="00EB01C9" w:rsidRDefault="00EB01C9">
<w:pPr>
<w:pStyle w:val="a4"/>
</w:pPr>
<w:r>
<w:rPr>
<w:rStyle w:val="a3"/>
</w:rPr>
<w:annotationRef/>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:t>W</w:t>
</w:r>
<w:r>
<w:t>orld</w:t>
</w:r>
</w:p>
</w:comment>
</w:comments>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w15:commentsEx xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"
xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex"
xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex"
xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex"
xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex"
xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex"
xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex"
xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex"
xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex"
xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink"
xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"
xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"
xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml"
xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex"
xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid"
xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml"
xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex"
xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk"
xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"
xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex wp14">
<w15:commentEx w15:paraId="57D1BD7C" w15:done="0"/>
<w15:commentEx w15:paraId="1" w15:paraIdParent="57D1BD7C" w15:done="0"/>
</w15:commentsEx>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w16cex:commentsExtensible xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"
xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex"
xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex"
xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex"
xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex"
xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex"
xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex"
xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex"
xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex"
xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink"
xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"
xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"
xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml"
xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex"
xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid"
xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml"
xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex"
xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk"
xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"
xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex wp14">
<w16cex:commentExtensible w16cex:durableId="22DFF939" w16cex:dateUtc="2020-08-13T08:39:00Z"/>
<w16cex:commentExtensible w16cex:durableId="22DFF957" w16cex:dateUtc="2020-08-13T08:39:00Z"/>
</w16cex:commentsExtensible>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w16cid:commentsIds xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"
xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex"
xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex"
xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex"
xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex"
xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex"
xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex"
xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex"
xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex"
xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink"
xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"
xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"
xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml"
xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex"
xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid"
xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml"
xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex"
xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk"
xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"
xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex wp14">
<w16cid:commentId w16cid:paraId="57D1BD7C" w16cid:durableId="22DFF939"/>
<w16cid:commentId w16cid:paraId="245F308A" w16cid:durableId="22DFF957"/>
</w16cid:commentsIds>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex wp14"><w:body><w:p w14:paraId="298B3D47" w14:textId="77777777" w:rsidR="006A55A7" w:rsidRDefault="00EB01C9"><w:pPr><w:rPr><w:rFonts w:hint="eastAsia"/></w:rPr></w:pPr><w:commentRangeStart w:id="0"/><w:commentRangeStart w:id="1"/><w:r><w:rPr><w:rFonts w:hint="eastAsia"/></w:rPr><w:t>H</w:t></w:r><w:r><w:t>ello</w:t></w:r><w:commentRangeEnd w:id="0"/><w:r><w:rPr><w:rStyle w:val="a3"/></w:rPr><w:commentReference w:id="0"/></w:r><w:commentRangeEnd w:id="1"/><w:r><w:rPr><w:rStyle w:val="a3"/></w:rPr><w:commentReference w:id="1"/></w:r></w:p><w:sectPr w:rsidR="006A55A7" w:rsidSect="00733037"><w:pgSz w:w="11900" w:h="16840"/><w:pgMar w:top="1985" w:right="1701" w:bottom="1701" w:left="1701" w:header="851" w:footer="992" w:gutter="0"/><w:cols w:space="425"/><w:docGrid w:type="lines" w:linePitch="360"/></w:sectPr></w:body></w:document>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:fonts xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex"><w:font w:name="游明朝"><w:panose1 w:val="02020400000000000000"/><w:charset w:val="80"/><w:family w:val="roman"/><w:pitch w:val="variable"/><w:sig w:usb0="800002E7" w:usb1="2AC7FCFF" w:usb2="00000012" w:usb3="00000000" w:csb0="0002009F" w:csb1="00000000"/></w:font><w:font w:name="Times New Roman"><w:panose1 w:val="02020603050405020304"/><w:charset w:val="00"/><w:family w:val="roman"/><w:pitch w:val="variable"/><w:sig w:usb0="E0002EFF" w:usb1="C000785B" w:usb2="00000009" w:usb3="00000000" w:csb0="000001FF" w:csb1="00000000"/></w:font><w:font w:name=" 明朝"><w:altName w:val="MS Mincho"/><w:panose1 w:val="02020609040205080304"/><w:charset w:val="80"/><w:family w:val="modern"/><w:pitch w:val="fixed"/><w:sig w:usb0="E00002FF" w:usb1="6AC7FDFB" w:usb2="08000012" w:usb3="00000000" w:csb0="0002009F" w:csb1="00000000"/></w:font><w:font w:name="游ゴシック Light"><w:panose1 w:val="020B0300000000000000"/><w:charset w:val="80"/><w:family w:val="swiss"/><w:pitch w:val="variable"/><w:sig w:usb0="E00002FF" w:usb1="2AC7FDFF" w:usb2="00000016" w:usb3="00000000" w:csb0="0002009F" w:csb1="00000000"/></w:font></w:fonts>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w15:people xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex wp14"><w15:person w15:author="植木智之"><w15:presenceInfo w15:providerId="AD" w15:userId="S::s.ueki@j-legalsystem.com::066659c7-926a-42c1-86b7-e849e2349e43"/></w15:person></w15:people>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:settings xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:sl="http://schemas.openxmlformats.org/schemaLibrary/2006/main" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex"><w:zoom w:percent="100"/><w:bordersDoNotSurroundHeader/><w:bordersDoNotSurroundFooter/><w:proofState w:grammar="clean"/><w:defaultTabStop w:val="840"/><w:displayHorizontalDrawingGridEvery w:val="0"/><w:displayVerticalDrawingGridEvery w:val="2"/><w:characterSpacingControl w:val="compressPunctuation"/><w:compat><w:spaceForUL/><w:balanceSingleByteDoubleByteWidth/><w:doNotLeaveBackslashAlone/><w:ulTrailSpace/><w:doNotExpandShiftReturn/><w:adjustLineHeightInTable/><w:useFELayout/><w:compatSetting w:name="compatibilityMode" w:uri="http://schemas.microsoft.com/office/word" w:val="15"/><w:compatSetting w:name="overrideTableStyleFontSizeAndJustification" w:uri="http://schemas.microsoft.com/office/word" w:val="1"/><w:compatSetting w:name="enableOpenTypeFeatures" w:uri="http://schemas.microsoft.com/office/word" w:val="1"/><w:compatSetting w:name="doNotFlipMirrorIndents" w:uri="http://schemas.microsoft.com/office/word" w:val="1"/><w:compatSetting w:name="differentiateMultirowTableHeaders" w:uri="http://schemas.microsoft.com/office/word" w:val="1"/><w:compatSetting w:name="useWord2013TrackBottomHyphenation" w:uri="http://schemas.microsoft.com/office/word" w:val="0"/></w:compat><w:rsids><w:rsidRoot w:val="00EB01C9"/><w:rsid w:val="00723E87"/><w:rsid w:val="00733037"/><w:rsid w:val="00EB01C9"/></w:rsids><m:mathPr><m:mathFont m:val="Cambria Math"/><m:brkBin m:val="before"/><m:brkBinSub m:val="--"/><m:smallFrac m:val="0"/><m:dispDef/><m:lMargin m:val="0"/><m:rMargin m:val="0"/><m:defJc m:val="centerGroup"/><m:wrapIndent m:val="1440"/><m:intLim m:val="subSup"/><m:naryLim m:val="undOvr"/></m:mathPr><w:themeFontLang w:val="en-US" w:eastAsia="ja-JP"/><w:clrSchemeMapping w:bg1="light1" w:t1="dark1" w:bg2="light2" w:t2="dark2" w:accent1="accent1" w:accent2="accent2" w:accent3="accent3" w:accent4="accent4" w:accent5="accent5" w:accent6="accent6" w:hyperlink="hyperlink" w:followedHyperlink="followedHyperlink"/><w:decimalSymbol w:val="."/><w:listSeparator w:val=","/><w14:docId w14:val="26329629"/><w15:chartTrackingRefBased/><w15:docId w15:val="{12AE9574-6206-9C46-ACD5-3687B20B4F92}"/></w:settings>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,293 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office テーマ">
<a:themeElements>
<a:clrScheme name="Office">
<a:dk1>
<a:sysClr val="windowText" lastClr="000000"/>
</a:dk1>
<a:lt1>
<a:sysClr val="window" lastClr="FFFFFF"/>
</a:lt1>
<a:dk2>
<a:srgbClr val="44546A"/>
</a:dk2>
<a:lt2>
<a:srgbClr val="E7E6E6"/>
</a:lt2>
<a:accent1>
<a:srgbClr val="4472C4"/>
</a:accent1>
<a:accent2>
<a:srgbClr val="ED7D31"/>
</a:accent2>
<a:accent3>
<a:srgbClr val="A5A5A5"/>
</a:accent3>
<a:accent4>
<a:srgbClr val="FFC000"/>
</a:accent4>
<a:accent5>
<a:srgbClr val="5B9BD5"/>
</a:accent5>
<a:accent6>
<a:srgbClr val="70AD47"/>
</a:accent6>
<a:hlink>
<a:srgbClr val="0563C1"/>
</a:hlink>
<a:folHlink>
<a:srgbClr val="954F72"/>
</a:folHlink>
</a:clrScheme>
<a:fontScheme name="Office">
<a:majorFont>
<a:latin typeface="游ゴシック Light" panose="020F0302020204030204"/>
<a:ea typeface=""/>
<a:cs typeface=""/>
<a:font script="Jpan" typeface="游ゴシック Light"/>
<a:font script="Hang" typeface="맑은 고딕"/>
<a:font script="Hans" typeface="等线 Light"/>
<a:font script="Hant" typeface="新細明體"/>
<a:font script="Arab" typeface="Times New Roman"/>
<a:font script="Hebr" typeface="Times New Roman"/>
<a:font script="Thai" typeface="Angsana New"/>
<a:font script="Ethi" typeface="Nyala"/>
<a:font script="Beng" typeface="Vrinda"/>
<a:font script="Gujr" typeface="Shruti"/>
<a:font script="Khmr" typeface="MoolBoran"/>
<a:font script="Knda" typeface="Tunga"/>
<a:font script="Guru" typeface="Raavi"/>
<a:font script="Cans" typeface="Euphemia"/>
<a:font script="Cher" typeface="Plantagenet Cherokee"/>
<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>
<a:font script="Tibt" typeface="Microsoft Himalaya"/>
<a:font script="Thaa" typeface="MV Boli"/>
<a:font script="Deva" typeface="Mangal"/>
<a:font script="Telu" typeface="Gautami"/>
<a:font script="Taml" typeface="Latha"/>
<a:font script="Syrc" typeface="Estrangelo Edessa"/>
<a:font script="Orya" typeface="Kalinga"/>
<a:font script="Mlym" typeface="Kartika"/>
<a:font script="Laoo" typeface="DokChampa"/>
<a:font script="Sinh" typeface="Iskoola Pota"/>
<a:font script="Mong" typeface="Mongolian Baiti"/>
<a:font script="Viet" typeface="Times New Roman"/>
<a:font script="Uigh" typeface="Microsoft Uighur"/>
<a:font script="Geor" typeface="Sylfaen"/>
<a:font script="Armn" typeface="Arial"/>
<a:font script="Bugi" typeface="Leelawadee UI"/>
<a:font script="Bopo" typeface="Microsoft JhengHei"/>
<a:font script="Java" typeface="Javanese Text"/>
<a:font script="Lisu" typeface="Segoe UI"/>
<a:font script="Mymr" typeface="Myanmar Text"/>
<a:font script="Nkoo" typeface="Ebrima"/>
<a:font script="Olck" typeface="Nirmala UI"/>
<a:font script="Osma" typeface="Ebrima"/>
<a:font script="Phag" typeface="Phagspa"/>
<a:font script="Syrn" typeface="Estrangelo Edessa"/>
<a:font script="Syrj" typeface="Estrangelo Edessa"/>
<a:font script="Syre" typeface="Estrangelo Edessa"/>
<a:font script="Sora" typeface="Nirmala UI"/>
<a:font script="Tale" typeface="Microsoft Tai Le"/>
<a:font script="Talu" typeface="Microsoft New Tai Lue"/>
<a:font script="Tfng" typeface="Ebrima"/>
</a:majorFont>
<a:minorFont>
<a:latin typeface="游明朝" panose="020F0502020204030204"/>
<a:ea typeface=""/>
<a:cs typeface=""/>
<a:font script="Jpan" typeface="游明朝"/>
<a:font script="Hang" typeface="맑은 고딕"/>
<a:font script="Hans" typeface="等线"/>
<a:font script="Hant" typeface="新細明體"/>
<a:font script="Arab" typeface="Arial"/>
<a:font script="Hebr" typeface="Arial"/>
<a:font script="Thai" typeface="Cordia New"/>
<a:font script="Ethi" typeface="Nyala"/>
<a:font script="Beng" typeface="Vrinda"/>
<a:font script="Gujr" typeface="Shruti"/>
<a:font script="Khmr" typeface="DaunPenh"/>
<a:font script="Knda" typeface="Tunga"/>
<a:font script="Guru" typeface="Raavi"/>
<a:font script="Cans" typeface="Euphemia"/>
<a:font script="Cher" typeface="Plantagenet Cherokee"/>
<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>
<a:font script="Tibt" typeface="Microsoft Himalaya"/>
<a:font script="Thaa" typeface="MV Boli"/>
<a:font script="Deva" typeface="Mangal"/>
<a:font script="Telu" typeface="Gautami"/>
<a:font script="Taml" typeface="Latha"/>
<a:font script="Syrc" typeface="Estrangelo Edessa"/>
<a:font script="Orya" typeface="Kalinga"/>
<a:font script="Mlym" typeface="Kartika"/>
<a:font script="Laoo" typeface="DokChampa"/>
<a:font script="Sinh" typeface="Iskoola Pota"/>
<a:font script="Mong" typeface="Mongolian Baiti"/>
<a:font script="Viet" typeface="Arial"/>
<a:font script="Uigh" typeface="Microsoft Uighur"/>
<a:font script="Geor" typeface="Sylfaen"/>
<a:font script="Armn" typeface="Arial"/>
<a:font script="Bugi" typeface="Leelawadee UI"/>
<a:font script="Bopo" typeface="Microsoft JhengHei"/>
<a:font script="Java" typeface="Javanese Text"/>
<a:font script="Lisu" typeface="Segoe UI"/>
<a:font script="Mymr" typeface="Myanmar Text"/>
<a:font script="Nkoo" typeface="Ebrima"/>
<a:font script="Olck" typeface="Nirmala UI"/>
<a:font script="Osma" typeface="Ebrima"/>
<a:font script="Phag" typeface="Phagspa"/>
<a:font script="Syrn" typeface="Estrangelo Edessa"/>
<a:font script="Syrj" typeface="Estrangelo Edessa"/>
<a:font script="Syre" typeface="Estrangelo Edessa"/>
<a:font script="Sora" typeface="Nirmala UI"/>
<a:font script="Tale" typeface="Microsoft Tai Le"/>
<a:font script="Talu" typeface="Microsoft New Tai Lue"/>
<a:font script="Tfng" typeface="Ebrima"/>
</a:minorFont>
</a:fontScheme>
<a:fmtScheme name="Office">
<a:fillStyleLst>
<a:solidFill>
<a:schemeClr val="phClr"/>
</a:solidFill>
<a:gradFill rotWithShape="1">
<a:gsLst>
<a:gs pos="0">
<a:schemeClr val="phClr">
<a:lumMod val="110000"/>
<a:satMod val="105000"/>
<a:tint val="67000"/>
</a:schemeClr>
</a:gs>
<a:gs pos="50000">
<a:schemeClr val="phClr">
<a:lumMod val="105000"/>
<a:satMod val="103000"/>
<a:tint val="73000"/>
</a:schemeClr>
</a:gs>
<a:gs pos="100000">
<a:schemeClr val="phClr">
<a:lumMod val="105000"/>
<a:satMod val="109000"/>
<a:tint val="81000"/>
</a:schemeClr>
</a:gs>
</a:gsLst>
<a:lin ang="5400000" scaled="0"/>
</a:gradFill>
<a:gradFill rotWithShape="1">
<a:gsLst>
<a:gs pos="0">
<a:schemeClr val="phClr">
<a:satMod val="103000"/>
<a:lumMod val="102000"/>
<a:tint val="94000"/>
</a:schemeClr>
</a:gs>
<a:gs pos="50000">
<a:schemeClr val="phClr">
<a:satMod val="110000"/>
<a:lumMod val="100000"/>
<a:shade val="100000"/>
</a:schemeClr>
</a:gs>
<a:gs pos="100000">
<a:schemeClr val="phClr">
<a:lumMod val="99000"/>
<a:satMod val="120000"/>
<a:shade val="78000"/>
</a:schemeClr>
</a:gs>
</a:gsLst>
<a:lin ang="5400000" scaled="0"/>
</a:gradFill>
</a:fillStyleLst>
<a:lnStyleLst>
<a:ln w="6350" cap="flat" cmpd="sng" algn="ctr">
<a:solidFill>
<a:schemeClr val="phClr"/>
</a:solidFill>
<a:prstDash val="solid"/>
<a:miter lim="800000"/>
</a:ln>
<a:ln w="12700" cap="flat" cmpd="sng" algn="ctr">
<a:solidFill>
<a:schemeClr val="phClr"/>
</a:solidFill>
<a:prstDash val="solid"/>
<a:miter lim="800000"/>
</a:ln>
<a:ln w="19050" cap="flat" cmpd="sng" algn="ctr">
<a:solidFill>
<a:schemeClr val="phClr"/>
</a:solidFill>
<a:prstDash val="solid"/>
<a:miter lim="800000"/>
</a:ln>
</a:lnStyleLst>
<a:effectStyleLst>
<a:effectStyle>
<a:effectLst/>
</a:effectStyle>
<a:effectStyle>
<a:effectLst/>
</a:effectStyle>
<a:effectStyle>
<a:effectLst>
<a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0">
<a:srgbClr val="000000">
<a:alpha val="63000"/>
</a:srgbClr>
</a:outerShdw>
</a:effectLst>
</a:effectStyle>
</a:effectStyleLst>
<a:bgFillStyleLst>
<a:solidFill>
<a:schemeClr val="phClr"/>
</a:solidFill>
<a:solidFill>
<a:schemeClr val="phClr">
<a:tint val="95000"/>
<a:satMod val="170000"/>
</a:schemeClr>
</a:solidFill>
<a:gradFill rotWithShape="1">
<a:gsLst>
<a:gs pos="0">
<a:schemeClr val="phClr">
<a:tint val="93000"/>
<a:satMod val="150000"/>
<a:shade val="98000"/>
<a:lumMod val="102000"/>
</a:schemeClr>
</a:gs>
<a:gs pos="50000">
<a:schemeClr val="phClr">
<a:tint val="98000"/>
<a:satMod val="130000"/>
<a:shade val="90000"/>
<a:lumMod val="103000"/>
</a:schemeClr>
</a:gs>
<a:gs pos="100000">
<a:schemeClr val="phClr">
<a:shade val="63000"/>
<a:satMod val="120000"/>
</a:schemeClr>
</a:gs>
</a:gsLst>
<a:lin ang="5400000" scaled="0"/>
</a:gradFill>
</a:bgFillStyleLst>
</a:fmtScheme>
</a:themeElements>
<a:objectDefaults/>
<a:extraClrSchemeLst/>
<a:extLst>
<a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}">
<thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{62F939B6-93AF-4DB8-9C6B-D6C7DFDC589F}" vid="{4A3C46E8-61CC-4603-A589-7422A47A8E4A}"/>
</a:ext>
</a:extLst>
</a:theme>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:webSettings xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex"><w:optimizeForBrowser/><w:allowPNG/></w:webSettings>

View File

@ -1,5 +1,5 @@
test: test:
cargo test cargo test -- --test-threads=1
lint: lint:
cargo clippy --all-targets --all-features -- -D warnings cargo clippy --all-targets --all-features -- -D warnings