From 3d6f36ef88cbeb8ac17c0cb4aa318246a2394258 Mon Sep 17 00:00:00 2001 From: bokuweb Date: Fri, 24 Jan 2020 19:44:43 +0900 Subject: [PATCH] Rename (#27) * rename * fix: readme * fix: README --- Cargo.lock | 8 ++-- README.md | 23 ++++++++---- docx-core/Cargo.toml | 20 ++++++++-- docx-core/examples/alignment.rs | 2 +- docx-core/examples/comment.rs | 2 +- docx-core/examples/hello.rs | 2 +- docx-core/examples/history.rs | 2 +- docx-core/examples/indent.rs | 2 +- docx-core/examples/numbering.rs | 3 +- docx-core/examples/table.rs | 2 +- docx-core/tests/lib.rs | 4 +- docx-wasm/Cargo.toml | 4 +- docx-wasm/src/adaptors/special_indent.rs | 14 +++---- docx-wasm/src/comment.rs | 8 ++-- docx-wasm/src/delete.rs | 8 ++-- docx-wasm/src/{docx.rs => doc.rs} | 6 +-- docx-wasm/src/insert.rs | 8 ++-- docx-wasm/src/level.rs | 18 ++++----- docx-wasm/src/lib.rs | 5 +-- docx-wasm/src/numbering.rs | 8 ++-- docx-wasm/src/paragraph.rs | 48 +++++++++++------------- docx-wasm/src/run.rs | 23 ++++-------- docx-wasm/src/table.rs | 10 ++--- docx-wasm/src/table_cell.rs | 14 +++---- docx-wasm/src/table_row.rs | 8 ++-- 25 files changed, 129 insertions(+), 123 deletions(-) rename docx-wasm/src/{docx.rs => doc.rs} (91%) diff --git a/Cargo.lock b/Cargo.lock index 1e320f6..997342b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -75,8 +75,8 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "docx-core" -version = "0.1.0" +name = "docx-rs" +version = "0.2.0" dependencies = [ "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -86,10 +86,10 @@ dependencies = [ ] [[package]] -name = "docx-rs" +name = "docx-wasm" version = "0.1.0" dependencies = [ - "docx-core 0.1.0", + "docx-rs 0.2.0", "wasm-bindgen 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-test 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/README.md b/README.md index 8f50537..14a2a5d 100644 --- a/README.md +++ b/README.md @@ -8,19 +8,26 @@ [![GitHub Actions Status](https://github.com/bokuweb/docx-rs/workflows/Continuous%20Integration/badge.svg)](https://github.com/bokuweb/docx-rs/actions) +## install + +``` +[dependencies] +docx-rs = "0.2.0" +``` + ## Example ```rust -use docx_core::*; +use docx_rs::*; pub fn hello() -> Result<(), DocxError> { - let path = std::path::Path::new("./hello.docx"); - let file = std::fs::File::create(&path).unwrap(); - Docx::new() - .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))) - .build() - .pack(file)?; - Ok(()) + let path = std::path::Path::new("./hello.docx"); + let file = std::fs::File::create(&path).unwrap(); + Docx::new() + .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))) + .build() + .pack(file)?; + Ok(()) } ``` diff --git a/docx-core/Cargo.toml b/docx-core/Cargo.toml index 7a003fa..ad80998 100644 --- a/docx-core/Cargo.toml +++ b/docx-core/Cargo.toml @@ -1,8 +1,21 @@ [package] -name = "docx-core" -version = "0.1.0" +name = "docx-rs" +version = "0.2.0" authors = ["bokuweb "] +repository = "https://github.com/bokuweb/docx-rs" edition = "2018" +license = "MIT" +readme = "../README.md" +description = "A .docx file generater with Rust/WebAssembly." +keywords = [ + "office", + "word", + "docx", +] + +[lib] +name = "docx_rs" +path = "src/lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -13,4 +26,5 @@ thiserror = "1.0" zip = { version = "0.5", default-features = false } [dev-dependencies] -pretty_assertions = "*" \ No newline at end of file +pretty_assertions = "0.6.1" + diff --git a/docx-core/examples/alignment.rs b/docx-core/examples/alignment.rs index 525590d..ddc62db 100644 --- a/docx-core/examples/alignment.rs +++ b/docx-core/examples/alignment.rs @@ -1,4 +1,4 @@ -use docx_core::*; +use docx_rs::*; pub fn main() -> Result<(), DocxError> { let path = std::path::Path::new("./alignment.docx"); diff --git a/docx-core/examples/comment.rs b/docx-core/examples/comment.rs index 1869a61..c2450f0 100644 --- a/docx-core/examples/comment.rs +++ b/docx-core/examples/comment.rs @@ -1,4 +1,4 @@ -use docx_core::*; +use docx_rs::*; pub fn main() -> Result<(), DocxError> { let path = std::path::Path::new("./comment.docx"); diff --git a/docx-core/examples/hello.rs b/docx-core/examples/hello.rs index 4d682a8..6e63082 100644 --- a/docx-core/examples/hello.rs +++ b/docx-core/examples/hello.rs @@ -1,4 +1,4 @@ -use docx_core::*; +use docx_rs::*; pub fn main() -> Result<(), DocxError> { let path = std::path::Path::new("./output/hello.docx"); diff --git a/docx-core/examples/history.rs b/docx-core/examples/history.rs index b3e497b..0758acb 100644 --- a/docx-core/examples/history.rs +++ b/docx-core/examples/history.rs @@ -1,4 +1,4 @@ -use docx_core::*; +use docx_rs::*; pub fn main() -> Result<(), DocxError> { let path = std::path::Path::new("./history.docx"); diff --git a/docx-core/examples/indent.rs b/docx-core/examples/indent.rs index 7d9cd4b..f09d0a2 100644 --- a/docx-core/examples/indent.rs +++ b/docx-core/examples/indent.rs @@ -1,4 +1,4 @@ -use docx_core::*; +use docx_rs::*; pub const DUMMY: &str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."; diff --git a/docx-core/examples/numbering.rs b/docx-core/examples/numbering.rs index d84cc3c..1d11356 100644 --- a/docx-core/examples/numbering.rs +++ b/docx-core/examples/numbering.rs @@ -1,4 +1,5 @@ -use docx_core::*; +use docx_rs::*; + pub fn main() -> Result<(), DocxError> { let path = std::path::Path::new("./numbering.docx"); diff --git a/docx-core/examples/table.rs b/docx-core/examples/table.rs index ca9f1bd..6755f07 100644 --- a/docx-core/examples/table.rs +++ b/docx-core/examples/table.rs @@ -1,4 +1,4 @@ -use docx_core::*; +use docx_rs::*; pub fn main() -> Result<(), DocxError> { let path = std::path::Path::new("./table.docx"); diff --git a/docx-core/tests/lib.rs b/docx-core/tests/lib.rs index 8fb6f1a..1b3cd3d 100644 --- a/docx-core/tests/lib.rs +++ b/docx-core/tests/lib.rs @@ -1,6 +1,6 @@ -extern crate docx_core; +extern crate docx_rs; -use docx_core::*; +use docx_rs::*; pub const DUMMY: &str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."; diff --git a/docx-wasm/Cargo.toml b/docx-wasm/Cargo.toml index e555f32..bf1c4db 100644 --- a/docx-wasm/Cargo.toml +++ b/docx-wasm/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "docx-rs" +name = "docx-wasm" version = "0.1.0" authors = ["bokuweb "] edition = "2018" @@ -11,7 +11,7 @@ crate-type = ["cdylib"] [dependencies] wasm-bindgen = "0.2.50" -docx-core = { path = "../docx-core" } +docx-rs= { path = "../docx-core" } [dev-dependencies] wasm-bindgen-test = "0.2" \ No newline at end of file diff --git a/docx-wasm/src/adaptors/special_indent.rs b/docx-wasm/src/adaptors/special_indent.rs index 415a346..2ab79bf 100644 --- a/docx-wasm/src/adaptors/special_indent.rs +++ b/docx-wasm/src/adaptors/special_indent.rs @@ -1,18 +1,14 @@ -use docx_core; +use docx_rs; pub fn create_special_indent( - special_indent_kind: Option, + special_indent_kind: Option, special_indent_size: Option, -) -> Option { +) -> Option { if let Some(kind) = special_indent_kind { let size = special_indent_size.unwrap_or_else(|| 0); match kind { - docx_core::SpecialIndentKind::FirstLine => { - Some(docx_core::SpecialIndentType::FirstLine(size)) - } - docx_core::SpecialIndentKind::Hanging => { - Some(docx_core::SpecialIndentType::Hanging(size)) - } + docx_rs::SpecialIndentKind::FirstLine => Some(docx_rs::SpecialIndentType::FirstLine(size)), + docx_rs::SpecialIndentKind::Hanging => Some(docx_rs::SpecialIndentType::Hanging(size)), } } else { None diff --git a/docx-wasm/src/comment.rs b/docx-wasm/src/comment.rs index 476ee59..26deb30 100644 --- a/docx-wasm/src/comment.rs +++ b/docx-wasm/src/comment.rs @@ -1,18 +1,18 @@ use super::*; -use docx_core; +use docx_rs; use wasm_bindgen::prelude::*; #[wasm_bindgen] #[derive(Debug)] -pub struct Comment(docx_core::Comment); +pub struct Comment(docx_rs::Comment); #[wasm_bindgen(js_name = createComment)] pub fn create_comment(id: usize) -> Comment { - Comment(docx_core::Comment::new(id)) + Comment(docx_rs::Comment::new(id)) } impl Comment { - pub fn take(self) -> docx_core::Comment { + pub fn take(self) -> docx_rs::Comment { self.0 } } diff --git a/docx-wasm/src/delete.rs b/docx-wasm/src/delete.rs index 2b36e29..9f9e167 100644 --- a/docx-wasm/src/delete.rs +++ b/docx-wasm/src/delete.rs @@ -1,18 +1,18 @@ use super::*; -use docx_core; +use docx_rs; use wasm_bindgen::prelude::*; #[wasm_bindgen] #[derive(Debug)] -pub struct Delete(docx_core::Delete); +pub struct Delete(docx_rs::Delete); #[wasm_bindgen(js_name = createDelete)] pub fn create_delete(run: Run) -> Delete { - Delete(docx_core::Delete::new(run.take())) + Delete(docx_rs::Delete::new(run.take())) } impl Delete { - pub fn take(self) -> docx_core::Delete { + pub fn take(self) -> docx_rs::Delete { self.0 } } diff --git a/docx-wasm/src/docx.rs b/docx-wasm/src/doc.rs similarity index 91% rename from docx-wasm/src/docx.rs rename to docx-wasm/src/doc.rs index cd00018..9e194f6 100644 --- a/docx-wasm/src/docx.rs +++ b/docx-wasm/src/doc.rs @@ -1,15 +1,15 @@ use super::*; -use docx_core; +use docx_rs; use wasm_bindgen::prelude::*; #[wasm_bindgen] #[derive(Debug)] -pub struct Docx(docx_core::Docx); +pub struct Docx(docx_rs::Docx); #[wasm_bindgen] #[allow(non_snake_case)] pub fn createDocx() -> Docx { - Docx(docx_core::Docx::new()) + Docx(docx_rs::Docx::new()) } #[wasm_bindgen] diff --git a/docx-wasm/src/insert.rs b/docx-wasm/src/insert.rs index f18ee18..c79198e 100644 --- a/docx-wasm/src/insert.rs +++ b/docx-wasm/src/insert.rs @@ -1,18 +1,18 @@ use super::*; -use docx_core; +use docx_rs; use wasm_bindgen::prelude::*; #[wasm_bindgen] #[derive(Debug)] -pub struct Insert(docx_core::Insert); +pub struct Insert(docx_rs::Insert); #[wasm_bindgen(js_name = createInsert)] pub fn create_insert(run: Run) -> Insert { - Insert(docx_core::Insert::new(run.take())) + Insert(docx_rs::Insert::new(run.take())) } impl Insert { - pub fn take(self) -> docx_core::Insert { + pub fn take(self) -> docx_rs::Insert { self.0 } } diff --git a/docx-wasm/src/level.rs b/docx-wasm/src/level.rs index 82cfca5..e928368 100644 --- a/docx-wasm/src/level.rs +++ b/docx-wasm/src/level.rs @@ -1,22 +1,22 @@ use super::*; -use docx_core; +use docx_rs; use wasm_bindgen::prelude::*; #[wasm_bindgen] #[derive(Debug)] -pub struct Level(docx_core::Level); +pub struct Level(docx_rs::Level); #[wasm_bindgen(js_name = createLevel)] pub fn create_level(id: usize, start: usize, format: &str, text: &str, jc: &str) -> Level { - let start = docx_core::Start::new(start); - let format = docx_core::NumberFormat::new(format); - let text = docx_core::LevelText::new(text); - let jc = docx_core::LevelJc::new(jc); - Level(docx_core::Level::new(id, start, format, text, jc)) + let start = docx_rs::Start::new(start); + let format = docx_rs::NumberFormat::new(format); + let text = docx_rs::LevelText::new(text); + let jc = docx_rs::LevelJc::new(jc); + Level(docx_rs::Level::new(id, start, format, text, jc)) } impl Level { - pub fn take(self) -> docx_core::Level { + pub fn take(self) -> docx_rs::Level { self.0 } } @@ -26,7 +26,7 @@ impl Level { pub fn indent( mut self, left: usize, - special_indent_kind: Option, + special_indent_kind: Option, special_indent_size: Option, ) -> Self { let special_indent = create_special_indent(special_indent_kind, special_indent_size); diff --git a/docx-wasm/src/lib.rs b/docx-wasm/src/lib.rs index f2194d0..ed40dc8 100644 --- a/docx-wasm/src/lib.rs +++ b/docx-wasm/src/lib.rs @@ -1,7 +1,7 @@ mod adaptors; mod comment; mod delete; -mod docx; +mod doc; mod insert; mod level; mod numbering; @@ -14,8 +14,7 @@ mod table_row; pub use adaptors::*; pub use comment::*; pub use delete::*; -pub use docx::*; -pub use docx_core; +pub use doc::*; pub use insert::*; pub use level::*; pub use numbering::*; diff --git a/docx-wasm/src/numbering.rs b/docx-wasm/src/numbering.rs index 911b1b5..296bc9f 100644 --- a/docx-wasm/src/numbering.rs +++ b/docx-wasm/src/numbering.rs @@ -1,18 +1,18 @@ use super::*; -use docx_core; +use docx_rs; use wasm_bindgen::prelude::*; #[wasm_bindgen] #[derive(Debug)] -pub struct Numbering(docx_core::Numbering); +pub struct Numbering(docx_rs::Numbering); #[wasm_bindgen(js_name = createNumbering)] pub fn create_numbering(id: usize) -> Numbering { - Numbering(docx_core::Numbering::new(id)) + Numbering(docx_rs::Numbering::new(id)) } impl Numbering { - pub fn take(self) -> docx_core::Numbering { + pub fn take(self) -> docx_rs::Numbering { self.0 } } diff --git a/docx-wasm/src/paragraph.rs b/docx-wasm/src/paragraph.rs index ed1791f..f6b6a9a 100644 --- a/docx-wasm/src/paragraph.rs +++ b/docx-wasm/src/paragraph.rs @@ -1,14 +1,14 @@ use super::*; -use docx_core; +use docx_rs; use wasm_bindgen::prelude::*; #[wasm_bindgen] #[derive(Debug)] -pub struct Paragraph(docx_core::Paragraph); +pub struct Paragraph(docx_rs::Paragraph); #[wasm_bindgen(js_name = createParagraph)] pub fn create_paragraph() -> Paragraph { - Paragraph(docx_core::Paragraph::new()) + Paragraph(docx_rs::Paragraph::new()) } #[wasm_bindgen] @@ -19,52 +19,48 @@ impl Paragraph { } pub fn add_insert(mut self, i: Insert) -> Paragraph { - self.0 - .children - .push(docx_core::ParagraphChild::Insert(i.take())); + self.0.children.push(docx_rs::ParagraphChild::Insert(i.take())); self } pub fn add_delete(mut self, d: Delete) -> Paragraph { - self.0 - .children - .push(docx_core::ParagraphChild::Delete(d.take())); + self.0.children.push(docx_rs::ParagraphChild::Delete(d.take())); self } pub fn add_bookmark_start(mut self, id: &str, name: &str) -> Paragraph { - self.0 - .children - .push(docx_core::ParagraphChild::BookmarkStart( - docx_core::BookmarkStart::new(id, name), - )); + self.0.children.push(docx_rs::ParagraphChild::BookmarkStart( + docx_rs::BookmarkStart::new(id, name), + )); self } pub fn add_bookmark_end(mut self, id: &str) -> Paragraph { - self.0.children.push(docx_core::ParagraphChild::BookmarkEnd( - docx_core::BookmarkEnd::new(id), - )); + self.0 + .children + .push(docx_rs::ParagraphChild::BookmarkEnd(docx_rs::BookmarkEnd::new( + id, + ))); self } pub fn add_comment_start(mut self, comment: Comment) -> Paragraph { self.0 .children - .push(docx_core::ParagraphChild::CommentStart(Box::new( - docx_core::CommentRangeStart::new(comment.take()), + .push(docx_rs::ParagraphChild::CommentStart(Box::new( + docx_rs::CommentRangeStart::new(comment.take()), ))); self } pub fn add_comment_end(mut self, id: usize) -> Paragraph { - self.0.children.push(docx_core::ParagraphChild::CommentEnd( - docx_core::CommentRangeEnd::new(id), + self.0.children.push(docx_rs::ParagraphChild::CommentEnd( + docx_rs::CommentRangeEnd::new(id), )); self } - pub fn align(mut self, alignment_type: docx_core::AlignmentType) -> Paragraph { + pub fn align(mut self, alignment_type: docx_rs::AlignmentType) -> Paragraph { self.0.property = self.0.property.align(alignment_type); self } @@ -77,7 +73,7 @@ impl Paragraph { pub fn indent( mut self, left: usize, - special_indent_kind: Option, + special_indent_kind: Option, special_indent_size: Option, ) -> Paragraph { let special_indent = create_special_indent(special_indent_kind, special_indent_size); @@ -86,15 +82,15 @@ impl Paragraph { } pub fn numbering(mut self, id: usize, level: usize) -> Self { - let id = docx_core::NumberingId::new(id); - let level = docx_core::IndentLevel::new(level); + let id = docx_rs::NumberingId::new(id); + let level = docx_rs::IndentLevel::new(level); self.0.property = self.0.property.numbering(id, level); self } } impl Paragraph { - pub fn take(self) -> docx_core::Paragraph { + pub fn take(self) -> docx_rs::Paragraph { self.0 } } diff --git a/docx-wasm/src/run.rs b/docx-wasm/src/run.rs index 4d910cf..cc4991c 100644 --- a/docx-wasm/src/run.rs +++ b/docx-wasm/src/run.rs @@ -1,14 +1,13 @@ -use super::*; -use docx_core; +use docx_rs; use wasm_bindgen::prelude::*; #[wasm_bindgen] #[derive(Debug)] -pub struct Run(docx_core::Run); +pub struct Run(docx_rs::Run); #[wasm_bindgen(js_name = createRun)] pub fn create_run() -> Run { - Run(docx_core::Run::new()) + Run(docx_rs::Run::new()) } #[wasm_bindgen] @@ -21,25 +20,19 @@ impl Run { pub fn add_delete_text(mut self, text: &str) -> Run { self.0 .children - .push(docx_core::RunChild::DeleteText(docx_core::DeleteText::new( - text, - ))); + .push(docx_rs::RunChild::DeleteText(docx_rs::DeleteText::new(text))); self } pub fn add_tab(mut self) -> Run { - self.0 - .children - .push(docx_core::RunChild::Tab(docx_core::Tab::new())); + self.0.children.push(docx_rs::RunChild::Tab(docx_rs::Tab::new())); self } - pub fn add_break(mut self, break_type: docx_core::BreakType) -> Run { + pub fn add_break(mut self, break_type: docx_rs::BreakType) -> Run { self.0 .children - .push(docx_core::RunChild::Break(docx_core::Break::new( - break_type, - ))); + .push(docx_rs::RunChild::Break(docx_rs::Break::new(break_type))); self } @@ -80,7 +73,7 @@ impl Run { } impl Run { - pub fn take(self) -> docx_core::Run { + pub fn take(self) -> docx_rs::Run { self.0 } } diff --git a/docx-wasm/src/table.rs b/docx-wasm/src/table.rs index 4df7fdd..1a7287a 100644 --- a/docx-wasm/src/table.rs +++ b/docx-wasm/src/table.rs @@ -1,18 +1,18 @@ use super::*; -use docx_core; +use docx_rs; use wasm_bindgen::prelude::*; #[wasm_bindgen] #[derive(Debug)] -pub struct Table(docx_core::Table); +pub struct Table(docx_rs::Table); #[wasm_bindgen(js_name = createTable)] pub fn create_table() -> Table { - Table(docx_core::Table::new(vec![])) + Table(docx_rs::Table::new(vec![])) } impl Table { - pub fn take(self) -> docx_core::Table { + pub fn take(self) -> docx_rs::Table { self.0 } } @@ -34,7 +34,7 @@ impl Table { self } - pub fn align(mut self, v: docx_core::TableAlignmentType) -> Table { + pub fn align(mut self, v: docx_rs::TableAlignmentType) -> Table { self.0 = self.0.align(v); self } diff --git a/docx-wasm/src/table_cell.rs b/docx-wasm/src/table_cell.rs index c23c835..0cb9cb4 100644 --- a/docx-wasm/src/table_cell.rs +++ b/docx-wasm/src/table_cell.rs @@ -1,18 +1,18 @@ use super::*; -use docx_core; +use docx_rs; use wasm_bindgen::prelude::*; #[wasm_bindgen] #[derive(Debug)] -pub struct TableCell(docx_core::TableCell); +pub struct TableCell(docx_rs::TableCell); #[wasm_bindgen(js_name = createTableCell)] pub fn create_table_cell() -> TableCell { - TableCell(docx_core::TableCell::new()) + TableCell(docx_rs::TableCell::new()) } impl TableCell { - pub fn take(self) -> docx_core::TableCell { + pub fn take(self) -> docx_rs::TableCell { self.0 } } @@ -22,11 +22,11 @@ impl TableCell { pub fn add_paragraph(mut self, p: Paragraph) -> TableCell { self.0 .contents - .push(docx_core::TableCellContent::Paragraph(p.take())); + .push(docx_rs::TableCellContent::Paragraph(p.take())); self } - pub fn vertical_merge(mut self, t: docx_core::VMergeType) -> TableCell { + pub fn vertical_merge(mut self, t: docx_rs::VMergeType) -> TableCell { self.0.property = self.0.property.vertical_merge(t); self } @@ -37,7 +37,7 @@ impl TableCell { } pub fn width(mut self, v: usize) -> TableCell { - self.0.property = self.0.property.width(v, docx_core::WidthType::DXA); + self.0.property = self.0.property.width(v, docx_rs::WidthType::DXA); self } } diff --git a/docx-wasm/src/table_row.rs b/docx-wasm/src/table_row.rs index a3abc27..19ecdbc 100644 --- a/docx-wasm/src/table_row.rs +++ b/docx-wasm/src/table_row.rs @@ -1,18 +1,18 @@ use super::*; -use docx_core; +use docx_rs; use wasm_bindgen::prelude::*; #[wasm_bindgen] #[derive(Debug)] -pub struct TableRow(docx_core::TableRow); +pub struct TableRow(docx_rs::TableRow); #[wasm_bindgen(js_name = createTableRow)] pub fn create_table_row() -> TableRow { - TableRow(docx_core::TableRow::new(vec![])) + TableRow(docx_rs::TableRow::new(vec![])) } impl TableRow { - pub fn take(self) -> docx_core::TableRow { + pub fn take(self) -> docx_rs::TableRow { self.0 } }