Skip to main content

Class: ModifyPresentationHelper

Defined in: src/helper/modify-presentation-helper.ts:7

Constructors

Constructor

new ModifyPresentationHelper(): ModifyPresentationHelper

Returns

ModifyPresentationHelper

Methods

getSlideMastersCollection()

static getSlideMastersCollection(xml): LiveNodeList<Element>

Defined in: src/helper/modify-presentation-helper.ts:14

Parameters

xml

Document

Returns

LiveNodeList<Element>


getSlidesCollection()

static getSlidesCollection(xml): LiveNodeList<Element>

Defined in: src/helper/modify-presentation-helper.ts:11

Get Collection of slides

Parameters

xml

Document

Returns

LiveNodeList<Element>


normalizeSlideIds()

static normalizeSlideIds(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()

static normalizeSlideMasterIds(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()

static removedUnusedImages(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()

static removeSlides(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()

static removeUnusedContentTypes(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()

static removeUnusedFiles(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()

static sortSlides(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