Skip to content

Commit b70f7ea

Browse files
committed
Merge pull request #174 from PHPOffice/develop
Version 0.6
2 parents 464b206 + 123a168 commit b70f7ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1358
-86
lines changed

.travis_shell_after_success.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ echo "TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG"
55
echo "TRAVIS_PHP_VERSION: $TRAVIS_PHP_VERSION"
66
echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST"
77

8-
##if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPPresentation" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then
9-
if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPPowerPoint" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then
8+
if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPPresentation" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then
109

1110
echo -e "Publishing PHPDoc...\n"
1211

@@ -16,8 +15,7 @@ if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPPowerPoint" ] && [ "$TRAVIS_PULL_REQUE
1615
cd $HOME
1716
git config --global user.email "[email protected]"
1817
git config --global user.name "travis-ci"
19-
## git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/PHPOffice/PHPPresentation gh-pages > /dev/null
20-
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/PHPOffice/PHPPowerPoint gh-pages > /dev/null
18+
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/PHPOffice/PHPPresentation gh-pages > /dev/null
2119

2220
cd gh-pages
2321
echo "--DEBUG : Suppression"

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
# Changelog
2+
## 0.6.0 - 2016-01-24
3+
4+
### Bugfix
5+
- Documentation : Fixes in the rename of PHPPowerPoint - @Progi1984 GH-127
6+
- ODPresentation : Exclude SVM files for reader - @Progi1984 GH-141
7+
- PowerPoint2007 Writer : Bugfix for opening PPTX on Mac - @thsteinmetz GH-89
8+
9+
### Changes
10+
- PhpOffice\PhpPresentation\getProperties has been deprecated for PhpOffice\PhpPresentation\getDocumentProperties - @Progi1984 GH-154
11+
- PhpOffice\PhpPresentation\setProperties has been deprecated for PhpOffice\PhpPresentation\setDocumentProperties - @Progi1984 GH-154
12+
- PhpOffice\PhpPowerpoint\Style\Alignment::setLevel can now be defined great than 8 - @Progi1984 GH-141
13+
14+
### Features
15+
- ODPresentation Reader/Writer : Name of the slide - @Progi1984 GH-121
16+
- ODPresentation Reader/Writer : Slide Background Color or Image - @Progi1984 GH-152
17+
- PowerPoint2007 Reader : Support for Layout Name - @Progi1984 GH-144
18+
- PowerPoint2007 Reader/Writer : Mark as final - @Progi1984 GH-118
19+
- PowerPoint2007 Reader/Writer : Set default zoom value for presentation - @Progi1984 GH-122
20+
- PowerPoint2007 Reader/Writer : Slide Background Color or Image - @Progi1984 GH-152
21+
- PowerPoint2007 Reader/Writer : Add Properties for allowing loop continuously until 'Esc' - @Progi1984 GH-154
22+
223
## 0.5.0 - 2015-10-08
324

