Skip to content

Commit d24e74e

Browse files
author
Peter Lind
committed
Revert "fixing issue #330: background images do not work for master slides"
This reverts commit 87b646f.
1 parent 87b646f commit d24e74e

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/PhpPresentation/Writer/PowerPoint2007/PptSlideMasters.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use PhpOffice\PhpPresentation\Slide;
1212
use PhpOffice\PhpPresentation\Slide\SlideMaster;
1313
use PhpOffice\PhpPresentation\Style\SchemeColor;
14-
use PhpOffice\PhpPresentation\Slide\Background\Image;
1514

1615
class PptSlideMasters extends AbstractSlide
1716
{
@@ -25,13 +24,6 @@ public function render()
2524
$this->oZip->addFromString('ppt/slideMasters/_rels/slideMaster' . $oMasterSlide->getRelsIndex() . '.xml.rels', $this->writeSlideMasterRelationships($oMasterSlide));
2625
// Add the information from the masterSlide to the ZIP file
2726
$this->oZip->addFromString('ppt/slideMasters/slideMaster' . $oMasterSlide->getRelsIndex() . '.xml', $this->writeSlideMaster($oMasterSlide));
28-
29-
// Add background image slide
30-
$oBkgImage = $oMasterSlide->getBackground();
31-
if ($oBkgImage instanceof Image) {
32-
$this->oZip->addFromString('ppt/media/' . $oBkgImage->getIndexedFilename($oMasterSlide->getRelsIndex()), file_get_contents($oBkgImage->getPath()));
33-
}
34-
3527
}
3628

3729
return $this->oZip;
@@ -66,13 +58,6 @@ public function writeSlideMasterRelationships(SlideMaster $oMasterSlide)
6658
// Write drawing relationships?
6759
$relId = $this->writeDrawingRelations($oMasterSlide, $objWriter, ++$relId);
6860

69-
// Write background relationships?
70-
$oBackground = $oMasterSlide->getBackground();
71-
if ($oBackground instanceof Image) {
72-
$this->writeRelationship($objWriter, ++$relId, 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', '../media/' . $oBackground->getIndexedFilename($oMasterSlide->getRelsIndex()));
73-
$oBackground->relationId = 'rId' . $relId;
74-
}
75-
7661
// TODO: Write hyperlink relationships?
7762
// TODO: Write comment relationships
7863
// Relationship theme/theme1.xml

0 commit comments

Comments
 (0)