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.
This commit is contained in:
aiongg
2026-10-22 02:35:17 +00:00
parent 51401a382c
commit 0bf7d40f3b
+1 -10
View File
@@ -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<Json> {
"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<Json> {
}
}
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<Json> {
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);