* Extract placeholder shape nodes from an spTree node. * A shape is considered a placeholder if it has a `p:ph` element in its nvPr.
(spTree: SafeXmlNode)
| 25 | * A shape is considered a placeholder if it has a `p:ph` element in its nvPr. |
| 26 | */ |
| 27 | function extractPlaceholders(spTree: SafeXmlNode): SafeXmlNode[] { |
| 28 | const placeholders: SafeXmlNode[] = [] |
| 29 | const allChildren = spTree.allChildren() |
| 30 | for (const child of allChildren) { |
| 31 | if (isPlaceholder(child)) { |
| 32 | placeholders.push(child) |
| 33 | } |
| 34 | } |
| 35 | return placeholders |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Parse a slide master XML root (`p:sldMaster`) into MasterData. |
no test coverage detected