From 0bf7d40f3bb3a27671b0a02d6b694028191eb098 Mon Sep 17 00:00:00 2001 From: aiongg Date: Thu, 22 Oct 2026 02:35:17 +0000 Subject: [PATCH] Integration: #1534 remove the What::Hyperlinks paste-special target The hyperlink copy stays inside What::All, which the cut path uses; the existing test a_cut_moves_the_sources_notes_hyperlinks_and_merges covers it. --- crates/engine/src/cmd/edit.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/crates/engine/src/cmd/edit.rs b/crates/engine/src/cmd/edit.rs index 1a1df8e28..067e79109 100644 --- a/crates/engine/src/cmd/edit.rs +++ b/crates/engine/src/cmd/edit.rs @@ -781,7 +781,6 @@ enum What { Values, Formats, Comments, - Hyperlinks, Validation, AllExceptBorders, ColumnWidths, @@ -916,7 +915,6 @@ fn paste_special(s: &mut Session, p: &Json) -> Result { "values" => What::Values, "formats" => What::Formats, "comments" | "notes" => What::Comments, - "hyperlinks" | "links" => What::Hyperlinks, "validation" => What::Validation, "allExceptBorders" => What::AllExceptBorders, "columnWidths" => What::ColumnWidths, @@ -1073,7 +1071,7 @@ fn paste_special(s: &mut Session, p: &Json) -> Result { } } What::Formats => new.style = map_style(sc_cell.style, &mut cx.wb), - What::Comments | What::Hyperlinks | What::Validation | What::ColumnWidths => {} + What::Comments | What::Validation | What::ColumnWidths => {} } // Operations combine numbers with what is already there. if op != "none" @@ -1146,13 +1144,6 @@ fn paste_special(s: &mut Session, p: &Json) -> Result { cx.sheet_mut(dest_sheet)?.comments.insert(dest, cm); } } - // A cut moves the block's hyperlinks with it, so they must reach the - // destination too (only `edit.clear` touched them before). - What::Hyperlinks => { - if let Some(h) = src_sheet.hyperlinks.get(&sc).cloned() { - cx.sheet_mut(dest_sheet)?.hyperlinks.insert(dest, h); - } - } What::ColumnWidths => { if let Some(info) = src_sheet.cols.get(&sc.col).copied() { cx.sheet_mut(dest_sheet)?.cols.insert(dest.col, info);