Detect text overflow in shapes (text exceeding shape bounds). Returns dict of slide_key -> shape_key -> overflow_inches. Only includes shapes that have text overflow.
(inventory: InventoryData)
| 141 | |
| 142 | |
| 143 | def detect_frame_overflow(inventory: InventoryData) -> Dict[str, Dict[str, float]]: |
| 144 | """Detect text overflow in shapes (text exceeding shape bounds). |
| 145 | |
| 146 | Returns dict of slide_key -> shape_key -> overflow_inches. |
| 147 | Only includes shapes that have text overflow. |
| 148 | """ |
| 149 | overflow_map = {} |
| 150 | |
| 151 | for slide_key, shapes_dict in inventory.items(): |
| 152 | for shape_key, shape_data in shapes_dict.items(): |
| 153 | # Check for frame overflow (text exceeding shape bounds) |
| 154 | if shape_data.frame_overflow_bottom is not None: |
| 155 | if slide_key not in overflow_map: |
| 156 | overflow_map[slide_key] = {} |
| 157 | overflow_map[slide_key][shape_key] = shape_data.frame_overflow_bottom |
| 158 | |
| 159 | return overflow_map |
| 160 | |
| 161 | |
| 162 | def validate_replacements(inventory: InventoryData, replacements: Dict) -> List[str]: |
no outgoing calls
no test coverage detected