Integration: compile fixes after merging main a184db6f8

- compose: a test frame literal named section_marker twice.
- export: PPTX rasterizing keeps a wrap stand-in for each rasterized object (next's rasterize_where takes keep_wrap).
- flex: to_bytes returns a Result on main.
- package, combined_close_glyph test: load_document_fonts takes an access check.
- pptx test: Graphic literal gains next's clip and wrap fields.
- render placed_pdf test: PdfCrop imported twice.
This commit is contained in:
aiongg
2026-10-16 03:11:36 +00:00
parent 18ae8e4761
commit 1a6ee2ca70
7 changed files with 7 additions and 7 deletions
-1
View File
@@ -4606,7 +4606,6 @@ mod column_allocation_safety_tests {
left_page: false,
page_rect: None,
outline: None,
section_marker: None,
}
}
fn check(kind: designcraft_doc::ColumnsKind) {
+1 -1
View File
@@ -92,7 +92,7 @@ fn export_pptx(s: &mut Session, p: &Value) -> Result<Value> {
// Object Export Options › Rasterize, and what PowerPoint has no objects for (a threaded frame
// stays text: a picture of it would drop the rest of its story).
let auto = p.get("rasterize").and_then(Value::as_bool).unwrap_or(true);
let (raster, rasterized) = rasterize_where(&st.doc, &s.cache, 300.0, |it| {
let (raster, rasterized) = rasterize_where(&st.doc, &s.cache, 300.0, true, |it| {
!threaded(&st.doc, it) && (it.export_options.rasterize || (auto && designcraft_pptx::needs_raster(&st.doc, it)))
});
let doc: &designcraft_doc::Document = raster.as_ref().unwrap_or(&st.doc);
+1 -1
View File
@@ -562,7 +562,7 @@ mod tests {
let c = s.execute("flex.add", &json!({})).unwrap()["id"].as_u64().unwrap();
s.execute("flex.set", &json!({"direction": "columnReverse", "wrap": true, "padding": [1, 2, 3, 4], "gapV": 7})).unwrap();
let d = s.doc().unwrap().doc.clone();
let back = crate::cmd::from_bytes(&crate::cmd::to_bytes(&d)).unwrap();
let back = crate::cmd::from_bytes(&crate::cmd::to_bytes(&d).unwrap()).unwrap();
assert_eq!(back.item(ItemId(c)).unwrap().flex, d.item(ItemId(c)).unwrap().flex);
assert!(back.item(ItemId(c)).unwrap().flex.is_some());
}
+1 -1
View File
@@ -735,7 +735,7 @@ mod tests {
assert_eq!(copy_font(&root, &face, &fonts, &mut copied, &mut taken, &mut files), "");
assert_eq!(files, [fonts.join("12345.ttf")]);
let db = designcraft_fonts::FontDb::global();
let loaded = db.load_document_fonts(&fonts);
let loaded = db.load_document_fonts(&fonts, &|_| Ok(()));
assert_eq!((loaded.faces, loaded.skipped.len()), (1, 0), "{:?}", loaded.skipped);
db.close_scope(loaded.scope);
// The first four bytes name the kind; a font extension or an unknown kind stays.
+2 -2
View File
@@ -124,8 +124,8 @@ fn scoped_font_jobs_and_owned_layouts_survive_close_and_same_story_reopen() {
std::fs::write(old_folder.join("font.ttf"), font_with_glyph(FAMILY, &['x'], 'X').unwrap()).unwrap();
std::fs::write(new_folder.join("font.ttf"), font_with_glyph(FAMILY, &['x'], 'O').unwrap()).unwrap();
let db = FontDb::global();
let old_fonts = db.load_document_fonts(&old_folder);
let new_fonts = db.load_document_fonts(&new_folder);
let old_fonts = db.load_document_fonts(&old_folder, &|_| Ok(()));
let new_fonts = db.load_document_fonts(&new_folder, &|_| Ok(()));
assert_eq!((old_fonts.faces, new_fonts.faces), (1, 1));
assert_ne!(old_fonts.scope, new_fonts.scope);
+2
View File
@@ -218,6 +218,8 @@ fn pictures_are_cropped_to_their_frames() {
auto_fit: designcraft_doc::Fitting::None,
fit_align: 0,
crop: [0.0; 4],
clip: None,
wrap: Default::default(),
});
});
let mut z = export(&d, &PptxOptions::default());
-1
View File
@@ -10,7 +10,6 @@ use std::sync::mpsc::{self, RecvTimeoutError};
use std::time::Duration;
use designcraft_compose::Cache;
use designcraft_doc::PdfCrop;
use designcraft_doc::build::NewDocument;
use designcraft_doc::{Asset, AssetId, Content, Document, Graphic, Item, ItemId, PdfCrop, Shape, SpreadRef};
use designcraft_geom::{Affine, Rect, shapes};