Class: ModifyPresentationHelper
Defined in: src/helper/modify-presentation-helper.ts:7
Constructors
Constructor
new ModifyPresentationHelper():
ModifyPresentationHelper
Returns
ModifyPresentationHelper
Methods
getSlideMastersCollection()
staticgetSlideMastersCollection(xml):LiveNodeList<Element>
Defined in: src/helper/modify-presentation-helper.ts:14
Parameters
xml
Document
Returns
LiveNodeList<Element>
getSlidesCollection()
staticgetSlidesCollection(xml):LiveNodeList<Element>
Defined in: src/helper/modify-presentation-helper.ts:11
Get Collection of slides
Parameters
xml
Document
Returns
LiveNodeList<Element>
normalizeSlideIds()
staticnormalizeSlideIds(xml):void
Defined in: src/helper/modify-presentation-helper.ts:47
Set ids to prevent corrupted pptx. Must start with 256 and increment by one.
Parameters
xml
Document
Returns
void
normalizeSlideMasterIds()
staticnormalizeSlideMasterIds(xml,i,archive):Promise<void>
Defined in: src/helper/modify-presentation-helper.ts:66
Update slideMaster ids to prevent corrupted pptx.
- Take first slideMaster id from presentation.xml to start,
- then update incremental ids of each p:sldLayoutId in slideMaster[i].xml (starting by slideMasterId + 1)
- and update next slideMaster id with previous p:sldLayoutId + 1
p:sldMasterId-ids and p:sldLayoutId-ids need to be in a row, otherwise PowerPoint will complain on any p:sldLayoutId-id lower than its corresponding slideMaster-id. omg.
Parameters
xml
Document
i
number
archive
IArchive
Returns
Promise<void>
removedUnusedImages()
staticremovedUnusedImages(xml,i,archive):Promise<void>
Defined in: src/helper/modify-presentation-helper.ts:152
Parameters
xml
Document
i
number
archive
IArchive
Returns
Promise<void>
removeSlides()
staticremoveSlides(numbers): (xml) =>void
Defined in: src/helper/modify-presentation-helper.ts:33
Pass an array of slide numbers to remove from slide sortation.
Parameters
numbers
number[]
Array of slide numbers, starting by 1
Returns
(xml) => void
removeUnusedContentTypes()
staticremoveUnusedContentTypes(xml,i,archive):Promise<void>
Defined in: src/helper/modify-presentation-helper.ts:135
PPT won't complain about unused items in [Content_Types].xml, but we remove them anyway in case the file mentioned in PartName- attribute does not exist.
Parameters
xml
Document
i
number
archive
IArchive
Returns
Promise<void>
removeUnusedFiles()
staticremoveUnusedFiles(xml,i,archive):Promise<void>
Defined in: src/helper/modify-presentation-helper.ts:103
The content tracker's files include all files that have been copied to the root template by automizer. We remove all other files.
Parameters
xml
Document
i
number
archive
IArchive
Returns
Promise<void>
sortSlides()
staticsortSlides(order): (xml) =>void
Defined in: src/helper/modify-presentation-helper.ts:23
Pass an array of slide numbers to define a target sort order. First slide starts by 1.
Parameters
order
number[]
Array of slide numbers, starting by 1
Returns
(xml) => void