Skip to content

Commit 9b5a51f

Browse files
author
Peter Lind
committed
Fixing bugs in writing out presentations:
- images in master slides are not saved - duplicate IDs in relationships for master slides
1 parent 312b7a2 commit 9b5a51f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/PhpPresentation/Writer/AbstractWriter.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,12 @@ protected function allDrawings()
9696
// Get an array of all drawings
9797
$aDrawings = array();
9898

99-
// Loop trough PhpPresentation
100-
foreach ($this->getPhpPresentation()->getAllSlides() as $oSlide) {
99+
// Loop through PhpPresentation
100+
foreach (array_merge($this->getPhpPresentation()->getAllSlides(), $this->getPhpPresentation()->getAllMasterSlides()) as $oSlide) {
101101
$arrayReturn = $this->iterateCollection($oSlide->getShapeCollection()->getIterator());
102102
$aDrawings = array_merge($aDrawings, $arrayReturn);
103103
}
104+
104105
return $aDrawings;
105106
}
106107

src/PhpPresentation/Writer/PowerPoint2007/PptSlideMasters.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function writeSlideMasterRelationships(SlideMaster $oMasterSlide)
5555
$slideLayout->relationId = 'rId' . $relId;
5656
}
5757
// Write drawing relationships?
58-
$this->writeDrawingRelations($oMasterSlide, $objWriter, $relId);
58+
$this->writeDrawingRelations($oMasterSlide, $objWriter, ++$relId);
5959
// TODO: Write hyperlink relationships?
6060
// TODO: Write comment relationships
6161
// Relationship theme/theme1.xml

0 commit comments

Comments
 (0)