Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion xlsx/read_drawing_xml.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,19 @@ fn parse_drawing_images(
cancelled~,
)
}
// location links (e.g. "Sheet1!B2") are written as internal-mode
// relationships by this library's own writer; reading only external-mode
// records would drop them on round-trip
let location_hyperlink_targets = if drawing_rels_xml.to_owned() == "" {
Map([])
} else {
parse_internal_relationship_targets(
drawing_rels_xml,
rel_hyperlink,
budget?,
cancelled~,
)
}
for anchor in anchors {
if anchor.unsupported {
continue
Expand Down Expand Up @@ -749,7 +762,14 @@ fn parse_drawing_images(
hyperlink = value
hyperlink_type = External
}
None => ()
None =>
match location_hyperlink_targets.get(rel_id.to_string()) {
Some(value) => {
hyperlink = value
hyperlink_type = Location
}
None => ()
}
}
None => ()
}
Expand Down
Loading