fix(pptx): keep visible text in translated, scaled and nested groups
Summary
Follow-up to #4604, as invited in the merge comment. _shape_is_off_slide compared raw shape coordinates with the slide, but a shape inside a group is positioned in the group's child coordinate system (a:chOff/a:chExt). A translated or scaled group could therefore drop text that is visible, or keep text that lands off-slide, and nesting compounded it.
This maps each shape's box up through its ancestor groups' a:xfrm before applying the existing 0.5 visible-area rule. A group without a usable transform keeps the previous behaviour. Rotation and reading order are unchanged and left for separate PRs.
Validation
pytest test_unstructured/partition/test_pptx.py→ 85 passed.- The new regression tests fail 5/5 on the pre-change implementation (translated on-slide, translated off-slide, scaled, nested on-slide, nested off-slide) and pass after. The zero-area fallback test and the top-level control test pass both ways.
ruff checkandruff format --checkon both changed files: clean.
Release note (optional)
partition_pptx now keeps text from shapes inside translated, scaled or nested groups when the group puts them on the slide, and drops it when the group puts them off-slide.
Checklist
- The PR title is a user-facing release-note entry with a conventional commit prefix.
- Apply a category label (
enhancement,bug, or an appropriate existing label), or ask a maintainer to apply it. The agent account cannot add labels here; please addbug. - Not a breaking change.