forked from diegoecab/oci-deal-accelerator
Symptom: PowerPoint prompted to repair some generated decks. Cause: when python-pptx (or our native renderer) repacks the .pptx after we embed Oracle template assets — some of which are SVG-backed — [Content_Types].xml can lose the Default entry for "svg" (and other extensions present under ppt/media), which makes Office refuse to open the file cleanly. Fix: after writing the deck (and after any native renderer pass), walk ppt/media, collect the actual extensions in use, and ensure [Content_Types].xml declares a Default for each one (svg, png, jpg, jpeg, gif, bmp, tiff, emf, wmf, ico, webp). Repack only when at least one new Default was added — no-op fast path otherwise. Lines up with the existing field rule: every embedded media extension must be declared in [Content_Types].xml Defaults, or PowerPoint flags the file as corrupt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
106 KiB
106 KiB