R9.3, R9.4: AutoFilter without the header query (GitHub #4); paste on Windows

Patch 0053: under LOK, Calc takes the first row as header instead of
asking asynchronously; the worker closed the query and crashed.
Patch 0049 includes doc.hxx (gcc on Linux did not build it).
arboard read a missing HTML clipboard format as an error on Windows;
the clipboard checks the format first, and paste errors show the
whole chain. ElyTable tests compare CSV and selection text the
platform's way (P3-09).
This commit is contained in:
雷电芽衣 committed 2026-10-20 02:23:17 -04:00
1 parent ba358c7de6
commit 72bec20a60
19 files changed
+118 -20

No files matched your search

+1 -1
View File
@@ -363,7 +363,7 @@ impl Book {
Ok(Some(Clip::Html { html, .. })) => Some(html),
Ok(_) => None,
Err(error) => {
let text = Book::text(cx, "table.data.clipboard", &[("error", &error.to_string())]);
let text = Book::text(cx, "table.data.clipboard", &[("error", &format!("{error:#}"))]);
return self.toast(text, Severity::Danger, cx);
}
};
+3 -5
View File
@@ -43,11 +43,9 @@ pub(super) fn cells(cx: &mut TestAppContext, book: &Entity<Book>, range: &str) -
worker
.run(&tab.doc, "cell.goto", &[range])
.expect("the range");
tab.doc
.selection_text(&mut worker)
.expect("the text")
.trim()
.to_string()
let text = tab.doc.selection_text(&mut worker).expect("the text");
// The Windows kernel ends rows with CRLF.
text.trim().lines().collect::<Vec<_>>().join("\n")
})
}
+5 -3
View File
@@ -113,15 +113,17 @@ fn exports_write_the_shown_sheet_as_text() {
run(&mut cx, &book, "cell.goto", &["B1"]);
run(&mut cx, &book, "cell.enter", &["a;b"]);
let id = cx.update(|app| book.read(app).core.tabs[0].id);
// The kernel ends rows the system's way.
let end = if cfg!(windows) { "\r\n" } else { "\n" };
for (format, name, text) in [
(Format::Csv, "out.csv", "3,a;b\n"),
(Format::Tsv, "out.tsv", "3\ta;b\n"),
(Format::Csv, "out.csv", "3,a;b"),
(Format::Tsv, "out.tsv", "3\ta;b"),
] {
let path = dir.path().join(name);
update(&mut cx, &book, |book, cx| book.export_to(id, path.clone(), format, cx));
settle(&cx, |_| path.exists());
quiet(&cx, &book);
assert_eq!(std::fs::read_to_string(&path).expect("reads"), text);
assert_eq!(std::fs::read_to_string(&path).expect("reads"), format!("{text}{end}"));
}
let pdf = dir.path().join("out.pdf");
update(&mut cx, &book, |book, cx| book.export_to(id, pdf.clone(), Format::Pdf, cx));