425
### Features

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ![PHPPresentation](https://github.com/PHPOffice/PHPPresentation/raw/master/docs/images/PHPPowerPointLogo.png "PHPPresentation")
22

33
[![Latest Stable Version](https://poser.pugx.org/phpoffice/phppowerpoint/v/stable.png)](https://packagist.org/packages/phpoffice/phppowerpoint)
4-
[![Build Status](https://travis-ci.org/PHPOffice/PHPPowerPoint.svg?branch=master)](https://travis-ci.org/PHPOffice/PHPPowerPoint)
4+
[![Build Status](https://travis-ci.org/PHPOffice/PHPPresentation.svg?branch=master)](https://travis-ci.org/PHPOffice/PHPPresentation)
55
[![Code Quality](https://scrutinizer-ci.com/g/PHPOffice/PHPPowerPoint/badges/quality-score.png?s=b5997ce59ac2816b4514f3a38de9900f6d492c1d)](https://scrutinizer-ci.com/g/PHPOffice/PHPPowerPoint/)
66
[![Code Coverage](https://scrutinizer-ci.com/g/PHPOffice/PHPPowerPoint/badges/coverage.png?s=742a98745725c562955440edc8d2c39d7ff5ae25)](https://scrutinizer-ci.com/g/PHPOffice/PHPPowerPoint/)
77
[![Total Downloads](https://poser.pugx.org/phpoffice/phppowerpoint/downloads.png)](https://packagist.org/packages/phpoffice/phppowerpoint)
@@ -11,7 +11,7 @@
1111

1212
PHPPresentation is a library written in pure PHP that provides a set of classes to write to different presentation file formats, i.e. Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML) or OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF).
1313

14-
PHPPresentation is an open source project licensed under the terms of [LGPL version 3](https://github.com/PHPOffice/PHPPresentation/blob/develop/COPYING.LESSER). PHPPresentation is aimed to be a high quality software product by incorporating [continuous integration](https://travis-ci.org/PHPOffice/PHPPowerPoint) and [unit testing](http://phpoffice.github.io/PHPPresentation/coverage/develop/). You can learn more about PHPPresentation by reading the [Developers' Documentation](http://phppowerpoint.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPPresentation/docs/develop/).
14+
PHPPresentation is an open source project licensed under the terms of [LGPL version 3](https://github.com/PHPOffice/PHPPresentation/blob/develop/COPYING.LESSER). PHPPresentation is aimed to be a high quality software product by incorporating [continuous integration](https://travis-ci.org/PHPOffice/PHPPresentation) and [unit testing](http://phpoffice.github.io/PHPPresentation/coverage/develop/). You can learn more about PHPPresentation by reading the [Developers' Documentation](http://phppowerpoint.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPPresentation/docs/develop/).
1515

1616
Read more about PHPPresentation:
1717

@@ -79,7 +79,7 @@ require_once 'src/PhpPresentation/Autoloader.php';
7979
// with Composer
8080
require_once 'vendor/autoload.php';
8181

82-
use PhpOffice\PhpPresentation\PhpPowerpoint;
82+
use PhpOffice\PhpPresentation\PhpPresentation;
8383
use PhpOffice\PhpPresentation\IOFactory;
8484
use PhpOffice\PhpPresentation\Style\Color;
8585
use PhpOffice\PhpPresentation\Style\Alignment;

docs/faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ the verbose class names will need to be updated accordingly.
5050

5151
Why PHPPowerPoint become PHPPresentation ?
5252
------------------------------------------
53-
As `Roman Syroeshko noticed us <https://github.com/PHPOffice/PHPPowerPoint/issues/25>`__, PowerPoint is a `trademark <http://www.microsoft.com/en-us/legal/IntellectualProperty/Trademarks/EN-US.aspx#332b86b0-befe-4b89-862e-d538e2a653e0>`__.
53+
As `Roman Syroeshko noticed us <https://github.com/PHPOffice/PHPPresentation/issues/25>`__, PowerPoint is a `trademark <http://www.microsoft.com/en-us/legal/IntellectualProperty/Trademarks/EN-US.aspx#332b86b0-befe-4b89-862e-d538e2a653e0>`__.
5454
For avoiding any problems with Microsoft, we decide to change the name to a more logic name, with our panel of readers/writers.

docs/intro.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,16 @@ Writers
4242
+---------------------------+----------------------+--------+-------+-------+-------+
4343
| Features | | PPTX | ODP | HTML | PDF |
4444
+===========================+======================+========+=======+=======+=======+
45+
| **Document** | Mark as final || | | |
46+
+---------------------------+----------------------+--------+-------+-------+-------+
4547
| **Document Properties** | Standard ||| | |
4648
+---------------------------+----------------------+--------+-------+-------+-------+
4749
| | Custom | | | | |
4850
+---------------------------+----------------------+--------+-------+-------+-------+
51+
| **Slides** | ||| | |
52+
+---------------------------+----------------------+--------+-------+-------+-------+
53+
| | Name | || | |
54+
+---------------------------+----------------------+--------+-------+-------+-------+
4955
| **Element Shape** | Image ||| | |
5056
+---------------------------+----------------------+--------+-------+-------+-------+
5157
| | Hyperlink ||| | |
@@ -74,10 +80,16 @@ Readers
7480
+---------------------------+----------------------+--------+-------+-------+-------+-------+
7581
| Features | | PPTX | ODP | HTML | PDF | PPT |
7682
+===========================+======================+========+=======+=======+=======+=======+
83+
| **Document** | Mark as final || | | | |
84+
+---------------------------+----------------------+--------+-------+-------+-------+-------+
7785
| **Document Properties** | Standard ||| | | |
7886
+---------------------------+----------------------+--------+-------+-------+-------+-------+
7987
| | Custom | | | | | |
8088
+---------------------------+----------------------+--------+-------+-------+-------+-------+
89+
| **Slides** | ||| | | |
90+
+---------------------------+----------------------+--------+-------+-------+-------+-------+
91+
| | Name | || | | |
92+
+---------------------------+----------------------+--------+-------+-------+-------+-------+
8193
| **Element Shape** | Image ||| | ||
8294
+---------------------------+----------------------+--------+-------+-------+-------+-------+
8395
| | Hyperlink ||| | ||

docs/recipes.rst

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,49 @@
33
Recipes
44
=======
55

6-
Title
7-
-----------------------
6+
How to define the zoom of a presentation ?
7+
------------------------------------------
88

9-
Recipe Text
9+
You must define the zoom of your presentation with the method ``setZoom()``
1010

1111
.. code-block:: php
1212
13-
$content;
13+
// Default
14+
$zoom = $oPHPPresentation->getZoom();
15+
// $zoom = 1
16+
17+
// Without parameter
18+
$oPHPPresentation->setZoom();
19+
$zoom = $oPHPPresentation->getZoom();
20+
// $zoom = true
21+
22+
// Parameter = false
23+
$oPHPPresentation->setZoom(2.8);
24+
$zoom = $oPHPPresentation->getZoom();
25+
// $zoom = 2.8
26+
27+
How to mark a presentation as final ?
28+
-------------------------------------
29+
30+
You must define your presentation as it with the method ``markAsFinal()``
31+
32+
.. code-block:: php
33+
34+
// Default
35+
$state = $oPHPPresentation->isMarkedAsFinal();
36+
// $state = false
37+
38+
// Without parameter
39+
$oPHPPresentation->markAsFinal();
40+
$state = $oPHPPresentation->isMarkedAsFinal();
41+
// $state = true
42+
43+
// Parameter = false
44+
$oPHPPresentation->markAsFinal(false);
45+
$state = $oPHPPresentation->isMarkedAsFinal();
46+
// $state = false
47+
48+
// Parameter = true
49+
$oPHPPresentation->markAsFinal(true);
50+
$state = $oPHPPresentation->isMarkedAsFinal();
51+
// $state = true

docs/slides.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,14 @@ Slides
44
======
55

66
Slides are pages in a presentation. Slides are stored as a zero based array in ``PHPPresentation`` object. Use ``createSlide`` to create a new slide and retrieve the slide for other operation such as creating shapes for that slide.
7+
8+
Name
9+
-------
10+
11+
By default, a slide has not a name.
12+
You can define it with the method ``setName``.
13+
14+
.. code-block:: php
15+
16+
$oSlide = $oPHPPresentation->createSlide();
17+
$oSlide->setName('Title of the slide');

samples/Sample_13_MarkAsFinal.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
include_once 'Sample_Header.php';
4+
5+
use PhpOffice\PhpPresentation\PhpPresentation;
6+
use PhpOffice\PhpPresentation\Style\Alignment;
7+
use PhpOffice\PhpPresentation\Style\Color;
8+
9+
// Create new PHPPresentation object
10+
echo date('H:i:s') . ' Create new PHPPresentation object' . EOL;
11+
$objPHPPresentation = new PhpPresentation();
12+
13+
// Mark the document as final
14+
$objPHPPresentation->markAsFinal(true);
15+
16+
// Create slide
17+
echo date('H:i:s') . ' Create slide'.EOL;
18+
$currentSlide = $objPHPPresentation->getActiveSlide();
19+
$currentSlide->addShape(clone $oShapeDrawing);
20+
$currentSlide->addShape(clone $oShapeRichText);
21+
22+
// Save file
23+
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
24+
if (!CLI) {
25+
include_once 'Sample_Footer.php';
26+
}

samples/Sample_14_Zoom.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
include_once 'Sample_Header.php';
4+
5+
use PhpOffice\PhpPresentation\PhpPresentation;
6+
use PhpOffice\PhpPresentation\Style\Alignment;
7+
use PhpOffice\PhpPresentation\Style\Color;
8+
9+
// Create new PHPPresentation object
10+
echo date('H:i:s') . ' Create new PHPPresentation object' . EOL;
11+
$objPHPPresentation = new PhpPresentation();
12+
13+
// Set the zoom to 200%
14+
$objPHPPresentation->setZoom(3);
15+
16+
// Create slide
17+
echo date('H:i:s') . ' Create slide'.EOL;
18+
$currentSlide = $objPHPPresentation->getActiveSlide();
19+
$currentSlide->addShape(clone $oShapeDrawing);
20+
$currentSlide->addShape(clone $oShapeRichText);
21+
22+
// Save file
23+
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
24+
if (!CLI) {
25+
include_once 'Sample_Footer.php';
26+
}

samples/Sample_15_Background.php

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
include_once 'Sample_Header.php';
4+
5+
use PhpOffice\PhpPresentation\PhpPresentation;
6+
use PhpOffice\PhpPresentation\Slide\Background\Color;
7+
use PhpOffice\PhpPresentation\Style\Color as StyleColor;
8+
use \PhpOffice\PhpPresentation\Slide\Background\Image;
9+
10+
// Create new PHPPresentation object
11+
echo date('H:i:s') . ' Create new PHPPresentation object' . EOL;
12+
$objPHPPresentation = new PhpPresentation();
13+
14+
// Create slide
15+
echo date('H:i:s') . ' Create slide'.EOL;
16+
$oSlide1 = $objPHPPresentation->getActiveSlide();
17+
$oSlide1->addShape(clone $oShapeDrawing);
18+
$oSlide1->addShape(clone $oShapeRichText);
19+
20+
// Slide > Background > Color
21+
$oBkgColor = new Color();
22+
$oBkgColor->setColor(new StyleColor(StyleColor::COLOR_DARKGREEN));
23+
$oSlide1->setBackground($oBkgColor);
24+
25+
// Create slide
26+
echo date('H:i:s') . ' Create slide'.EOL;
27+
$oSlide2 = $objPHPPresentation->createSlide();
28+
$oSlide2->addShape(clone $oShapeDrawing);
29+
$oSlide2->addShape(clone $oShapeRichText);
30+
31+
// Slide > Background > Image
32+
/*
33+
* @link : http://publicdomainarchive.com/public-domain-images-cave-red-rocks-light-beam-cavern/
34+
*/
35+
$oBkgImage = new Image();
36+
$oBkgImage->setPath('./resources/background.jpg');
37+
$oSlide2->setBackground($oBkgImage);
38+
39+
// Save file
40+
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
41+
if (!CLI) {
42+
include_once 'Sample_Footer.php';
43+
}

0 commit comments

Comments
 (0)