(node: SafeXmlNode)
| 4 | * Check whether a shape-like node contains a placeholder definition. |
| 5 | */ |
| 6 | export function isPlaceholder(node: SafeXmlNode): boolean { |
| 7 | const nvSpPr = node.child('nvSpPr') |
| 8 | if (nvSpPr.exists()) { |
| 9 | const nvPr = nvSpPr.child('nvPr') |
| 10 | if (nvPr.child('ph').exists()) return true |
| 11 | } |
| 12 | const nvPicPr = node.child('nvPicPr') |
| 13 | if (nvPicPr.exists()) { |
| 14 | const nvPr = nvPicPr.child('nvPr') |
| 15 | if (nvPr.child('ph').exists()) return true |
| 16 | } |
| 17 | return false |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * Parse all attributes of a node into a local-name keyed map. |
no test coverage detected