Skip to content

Commit 4f40d93

Browse files
authored
Merge pull request #262 from PHPOffice/develop
Version 0.7.0
2 parents b70f7ea + 637bf34 commit 4f40d93

File tree

234 files changed

+15529
-8045
lines changed

Some content is hidden

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

234 files changed

+15529
-8045
lines changed

.codeclimate.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
engines:
2+
phpcodesniffer:
3+
enabled: true
4+
phpmd:
5+
enabled: true
6+
duplication:
7+
enabled: true
8+
config:
9+
languages:
10+
- php
11+
ratings:
12+
paths:
13+
- src/**/*
14+
- tests/**
15+
exclude_paths:
16+
- vendor/**/*

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ php:
1111

1212
matrix:
1313
allow_failures:
14-
- php: 7.0
1514
- php: hhvm
1615

1716
env:
@@ -22,6 +21,8 @@ addons:
2221
apt:
2322
packages:
2423
- graphviz
24+
code_climate:
25+
repo_token: 9d5714bfd25acc27c449c2d71cfb444351a3b91c59ed1a5dc3a50732d2bf45f0
2526

2627
before_script:
2728
## Composer
@@ -51,6 +52,8 @@ after_script:
5152
## Scrutinizer
5253
- wget https://scrutinizer-ci.com/ocular.phar
5354
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
55+
## CodeClimate
56+
- ./vendor/bin/test-reporter
5457

5558
notifications:
5659
webhooks:

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,43 @@
11
# Changelog
2+
3+
## 0.7.0 - 2016-09-12
4+
5+
### Bugfix
6+
- Fixed the image project - @mvargasmoran GH-177
7+
- PowerPoint2007 Writer : Bugfix for printing slide notes - @JewrassicPark @Progi1984 GH-179
8+
9+
### Changes
10+
- PhpOffice\PhpPresentation\Writer\ODPresentation : Move to Design Pattern Decorator - @Progi1984
11+
- PhpOffice\PhpPresentation\Writer\PowerPoint2007 : Move to Design Pattern Decorator - @Progi1984
12+
- PhpOffice\PhpPresentation\Shape\Type\AbstracType\getData has been deprecated for PhpOffice\PhpPresentation\Shape\Type\AbstracType\getSeries - @Progi1984 GH-169
13+
- PhpOffice\PhpPresentation\Shape\Type\AbstracType\setData has been deprecated for PhpOffice\PhpPresentation\Shape\Type\AbstracType\setSeries - @Progi1984 GH-169
14+
- Added documentation for chart series (font, outline, marker) - @Progi1984 GH-169
15+
- Internal Structure for Drawing Shape - @Progi1984 GH-192
16+
- Documentation about manual installation - @danielbair GH-254
17+
18+
### Features
19+
- ODPresentation & PowerPoint2007 Writer : Add support for Comment - @Progi1984 GH-116
20+
- ODPresentation & PowerPoint2007 Writer : Thumbnail of the presentation - @Progi1984 GH-125
21+
- ODPresentation & PowerPoint2007 Writer : Add support for Gridlines in Chart - @Progi1984 GH-129
22+
- ODPresentation & PowerPoint2007 Writer : Support for images in base 64 - @Progi1984 GH-168
23+
- ODPresentation & PowerPoint2007 Writer : Marker of Series in Line & Scatter chart is customizable - @Progi1984 GH-169
24+
- ODPresentation & PowerPoint2007 Writer : Outline of Series in Line & Scatter chart is customizable - @Progi1984 GH-169
25+
- ODPresentation & PowerPoint2007 & Serialized Writer : Support for Zip Adapter - @Progi1984 GH-176
26+
- ODPresentation & PowerPoint2007 Writer : language property to TextElement - @skrajewski & @Progi1984 GH-180
27+
- ODPresentation & PowerPoint2007 Writer : Add Font Support For Chart Axis - @jrking4 GH-186
28+
- ODPresentation & PowerPoint2007 Writer : Support for video - @Progi1984 GH-123
29+
- ODPresentation & PowerPoint2007 Writer : Support for Visibility for slides - @Progi1984
30+
- PowerPoint2007 Reader : Layout Management - @vincentKool @Progi1984 GH-161
31+
- PowerPoint2007 Reader : Slide size - @loverslcn @Progi1984 GH-246
32+
- PowerPoint2007 Reader : Bullet Color - @Progi1984 GH-257
33+
- PowerPoint2007 Reader : Line Spacing - @Progi1984 GH-257
34+
- PowerPoint2007 Writer : Presentation with predefined View Type - @Progi1984 GH-120
35+
- PowerPoint2007 Writer : Implement alpha channel to Fills - @Dayjo GH-203 / @Progi1984 GH-215
36+
- PowerPoint2007 Writer : Implement Animations - @JewrassicPark GH-214 / @Progi1984 GH-217
37+
- PowerPoint2007 Writer : Layout Management - @vincentKool @Progi1984 GH-161
38+
- PowerPoint2007 Writer : Bullet Color - @piotrbelina GH-249
39+
- PowerPoint2007 Writer : Line Spacing - @piotrbelina GH-249
40+
241
## 0.6.0 - 2016-01-24
342

