Skip to content

Commit

Permalink
Fix for Issue #559 (missing default white bkgd in Keynote)
Browse files Browse the repository at this point in the history
  • Loading branch information
gitbrent committed Sep 4, 2019
1 parent 6094aeb commit 5dd05b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Ability to specify numbered list format [\#452](https://github.com/gitbrent/PptxGenJS/issue/452) ([mayvazyan](https://github.com/mayvazyan))
- Ability to set start number "startAt" for a bullet list of type numbered [\#554](https://github.com/gitbrent/PptxGenJS/issue/554) [\#555](https://github.com/gitbrent/PptxGenJS/pull/555) ([bj-mitchell](https://github.com/bj-mitchell))
- Tables not being displayed after update [\#559](https://github.com/gitbrent/PptxGenJS/issue/559) ([emartz404](https://github.com/emartz404))
- Links in tables won't work on tables generated with autoPage [\#583](https://github.com/gitbrent/PptxGenJS/issue/583) ([githuis](https://github.com/githuis))


Expand Down
13 changes: 6 additions & 7 deletions src/gen-xml.ts
Expand Up @@ -2,7 +2,7 @@
* PptxGenJS: XML Generation
*/

import { BULLET_TYPES, CRLF, DEF_CELL_BORDER, DEF_CELL_MARGIN_PT, EMU, LAYOUT_IDX_SERIES_BASE, ONEPT, PLACEHOLDER_TYPES, SLDNUMFLDID, SLIDE_OBJECT_TYPES } from './core-enums'
import { BULLET_TYPES, CRLF, DEF_CELL_BORDER, DEF_CELL_MARGIN_PT, EMU, LAYOUT_IDX_SERIES_BASE, ONEPT, PLACEHOLDER_TYPES, SLDNUMFLDID, SLIDE_OBJECT_TYPES, DEF_PRES_LAYOUT_NAME } from './core-enums'
import { PowerPointShapes } from './core-shapes'
import {
ILayout,
Expand Down Expand Up @@ -68,11 +68,10 @@ function slideObjectToXml(slide: ISlide | ISlideLayout): string {
if (slide.bkgd) {
strSlideXml += genXmlColorSelection(null, slide.bkgd)
}
/* FIXME: TODO: this is needed on slideMaster1.xml to avoid gray background in Finder/Apple Pages
// but it shoudln't go on every slide that comes along
else {
else if (!slide.bkgd && slide.name && slide.name == DEF_PRES_LAYOUT_NAME) {
// NOTE: Default [white] background is needed on slideMaster1.xml to avoid gray background in Keynote (and Finder previews)
strSlideXml += '<p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg>'
}*/
}

// STEP 2: Add background image (using Strech) (if any)
if (slide.bkgdImgRid) {
Expand Down Expand Up @@ -1423,7 +1422,7 @@ export function makeXmlPresentationRels(slides: Array<ISlide>): string {
return strXml
}

// XML-GEN: Next 5 functions run 1-N times (once for each Slide)
// XML-GEN: Functions that run 1-N times (once for each Slide)

/**
* Generates XML for the slide file (`ppt/slides/slide1.xml`)
Expand Down Expand Up @@ -1516,7 +1515,7 @@ export function makeXmlLayout(layout: ISlideLayout): string {
}

/**
* Generates XML for the slide master file (`ppt/slideMasters/slideMaster1.xml`)
* Creates Slide Master 1 (`ppt/slideMasters/slideMaster1.xml`)
* @param {ISlide} slide - slide object that represents master slide layout
* @param {ISlideLayout[]} layouts - slide layouts
* @return {string} XML
Expand Down

0 comments on commit 5dd05b7

Please sign in to comment.