Skip to content

Commit df9c0ea

Browse files
committed
PowerPoint2007 Writer : Keynote incompatibility (GH-46) (Unit Tests)
1 parent 9b8e321 commit df9c0ea

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/PhpPowerpoint/Writer/PowerPoint2007/ContentTypes.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ public function writeContentTypes(PHPPowerPoint $pPHPPowerPoint = null)
7777
$this->writeOverrideContentType($objWriter, '/docProps/app.xml', 'application/vnd.openxmlformats-officedocument.extended-properties+xml');
7878
$this->writeOverrideContentType($objWriter, '/docProps/core.xml', 'application/vnd.openxmlformats-package.core-properties+xml');
7979

80-
8180
// Slide masters
8281
$masterSlides = $parentWriter->getLayoutPack()->getMasterSlides();
8382
foreach ($masterSlides as $masterSlide) {

src/PhpPowerpoint/Writer/PowerPoint2007/PptProps.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public function writeTableStyles()
100100

101101
return $objWriter->getData();
102102
}
103+
103104
/**
104105
* Write ppt/viewProps.xml to XML format
105106
*

tests/PhpPowerpoint/Tests/Writer/PowerPoint2007/PptPropsTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,14 @@ public function testTableStyles()
5555
$this->assertTrue($pres->elementExists($element, 'ppt/tableStyles.xml'));
5656
$this->assertEquals('{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}', $pres->getElementAttribute($element, 'def', 'ppt/tableStyles.xml'));
5757
}
58+
59+
public function testViewProps()
60+
{
61+
$phpPowerPoint = new PhpPowerpoint();
62+
63+
$pres = TestHelperDOCX::getDocument($phpPowerPoint, 'PowerPoint2007');
64+
$element = '/p:viewPr';
65+
$this->assertTrue($pres->elementExists($element, 'ppt/viewProps.xml'));
66+
$this->assertEquals('0', $pres->getElementAttribute($element, 'showComments', 'ppt/tableStyles.xml'));
67+
}
5868
}

0 commit comments

Comments
 (0)