443
### Bugfix

README.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# ![PHPPresentation](https://github.com/PHPOffice/PHPPresentation/raw/master/docs/images/PHPPowerPointLogo.png "PHPPresentation")
1+
# ![PHPPresentation](https://raw.githubusercontent.com/mvargasmoran/PHPPresentation/develop/docs/images/PHPPresentationLogo.png "PHPPresentation")
22

3-
[![Latest Stable Version](https://poser.pugx.org/phpoffice/phppowerpoint/v/stable.png)](https://packagist.org/packages/phpoffice/phppowerpoint)
3+
[![Latest Stable Version](https://poser.pugx.org/phpoffice/phppresentation/v/stable.png)](https://packagist.org/packages/phpoffice/phppresentation)
44
[![Build Status](https://travis-ci.org/PHPOffice/PHPPresentation.svg?branch=master)](https://travis-ci.org/PHPOffice/PHPPresentation)
5-
[![Code Quality](https://scrutinizer-ci.com/g/PHPOffice/PHPPowerPoint/badges/quality-score.png?s=b5997ce59ac2816b4514f3a38de9900f6d492c1d)](https://scrutinizer-ci.com/g/PHPOffice/PHPPowerPoint/)
6-
[![Code Coverage](https://scrutinizer-ci.com/g/PHPOffice/PHPPowerPoint/badges/coverage.png?s=742a98745725c562955440edc8d2c39d7ff5ae25)](https://scrutinizer-ci.com/g/PHPOffice/PHPPowerPoint/)
7-
[![Total Downloads](https://poser.pugx.org/phpoffice/phppowerpoint/downloads.png)](https://packagist.org/packages/phpoffice/phppowerpoint)
8-
[![License](https://poser.pugx.org/phpoffice/phppowerpoint/license.png)](https://packagist.org/packages/phpoffice/phppowerpoint)
9-
[![Join the chat at https://gitter.im/PHPOffice/PHPPowerPoint](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/PHPOffice/PHPPowerPoint)
5+
[![Code Climate](https://codeclimate.com/github/PHPOffice/PHPPresentation/badges/gpa.svg)](https://codeclimate.com/github/PHPOffice/PHPPresentation)
6+
[![Test Coverage](https://codeclimate.com/github/PHPOffice/PHPPresentation/badges/coverage.svg)](https://codeclimate.com/github/PHPOffice/PHPPresentation/coverage)
7+
[![Total Downloads](https://poser.pugx.org/phpoffice/phppresentation/downloads.png)](https://packagist.org/packages/phpoffice/phppresentation)
8+
[![License](https://poser.pugx.org/phpoffice/phppresentation/license.png)](https://packagist.org/packages/phpoffice/phppresentation)
9+
[![Join the chat at https://gitter.im/PHPOffice/PHPPresentation](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/PHPOffice/PHPPresentation)
1010

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/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/).
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://phppresentation.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPPresentation/docs/develop/).
1515

1616
Read more about PHPPresentation:
1717

@@ -20,7 +20,7 @@ Read more about PHPPresentation:
2020
- [Installation](#installation)
2121
- [Getting started](#getting-started)
2222
- [Contributing](#contributing)
23-
- [Developers' Documentation](http://phppowerpoint.readthedocs.org/)
23+
- [Developers' Documentation](http://phppresentation.readthedocs.org/)
2424
- [API Documentation](http://phpoffice.github.io/PHPPresentation/docs/master/)
2525

2626
### Features
@@ -48,6 +48,8 @@ PHPPresentation requires the following:
4848

4949
### Installation
5050

51+
#### Composer method
52+
5153
It is recommended that you install the PHPPresentation library [through composer](http://getcomposer.org/). To do so, add
5254
the following lines to your ``composer.json``.
5355

@@ -59,14 +61,25 @@ the following lines to your ``composer.json``.
5961
}
6062
```
6163

62-
Alternatively, you can download the latest release from the [releases page](https://github.com/PHPOffice/PHPPresentation/releases).
63-
In this case, you will have to register the autoloader. Register autoloading is required only if you do not use composer in your project.
64+
#### Manual download method
65+
66+
Alternatively, you can download the latest release from the [releases page](https://github.com/PHPOffice/PHPPresentation/releases).
67+
In this case, you will have to register the autoloader.
68+
(Register autoloading is required only if you do not use composer in your project.)
6469

6570
```php
6671
require_once 'path/to/PhpPresentation/src/PhpPresentation/Autoloader.php';
6772
\PhpOffice\PhpPresentation\Autoloader::register();
6873
```
6974

75+
You will also need to download the latest PHPOffice/Common release from its [releases page](https://github.com/PHPOffice/Common/releases).
76+
And you will also have to register its autoloader, too.
77+
78+
```php
79+
require_once 'path/to/PhpOffice/Common/src/Common/Autoloader.php';
80+
\PhpOffice\Common\Autoloader::register();
81+
```
82+
7083
## Getting started
7184

7285
The following is a basic usage example of the PHPPresentation library.
@@ -75,6 +88,8 @@ The following is a basic usage example of the PHPPresentation library.
7588
// with your own install
7689
require_once 'src/PhpPresentation/Autoloader.php';
7790
\PhpOffice\PhpPresentation\Autoloader::register();
91+
require_once 'src/Common/Autoloader.php';
92+
\PhpOffice\Common\Autoloader::register();
7893

7994
// with Composer
8095
require_once 'vendor/autoload.php';
@@ -119,7 +134,7 @@ $oWriterODP = IOFactory::createWriter($objPHPPowerPoint, 'ODPresentation');
119134
$oWriterODP->save(__DIR__ . "/sample.odp");
120135
```
121136

122-
More examples are provided in the [samples folder](samples/). You can also read the [Developers' Documentation](http://phppowerpoint.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPPresentation/docs/master/) for more detail.
137+
More examples are provided in the [samples folder](samples/). You can also read the [Developers' Documentation](http://phppresentation.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPPresentation/docs/master/) for more detail.
123138

124139

125140
## Contributing

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.0
1+
0.6.0

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@
2222
"php": ">=5.3.0",
2323
"ext-xml": "*",
2424
"ext-zip": "*",
25-
"phpoffice/common": "0.2.*"
25+
"phpoffice/common": "0.2.*"
2626
},
2727
"require-dev": {
2828
"phpunit/phpunit": "3.7.*",
2929
"phpdocumentor/phpdocumentor":"2.*",
3030
"phpmd/phpmd": "2.*",
3131
"sebastian/phpcpd": "2.*",
3232
"phploc/phploc": "2.*",
33-
"squizlabs/php_codesniffer": "2.*"
33+
"squizlabs/php_codesniffer": "2.*",
34+
"codeclimate/php-test-reporter": "dev-master"
3435
},
3536
"suggest": {
3637
"ext-gd2": "Required to add images"

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/general.rst

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Document information
5353
--------------------
5454

5555
You can set the document information such as title, creator, and company
56-
name. Use the following functions:
56+
name. Use the following functions :
5757

5858
.. code-block:: php
5959
@@ -69,3 +69,76 @@ name. Use the following functions:
6969
$properties->setSubject('My subject');
7070
$properties->setKeywords('my, key, word');
7171
72+
73+
Presentation Properties
74+
-----------------------
75+
76+
You can define some properties which are relative to the presentation, like the zoom or the thumbnail.
77+
78+
Comments
79+
````````
80+
81+
You can define if the presentation display or not the comments with the method ``setCommentVisible``.
82+
83+
.. code-block:: php
84+
85+
$oPresentation = new PhpPresentation();
86+
$oProperties = $oPresentation->getPresentationProperties();
87+
// Get the display for comment
88+
var_export($oProperties->isCommentVisible());
89+
// Output : false
90+
// Enable the display for comment
91+
$oProperties->setCommentVisible(true);
92+
// Get the display for comment
93+
var_export($oProperties->isCommentVisible());
94+
// Output : true
95+
96+
Last View
97+
`````````
98+
99+
You can define the last view of the presentation with the method ``setLastView``.
100+
101+
.. code-block:: php
102+
103+
$oPresentation = new PhpPresentation();
104+
$oProperties = $oPresentation->getPresentationProperties();
105+
// Get the last view of the presentation
106+
echo $oProperties->getZoom();
107+
// Output : PresentationProperties::VIEW_SLIDE
108+
// Set the last view of the presentation
109+
$oProperties->setLastView(PresentationProperties::VIEW_NOTES);
110+
// Get the last view of the presentation
111+
echo $oProperties->getZoom();
112+
// Output : PresentationProperties::VIEW_NOTES
113+
114+
Thumbnail
115+
`````````
116+
117+
You can define the thumbnail of the presentation with the method ``setThumbnailPath``.
118+
119+
.. code-block:: php
120+
121+
$oPresentation = new PhpPresentation();
122+
$oProperties = $oPresentation->getPresentationProperties();
123+
// Set path of the thumbnail
124+
$oProperties->setThumbnailPath(__DIR__.'\resources\phppowerpoint_logo.gif');
125+
// Get path of the thumbnail
126+
echo $oProperties->getThumbnailPath();
127+
128+
Zoom
129+
````
130+
131+
You can define the zoom of the presentation with the method ``setZoom``.
132+
133+
.. code-block:: php
134+
135+
$oPresentation = new PhpPresentation();
136+
$oProperties = $oPresentation->getPresentationProperties();
137+
// Get zoom of the presentation
138+
echo $oProperties->getZoom();
139+
// Output : 1
140+
// Set zoom of the presentation (3 = 300%)
141+
$oProperties->setZoom(3);
142+
// Get zoom of the presentation
143+
echo $oProperties->getZoom();
144+
// Output : 3

docs/images/PHPPowerPointLogo.png

-4.74 KB
Binary file not shown.

docs/images/PHPPresentationLogo.png

34.9 KB
Loading

0 commit comments

Comments
 (0)