Skip to content

Commit 5e8e5e1

Browse files
committed
#154 : Allow Loop Continuously until Esc
1 parent 708985a commit 5e8e5e1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/PhpPresentation/Writer/PowerPoint2007/PptProps.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ class PptProps extends AbstractPart
2727
* @return string XML Output
2828
* @throws \Exception
2929
*/
30-
public function writePresProps()
30+
public function writePresProps(PhpPresentation $pPhpPresentation)
3131
{
32+
$presentationPpts = $pPhpPresentation->getPresentationProperties();
33+
3234
// Create XML writer
3335
$objWriter = $this->getXMLWriter();
3436

@@ -40,6 +42,13 @@ public function writePresProps()
4042
$objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main');
4143
$objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships');
4244
$objWriter->writeAttribute('xmlns:p', 'http://schemas.openxmlformats.org/presentationml/2006/main');
45+
46+
// p:presentationPr > p:showPr
47+
if ($presentationPpts->isLoopContinuouslyUntilEsc()) {
48+
$objWriter->startElement('p:showPr');
49+
$objWriter->writeAttribute('loop', '1');
50+
$objWriter->endElement();
51+
}
4352

4453
// p:extLst
4554
$objWriter->startElement('p:extLst');

0 commit comments

Comments
 (0)