From c0ef044cb9d1df3652964dad80c423fa13289586 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 12 Aug 2014 09:08:28 +0200 Subject: [PATCH] PowerPoint2007 Writer : Keynote incompatibility (CodePlex#237322) (Fix PHPCS + UnitTests) --- src/PhpPowerpoint/Writer/PowerPoint2007.php | 4 ++-- src/PhpPowerpoint/Writer/PowerPoint2007/PptProps.php | 4 ++-- .../Tests/Writer/PowerPoint2007/PptPropsTest.php | 8 -------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/PhpPowerpoint/Writer/PowerPoint2007.php b/src/PhpPowerpoint/Writer/PowerPoint2007.php index ddfe84021..c9a0e6bf0 100644 --- a/src/PhpPowerpoint/Writer/PowerPoint2007.php +++ b/src/PhpPowerpoint/Writer/PowerPoint2007.php @@ -214,8 +214,8 @@ public function save($pFilename) $objZip->addFromString('[Content_Types].xml', $wPartContentTypes->writeContentTypes($this->presentation)); // Add PPT properties and styles to ZIP file - Required for Apple Keynote compatibility. - $objZip->addFromString('ppt/presProps.xml', $wPptProps->writePresProps($this->presentation)); - $objZip->addFromString('ppt/tableStyles.xml', $wPptProps->writeTableStyles($this->presentation)); + $objZip->addFromString('ppt/presProps.xml', $wPptProps->writePresProps()); + $objZip->addFromString('ppt/tableStyles.xml', $wPptProps->writeTableStyles()); // Add relationships to ZIP file $objZip->addFromString('_rels/.rels', $wPartRels->writeRelationships()); diff --git a/src/PhpPowerpoint/Writer/PowerPoint2007/PptProps.php b/src/PhpPowerpoint/Writer/PowerPoint2007/PptProps.php index 0467b11a8..0495db31d 100644 --- a/src/PhpPowerpoint/Writer/PowerPoint2007/PptProps.php +++ b/src/PhpPowerpoint/Writer/PowerPoint2007/PptProps.php @@ -28,7 +28,7 @@ class PptProps extends AbstractPart * @return string XML Output * @throws \Exception */ - public function writePresProps(PhpPowerpoint $pPHPPowerPoint = null) + public function writePresProps() { // Create XML writer $objWriter = $this->getXMLWriter(); @@ -85,7 +85,7 @@ public function writePresProps(PhpPowerpoint $pPHPPowerPoint = null) * @return string XML Output * @throws \Exception */ - public function writeTableStyles(PhpPowerpoint $pPHPPowerPoint = null) + public function writeTableStyles() { // Create XML writer $objWriter = $this->getXMLWriter(); diff --git a/tests/PhpPowerpoint/Tests/Writer/PowerPoint2007/PptPropsTest.php b/tests/PhpPowerpoint/Tests/Writer/PowerPoint2007/PptPropsTest.php index 5eb308ccc..27cc81577 100644 --- a/tests/PhpPowerpoint/Tests/Writer/PowerPoint2007/PptPropsTest.php +++ b/tests/PhpPowerpoint/Tests/Writer/PowerPoint2007/PptPropsTest.php @@ -18,16 +18,8 @@ namespace PhpOffice\PhpPowerpoint\Tests\Writer\PowerPoint2007; use PhpOffice\PhpPowerpoint\PhpPowerpoint; -use PhpOffice\PhpPowerpoint\Shared\Drawing; -use PhpOffice\PhpPowerpoint\Style\Alignment; -use PhpOffice\PhpPowerpoint\Style\Bullet; -use PhpOffice\PhpPowerpoint\Style\Color; -use PhpOffice\PhpPowerpoint\Style\Fill; use PhpOffice\PhpPowerpoint\Tests\TestHelperDOCX; use PhpOffice\PhpPowerpoint\Writer\PowerPoint2007; -use PhpOffice\PhpPowerpoint\Style\Border; -use PhpOffice\PhpPowerpoint\Shape\Hyperlink; -use PhpOffice\PhpPowerpoint\Writer\PowerPoint2007\Slide; /** * Test class for PowerPoint2007