Form XObject vong 3: danh thuc trang sau khi rut con khoi form (GenerateContent chi ghi lai khi co object cap trang dirty; ProcessForm khong chay voi op thuan trong form) - nhan identity matrix vao form to tien. Ghi chu doc log CI: chi failure dau tien la loi that (poison mutex lan sang test sau).
Build Windows portable / build (push) Canceled after 0s
Build Windows portable / build (push) Canceled after 0s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1200,9 +1200,22 @@ pub fn apply_edits(
|
||||
.map(|&i| &entries[i as usize].path)
|
||||
.collect();
|
||||
nested_paths.sort_by(|a, b| b.len().cmp(&a.len()).then(b.cmp(a)));
|
||||
let mut touched_roots: Vec<u16> = nested_paths.iter().map(|p| p[0]).collect();
|
||||
for path in nested_paths {
|
||||
remove_form_child(&page, path)?;
|
||||
}
|
||||
// ĐÁNH THỨC trang: GenerateContent chỉ ghi lại stream trang khi có
|
||||
// object CẤP TRANG dirty; rút con mới làm FORM dirty thôi — op thuần
|
||||
// trong form (Delete...) không đụng cấp trang → trang không regenerate
|
||||
// → ProcessForm (nơi ghi lại form) không bao giờ chạy. Nhân identity
|
||||
// vào form tổ tiên cấp trang: Transform luôn SetDirty, giá trị không
|
||||
// đổi → trang được ghi lại → form được ghi lại theo.
|
||||
touched_roots.sort_unstable();
|
||||
touched_roots.dedup();
|
||||
for r in touched_roots {
|
||||
let mut root = object_at_path(&page, &[r])?;
|
||||
root.apply_matrix(PdfMatrix::IDENTITY).map_err(err)?;
|
||||
}
|
||||
// Cấp trang: xoá thật theo index trang GIẢM DẦN.
|
||||
let mut page_idxs: Vec<u16> = to_remove
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user