fix(xlsx): restore location hyperlinks on picture read#179
Merged
Conversation
PR #172 switched drawing hyperlink resolution to parse_external_relationship_targets only, so internal-mode hyperlink relationships - which this library's own writer emits for location links like "Sheet1!B2" - were dropped on read: the picture came back with an empty hyperlink and HyperlinkType::Unset. The regression was caught on main by the #177 round-trip test (merged concurrently, so neither PR's CI saw the interaction). Resolve both modes: external-mode targets keep HyperlinkType::External; a miss falls back to internal-mode targets as HyperlinkType::Location. Fixes the main-branch CI failure in xlsx/drawing_readback_roundtrip_test.mbt on native and wasm.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Main is red:
xlsx/drawing_readback_roundtrip_test.mbt("picture positioning and hyperlinks round-trip") fails on native and wasm since the #172 + #177 merges. #172 switched drawing hyperlink resolution to external-mode relationships only; internal-mode hyperlink rels — which mbtexcel's own writer emits for location links likeSheet1!B2— were dropped on read (hyperlink="",HyperlinkType::Unset). #177's round-trip test detects exactly this, but the two PRs ran CI before each other merged, so only main's post-merge run caught the interaction.Fix: resolve both modes in
parse_drawing_images— external-mode targets keepExternal; on a miss, fall back to internal-mode targets asLocation.Validation
drawing_readback_roundtrip_test: 8/8 on native and wasm (was 7/8 on both).moon checkclean,moon fmt,moon info(no.mbtichange).🤖 Generated with Claude Code