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
View File
@@ -38,6 +38,7 @@ objc2.workspace = true
security-framework.workspace = true
[target.'cfg(windows)'.dependencies]
clipboard-win = "5.4"
windows-sys.workspace = true
windows.workspace = true
+16 -2
View File
@@ -54,7 +54,7 @@ pub fn write(clip: &Clip) -> Result<()> {
pub fn read() -> Result<Option<Clip>> {
with_board(|board| {
let text = absent_ok(board.get_text())?;
if let Some(html) = absent_ok(board.get().html())? {
if let Some(html) = html_of(board)? {
let text = text.unwrap_or_default();
return Ok(Some(Clip::Html { html, text }));
}
@@ -76,7 +76,20 @@ pub fn read() -> Result<Option<Clip>> {
/// The clipboard's HTML, if any; gpui's reads omit it.
pub fn html() -> Result<Option<String>> {
with_board(|board| absent_ok(board.get().html()))
with_board(html_of)
}
fn html_of(board: &mut Clipboard) -> Result<Option<String>> {
// arboard reads absent HTML on Windows as an error.
#[cfg(windows)]
{
let format = clipboard_win::register_format("HTML Format")
.context("the HTML clipboard format registers")?;
if !clipboard_win::is_format_avail(format.get()) {
return Ok(None);
}
}
absent_ok(board.get().html())
}
/// Empty or other-format clipboards read as None.
@@ -110,6 +123,7 @@ mod tests {
let text = Clip::Text("plain 中文".into());
write(&text).expect("text writes");
assert_eq!(read().expect("text reads"), Some(text));
assert_eq!(html().expect("no html reads"), None);
let html = Clip::Html {
html: "<table><tr><td>a</td></tr></table>".into(),
text: "a".into(),