From 90d1e9a92c2149fcb90012099f9053944a5c7dd0 Mon Sep 17 00:00:00 2001 From: bokuweb Date: Tue, 23 Mar 2021 12:08:19 +0900 Subject: [PATCH] 0.2.10 (#260) * 0.2.10 * fix: example --- Cargo.lock | 4 ++-- docx-core/Cargo.toml | 2 +- docx-core/examples/table.rs | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5986c14..47019d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -160,7 +160,7 @@ checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499" [[package]] name = "docx-rs" -version = "0.2.9" +version = "0.2.10" dependencies = [ "image", "insta", @@ -709,4 +709,4 @@ dependencies = [ "crc32fast", "flate2", "podio", -] \ No newline at end of file +] diff --git a/docx-core/Cargo.toml b/docx-core/Cargo.toml index 26b1f41..b88d5b5 100644 --- a/docx-core/Cargo.toml +++ b/docx-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "docx-rs" -version = "0.2.9" +version = "0.2.10" authors = ["bokuweb "] repository = "https://github.com/bokuweb/docx-rs" edition = "2018" diff --git a/docx-core/examples/table.rs b/docx-core/examples/table.rs index b2ccb08..a52289d 100644 --- a/docx-core/examples/table.rs +++ b/docx-core/examples/table.rs @@ -8,7 +8,8 @@ pub fn main() -> Result<(), DocxError> { TableRow::new(vec![ TableCell::new() .add_paragraph(Paragraph::new()) - .grid_span(2), + .grid_span(2) + .shading(Shading::new().fill("FF0000")), TableCell::new() .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))) .vertical_align(VAlignType::Center) @@ -35,6 +36,7 @@ pub fn main() -> Result<(), DocxError> { ]), ]) .set_grid(vec![2000, 2000, 2000]) + .layout(TableLayoutType::Fixed) .indent(1000); Docx::new().add_table(table).build().pack(file)?; Ok(())