Skip to content

Commit 31505b2

Browse files
committed
#161 : Documentation
1 parent da7f4c8 commit 31505b2

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

docs/credits.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
Credits
44
=======
55

6-
Images from chart page come from the `LibreOffice Core <https://github.com/LibreOffice/core/tree/master/icon-themes/galaxy/chart2/res>`.
6+
Images from chart page come from the `LibreOffice Core <https://github.com/LibreOffice/core/tree/master/icon-themes/galaxy/chart2/res>`.
7+
8+
Some definitions come from the `Office Open XML <http://officeopenxml.com/>`.

docs/slides_layout.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.. _slides_layout:
2+
3+
Slides Layout
4+
=============
5+
6+
A slide is a hierarchy of three components :
7+
- The master slide upon which the slide is based : it specifies such properties as the font styles for the title, body, and footer, placeholder positions for text and objects, bullets styles, and background ;
8+
- The slide layout which is applied to the the slide : it permits to override what is specified in the master slide ;
9+
- The slide itself : it contains content and formatting that is not already specified by the master slide and the slide layout
10+
11+
Placeholders permit to link these three components together in order that the override is possible.
12+
13+
Master slides
14+
-------------
15+
16+
You can access to all master slides with the method ``getAllMasterSlides`` or create on with ``createMasterSlide``.
17+
18+
.. code-block:: php
19+
20+
$array = $oPHPPresentation->getAllMasterSlides();
21+
$oMasterSlide = $oPHPPresentation->createMasterSlide();

src/PhpPresentation/Writer/PowerPoint2007/PptSlideLayouts.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function render()
1717
{
1818
foreach ($this->oPresentation->getAllMasterSlides() as $oSlideMaster) {
1919
foreach ($oSlideMaster->getAllSlideLayouts() as $oSlideLayout) {
20-
$this->oZip->addFromString('ppt/slideLayouts/_rels/slideLayout' . $oSlideLayout->layoutNr . '.xml.rels', $this->writeSlideLayoutRelationships($oSlideLayout->layoutNr, $oSlideMaster->getRelsIndex()));
20+
$this->oZip->addFromString('ppt/slideLayouts/_rels/slideLayout' . $oSlideLayout->layoutNr . '.xml.rels', $this->writeSlideLayoutRelationships($oSlideMaster->getRelsIndex()));
2121
$this->oZip->addFromString('ppt/slideLayouts/slideLayout' . $oSlideLayout->layoutNr . '.xml', $this->writeSlideLayout($oSlideLayout));
2222
}
2323
}
@@ -29,12 +29,11 @@ public function render()
2929
/**
3030
* Write slide layout relationships to XML format
3131
*
32-
* @param int $slideLayoutIndex
3332
* @param int $masterId
3433
* @return string XML Output
3534
* @throws \Exception
3635
*/
37-
public function writeSlideLayoutRelationships($slideLayoutIndex, $masterId = 1)
36+
public function writeSlideLayoutRelationships($masterId = 1)
3837
{
3938
// Create XML writer
4039
$objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);

0 commit comments

Comments
 (0)