Skip to content

Commit eb5e3c6

Browse files
committed
#226 : PowerPoint97 Reader : Support of Slide Note
1 parent 8d69b2f commit eb5e3c6

File tree

4 files changed

+246
-23
lines changed

4 files changed

+246
-23
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
### Features
1616
- ODPresentation Writer : Show/Hide Value / Name / Series Name in Chart - @Progi1984 GH-272
1717
- ODPresentation Writer : Axis Bounds in Chart - @Progi1984 GH-269
18+
- PowerPoint97 Reader : Support of Slide Note - @Progi1984 GH-226
1819
- PowerPoint2007 Reader : Support of Shape Table - @Progi1984 GH-240
1920
- PowerPoint2007 Reader : Support of Slide Note - @Progi1984 GH-226
2021
- PowerPoint2007 Writer : Implement character spacing - @jvanoostrom GH-301

samples/Sample_12_Reader_PowerPoint2007.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use PhpOffice\PhpPresentation\Shape\RichText;
1010

1111
$pptReader = IOFactory::createReader('PowerPoint2007');
12-
$oPHPPresentation = $pptReader->load('results/Sample_01_Simple.pptx');
12+
$oPHPPresentation = $pptReader->load('resources/Sample_12.pptx');
1313

1414
$oTree = new PhpPptTree($oPHPPresentation);
1515
echo $oTree->display();

samples/Sample_Header.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,12 @@ protected function displayPhpPresentationInfo(PhpPresentation $oPHPPpt)
299299
}
300300
}
301301
$oNote = $oSlide->getNote();
302-
foreach ($oNote->getShapeCollection() as $oShape) {
302+
if ($oNote->getShapeCollection()->count() > 0) {
303303
$this->append('<dt>Notes</dt>');
304-
if ($oShape instanceof RichText) {
305-
$this->append('<dd>' . $oShape->getPlainText() . '</dd>');
304+
foreach ($oNote->getShapeCollection() as $oShape) {
305+
if ($oShape instanceof RichText) {
306+
$this->append('<dd>' . $oShape->getPlainText() . '</dd>');
307+
}
306308
}
307309
}
308310

0 commit comments

Comments
 (0)