Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/bugfixes/issue-188/after.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/bugfixes/issue-188/before.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/bugfixes/issue-188/gt.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion crates/office2pdf/src/render/typst_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ fn generate_fixed_page(
} else {
let _ = writeln!(
out,
"#set page(width: {}pt, height: {}pt, margin: 0pt)",
"#set page(width: {}pt, height: {}pt, margin: 0pt, fill: white)",
format_f64(size.width),
format_f64(size.height),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -879,8 +879,8 @@ fn test_fixed_page_text_box_no_fill_no_stroke() {
)]);
let output = generate_typst(&doc).unwrap();
assert!(
!output.source.contains("fill:"),
"Expected no fill in output, got:\n{}",
output.source.contains("fill: white"),
"Expected fill: white for no-background slide, got:\n{}",
output.source,
);
assert!(
Expand Down
6 changes: 5 additions & 1 deletion crates/office2pdf/src/render/typst_gen_page_misc_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,11 @@ fn test_fixed_page_without_background_color() {
});
let doc = make_doc(vec![page]);
let output = generate_typst(&doc).unwrap();
assert!(!output.source.contains("fill:"));
assert!(
output.source.contains("fill: white"),
"Expected fill: white for no-background slide, got:\n{}",
output.source
);
}

#[test]
Expand Down
1 change: 0 additions & 1 deletion crates/office2pdf/tests/pptx_fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ fn smoke_pr_188_contributor_acceptance_fixtures() {
}

#[test]
#[ignore = "pending PR #188 adaptation: reset a slide without a background to white"]
fn acceptance_pr_188_contributor_acceptance_page_fill_reset() {
let data = load_fixture(PR_188_PAGE_FILL_FIXTURE);
let (document, _warnings) = PptxParser
Expand Down
Loading