Skip to content

Commit 752eb0a

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: OpenXML.PowerPoint.File.get_Slides ( Fixes #8 )
1 parent 1979ef5 commit 752eb0a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

OpenXML.types.ps1xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,34 @@ foreach ($worksheetRow in $this.content.worksheet.sheetdata.row) {
5151
}
5252
}
5353
$excelCells
54+
</GetScriptBlock>
55+
</ScriptProperty>
56+
</Members>
57+
</Type>
58+
<Type>
59+
<Name>OpenXML.PowerPoint.File</Name>
60+
<Members>
61+
<ScriptProperty>
62+
<Name>Slides</Name>
63+
<GetScriptBlock>
64+
$slidesInOrder = @($this.Parts[$this.Parts.keys -match '/slide\d+\.xml$'] |
65+
Sort-Object { $_.Uri -replace '\D' -as [int]} |
66+
Select-Object)
67+
68+
69+
foreach ($slide in $slidesInOrder) {
70+
[PSCustomObject][Ordered]@{
71+
PSTypeName = 'OpenXML.PowerPoint.Slide'
72+
FilePath = $this.FilePath
73+
Uri = $slide.Uri
74+
SlideNumber = $slide.Uri -replace '\D' -as [int]
75+
Content = $slide.Content
76+
ContentType = $slide.ContentType
77+
}
78+
}
79+
80+
81+
5482
</GetScriptBlock>
5583
</ScriptProperty>
5684
</Members>

0 commit comments

Comments
 (0)