Skip to content

Commit 464b206

Browse files
committed
Merge pull request #134 from PHPOffice/develop
Version 0.5.0
2 parents 7d30b8c + 25591b5 commit 464b206

File tree

216 files changed

+7033
-5171
lines changed

Some content is hidden

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

216 files changed

+7033
-5171
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ vendor
2525
/samples/#*
2626
/samples/Github_*.*
2727
/samples/results
28+
/composer.lock

.travis.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
sudo: false
12
language: php
23

34
php:
@@ -17,13 +18,15 @@ env:
1718
global:
1819
- secure: "LtlUOzC8FtqgbqUTmU7EU281NSCb58UFdvnz8lelNIDltBdP4eayN/TsgNIePB4jXg2d2R56ZA6j/grhE/md6jdUkulV355H3GrH/hIZmmQ+F9+87agnwLzb9+MJbqXoiE7VvjY3zGIO09G897SUfsfu6JWEcscYFlsH6KcXM6M="
1920

21+
addons:
22+
apt:
23+
packages:
24+
- graphviz
25+
2026
before_script:
21-
## Packages
22-
- sudo apt-get -qq update > /dev/null
23-
- sudo apt-get -qq install graphviz > /dev/null
2427
## Composer
2528
- composer self-update
26-
- composer install --prefer-source --dev
29+
- composer install --prefer-source
2730
## PHPDocumentor
2831
- mkdir -p build/docs
2932
- mkdir -p build/coverage
@@ -55,4 +58,4 @@ notifications:
5558
- https://webhooks.gitter.im/e/0dbc70ac93ba40880eef
5659
on_success: change # options: [always|never|change] default: always
5760
on_failure: always # options: [always|never|change] default: always
58-
on_start: false # default: false
61+
on_start: false # default: false

.travis_shell_after_success.sh

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +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
89
if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPPowerPoint" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then
910

1011
echo -e "Publishing PHPDoc...\n"
@@ -15,6 +16,7 @@ if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPPowerPoint" ] && [ "$TRAVIS_PULL_REQUE
1516
cd $HOME
1617
git config --global user.email "[email protected]"
1718
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
1820
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/PHPOffice/PHPPowerPoint gh-pages > /dev/null
1921

2022
cd gh-pages

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
# Changelog
2+
## 0.5.0 - 2015-10-08
3+
4+
### Features
5+
- PowerPoint2007 Reader : Initial Commit - @Progi1984 GH-44
6+
- ODPresentation Reader : Initial Commit - @Progi1984 GH-113
7+
8+
### Bugfix
9+
- Fixed the sample in Readme.md - @Progi1984 GH-114
10+
11+
### Changes
12+
- PhpOffice\PhpPowerpoint becomes PhpOffice\PhpPresentation - @Progi1984 GH-25
13+
- PhpOffice\PhpPowerpoint\Style\Font::setStriketrough has been removed : Use setStrikethrough - @Progi1984
14+
- PhpOffice\PhpPowerpoint\AbstractShape::getSlide has been removed - @Progi1984
15+
- PhpOffice\PhpPowerpoint\AbstractShape::setSlide has been removed - @Progi1984
16+
- PhpOffice\PhpPowerpoint\DocumentLayout::getLayoutXmilli has been removed : getCX(DocumentLayout::UNIT_MILLIMETER) - @Progi1984
17+
- PhpOffice\PhpPowerpoint\DocumentLayout::getLayoutYmilli has been removed : getCY(DocumentLayout::UNIT_MILLIMETER) - @Progi1984
18+
- PhpOffice\PhpPowerpoint\DocumentLayout::setLayoutXmilli has been removed : setCX(DocumentLayout::UNIT_MILLIMETER) - @Progi1984
19+
- PhpOffice\PhpPowerpoint\DocumentLayout::setLayoutYmilli has been removed : setCY(DocumentLayout::UNIT_MILLIMETER) - @Progi1984
20+
- Update the dependence PhpOffice\Common to 0.2.* - @Progi1984
21+
- Migrated Travis CI to legacy - @Progi1984 GH-115
22+
223
## 0.4.0 - 2015-07-07
324

425
### Features

LICENSE

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
PHPPowerPoint, a pure PHP library for writing presentations files.
1+
PHPPresentation, a pure PHP library for writing presentations files.
22

3-
Copyright (c) 2010-2014 PHPPowerPoint.
3+
Copyright (c) 2010-2015 PHPPresentation.
44

5-
PHPPowerPoint is free software: you can redistribute it and/or modify
5+
PHPPresentation is free software: you can redistribute it and/or modify
66
it under the terms of the GNU Lesser General Public License version 3 as published by
77
the Free Software Foundation.
88

9-
PHPPowerPoint is distributed in the hope that it will be useful,
9+
PHPPresentation is distributed in the hope that it will be useful,
1010
but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1212
GNU Lesser General Public License version 3 for more details.
1313

1414
You should have received a copy of the GNU Lesser General Public License version 3
15-
along with PHPPowerPoint. If not, see <http://www.gnu.org/licenses/>.
15+
along with PHPPresentation. If not, see <http://www.gnu.org/licenses/>.

README.md

+32-24
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ![PHPPowerPoint](https://github.com/PHPOffice/PHPPowerPoint/raw/master/docs/images/PHPPowerPointLogo.png "PHPPowerPoint")
1+
# ![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)
44
[![Build Status](https://travis-ci.org/PHPOffice/PHPPowerPoint.svg?branch=master)](https://travis-ci.org/PHPOffice/PHPPowerPoint)
@@ -9,20 +9,19 @@
99
[![Join the chat at https://gitter.im/PHPOffice/PHPPowerPoint](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/PHPOffice/PHPPowerPoint)
1010

1111

12-
PHPPowerPoint 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).
12+
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-
PHPPowerPoint is an open source project licensed under the terms of [LGPL version 3](https://github.com/PHPOffice/PHPPowerPoint/blob/develop/COPYING.LESSER). PHPPowerPoint 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/PHPPowerPoint/coverage/develop/). You can learn more about PHPPowerPoint by reading the [Developers' Documentation](http://phppowerpoint.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPPowerPoint/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/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/).
1515

16-
Read more about PHPPowerPoint:
16+
Read more about PHPPresentation:
1717

1818
- [Features](#features)
1919
- [Requirements](#requirements)
2020
- [Installation](#installation)
2121
- [Getting started](#getting-started)
22-
- [Known issues](#known-issues)
2322
- [Contributing](#contributing)
2423
- [Developers' Documentation](http://phppowerpoint.readthedocs.org/)
25-
- [API Documentation](http://phpoffice.github.io/PHPPowerPoint/docs/master/)
24+
- [API Documentation](http://phpoffice.github.io/PHPPresentation/docs/master/)
2625

2726
### Features
2827

@@ -40,7 +39,7 @@ Read more about PHPPowerPoint:
4039

4140
### Requirements
4241

43-
PHPPowerPoint requires the following:
42+
PHPPresentation requires the following:
4443

4544
- PHP 5.3+
4645
- [Zip extension](http://php.net/manual/en/book.zip.php)
@@ -49,42 +48,51 @@ PHPPowerPoint requires the following:
4948

5049
### Installation
5150

52-
It is recommended that you install the PHPPowerPoint library [through composer](http://getcomposer.org/). To do so, add
51+
It is recommended that you install the PHPPresentation library [through composer](http://getcomposer.org/). To do so, add
5352
the following lines to your ``composer.json``.
5453

5554
```json
5655
{
5756
"require": {
58-
"phpoffice/phppowerpoint": "dev-master"
57+
"phpoffice/phppresentation": "dev-master"
5958
}
6059
}
6160
```
6261

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

6665
```php
67-
require_once 'path/to/PhpPowerpoint/src/PhpPowerpoint/Autoloader.php';
68-
\PhpOffice\PhpPowerpoint\Autoloader::register();
66+
require_once 'path/to/PhpPresentation/src/PhpPresentation/Autoloader.php';
67+
\PhpOffice\PhpPresentation\Autoloader::register();
6968
```
7069

7170
## Getting started
7271

73-
The following is a basic usage example of the PHPPowerPoint library.
72+
The following is a basic usage example of the PHPPresentation library.
7473

7574
```php
76-
require_once 'src/PhpPowerpoint/Autoloader.php';
77-
\PhpOffice\PhpPowerpoint\Autoloader::register();
75+
// with your own install
76+
require_once 'src/PhpPresentation/Autoloader.php';
77+
\PhpOffice\PhpPresentation\Autoloader::register();
7878

79-
$objPHPPowerPoint = new PhpPowerpoint();
79+
// with Composer
80+
require_once 'vendor/autoload.php';
81+
82+
use PhpOffice\PhpPresentation\PhpPowerpoint;
83+
use PhpOffice\PhpPresentation\IOFactory;
84+
use PhpOffice\PhpPresentation\Style\Color;
85+
use PhpOffice\PhpPresentation\Style\Alignment;
86+
87+
$objPHPPowerPoint = new PhpPresentation();
8088

8189
// Create slide
8290
$currentSlide = $objPHPPowerPoint->getActiveSlide();
8391

8492
// Create a shape (drawing)
8593
$shape = $currentSlide->createDrawingShape();
86-
$shape->setName('PHPPowerPoint logo')
87-
->setDescription('PHPPowerPoint logo')
94+
$shape->setName('PHPPresentation logo')
95+
->setDescription('PHPPresentation logo')
8896
->setPath('./resources/phppowerpoint_logo.gif')
8997
->setHeight(36)
9098
->setOffsetX(10)
@@ -100,7 +108,7 @@ $shape = $currentSlide->createRichTextShape()
100108
->setOffsetX(170)
101109
->setOffsetY(180);
102110
$shape->getActiveParagraph()->getAlignment()->setHorizontal( Alignment::HORIZONTAL_CENTER );
103-
$textRun = $shape->createTextRun('Thank you for using PHPPowerPoint!');
111+
$textRun = $shape->createTextRun('Thank you for using PHPPresentation!');
104112
$textRun->getFont()->setBold(true)
105113
->setSize(60)
106114
->setColor( new Color( 'FFE06B20' ) );
@@ -111,14 +119,14 @@ $oWriterODP = IOFactory::createWriter($objPHPPowerPoint, 'ODPresentation');
111119
$oWriterODP->save(__DIR__ . "/sample.odp");
112120
```
113121

114-
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/PHPPowerPoint/docs/master/) for more detail.
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.
115123

116124

117125
## Contributing
118126

119-
We welcome everyone to contribute to PHPPowerPoint. Below are some of the things that you can do to contribute:
127+
We welcome everyone to contribute to PHPPresentation. Below are some of the things that you can do to contribute:
120128

121-
- Read [our contributing guide](https://github.com/PHPOffice/PHPPowerPoint/blob/master/CONTRIBUTING.md)
122-
- [Fork us](https://github.com/PHPOffice/PHPPowerPoint/fork) and [request a pull](https://github.com/PHPOffice/PHPPowerPoint/pulls) to the [develop](https://github.com/PHPOffice/PHPPowerPoint/tree/develop) branch
123-
- Submit [bug reports or feature requests](https://github.com/PHPOffice/PHPPowerPoint/issues) to GitHub
129+
- Read [our contributing guide](https://github.com/PHPOffice/PHPPresentation/blob/master/CONTRIBUTING.md)
130+
- [Fork us](https://github.com/PHPOffice/PHPPresentation/fork) and [request a pull](https://github.com/PHPOffice/PHPPresentation/pulls) to the [develop](https://github.com/PHPOffice/PHPPresentation/tree/develop) branch
131+
- Submit [bug reports or feature requests](https://github.com/PHPOffice/PHPPresentation/issues) to GitHub
124132
- Follow [@PHPOffice](https://twitter.com/PHPOffice) on Twitter

composer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "phpoffice/phppowerpoint",
3-
"description": "PHPPowerPoint - Read, Create and Write Presentations documents in PHP",
2+
"name": "phpoffice/phppresentation",
3+
"description": "PHPPresentation - Read, Create and Write Presentations documents in PHP",
44
"keywords": ["PHP","PowerPoint","LibreOffice","pptx","ppt","odp","presentations"],
55
"homepage": "http://phpoffice.github.io",
66
"type": "library",
@@ -22,7 +22,7 @@
2222
"php": ">=5.3.0",
2323
"ext-xml": "*",
2424
"ext-zip": "*",
25-
"phpoffice/common": "0.1.*"
25+
"phpoffice/common": "0.2.*"
2626
},
2727
"require-dev": {
2828
"phpunit/phpunit": "3.7.*",
@@ -37,7 +37,7 @@
3737
},
3838
"autoload": {
3939
"psr-4": {
40-
"PhpOffice\\PhpPowerpoint\\": "src/PhpPowerpoint/"
40+
"PhpOffice\\PhpPresentation\\": "src/PhpPresentation/"
4141
}
4242
}
4343
}

docs/conf.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# PhpPowerpoint documentation build configuration file, created by
3+
# PhpPresentation documentation build configuration file, created by
44
# sphinx-quickstart on Fri Mar 14 23:09:26 2014.
55
#
66
# This file is execfile()d with the current directory set to its containing dir.
@@ -40,8 +40,8 @@
4040
master_doc = 'index'
4141

4242
# General information about the project.
43-
project = u'PhpPowerpoint'
44-
copyright = u'2014, PHPPowerPoint Contributors'
43+
project = 'PhpPresentation'
44+
copyright = u'2014, PHPPresentation Contributors'
4545

4646
# The version info for the project you're documenting, acts as replacement for
4747
# |version| and |release|, also used in various other places throughout the
@@ -164,7 +164,7 @@
164164
#html_file_suffix = None
165165

166166
# Output file base name for HTML help builder.
167-
htmlhelp_basename = 'PhpPowerpointdoc'
167+
htmlhelp_basename = 'PhpPresentation'
168168

169169

170170
# -- Options for LaTeX output --------------------------------------------------
@@ -183,8 +183,8 @@
183183
# Grouping the document tree into LaTeX files. List of tuples
184184
# (source start file, target name, title, author, documentclass [howto/manual]).
185185
latex_documents = [
186-
('index', 'PhpPowerpoint.tex', u'PhpPowerpoint Documentation',
187-
u'The PhpPowerpoint Team', 'manual'),
186+
('index', 'PhpPresentation.tex', u'PhpPresentation Documentation',
187+
u'The PhpPresentation Team', 'manual'),
188188
]
189189

190190
# The name of an image file (relative to this directory) to place at the top of
@@ -213,8 +213,8 @@
213213
# One entry per manual page. List of tuples
214214
# (source start file, name, description, authors, manual section).
215215
man_pages = [
216-
('index', 'PhpPowerpoint', u'PhpPowerpoint Documentation',
217-
[u'The PhpPowerpoint Team'], 1)
216+
('index', 'PhpPresentation', u'PhpPresentation Documentation',
217+
[u'The PhpPresentation Team'], 1)
218218
]
219219

220220
# If true, show URL addresses after external links.
@@ -227,8 +227,8 @@
227227
# (source start file, target name, title, author,
228228
# dir menu entry, description, category)
229229
texinfo_documents = [
230-
('index', 'PhpPowerpoint', u'PhpPowerpoint Documentation',
231-
u'The PhpPowerpoint Team', 'PhpPowerpoint', 'One line description of project.',
230+
('index', 'PhpPresentation', u'PhpPresentation Documentation',
231+
u'The PhpPresentation Team', 'PhpPresentation', 'One line description of project.',
232232
'Miscellaneous'),
233233
]
234234

@@ -244,9 +244,9 @@
244244
# -- Options for Epub output ---------------------------------------------------
245245

246246
# Bibliographic Dublin Core info.
247-
epub_title = u'PhpPowerpoint'
248-
epub_author = u'The PhpPowerpoint Team'
249-
epub_publisher = u'The PhpPowerpoint Team'
247+
epub_title = u'PhpPresentation'
248+
epub_author = u'The PhpPresentation Team'
249+
epub_publisher = u'The PhpPresentation Team'
250250
epub_copyright = copyright
251251

252252
# The language of the text. It defaults to the language option

docs/faq.rst

+9-4
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ find in PHPPowerPoint 0.1. The development in CodePlex is halted and
1111
switched to GitHub to allow more participation from the crowd. The more
1212
the merrier, right?
1313

14-
I’ve been running PHPPowerPoint from CodePlex flawlessly, but I can’t use the latest PHPPowerPoint from GitHub. Why?
14+
I’ve been running PHPPowerPoint from CodePlex flawlessly, but I can’t use the latest PHPPresentation from GitHub. Why?
1515
--------------------------------------------------------------------------------------------------------------------
1616

17-
PHPPowerPoint requires PHP 5.3+ since 0.2, while PHPPowerPoint 0.1 from CodePlex
17+
PHPPresentation requires PHP 5.3+ since 0.2, while PHPPowerPoint 0.1 from CodePlex
1818
can run with PHP 5.2. There’s a lot of new features that we can get from
1919
PHP 5.3 and it’s been around since 2009! You should upgrade your PHP
20-
version to use PHPPowerPoint 0.2+.
20+
version to use PHPPresentation 0.2+.
2121

2222
Why am I getting a class not found error?
2323
-----------------------------------------
@@ -31,7 +31,7 @@ without having to specify the full class name in your code:
3131

3232
.. code-block:: php
3333
34-
use PhpOffice\PhpPowerpoint\Shape\MemoryDrawing as MemoryDrawing;
34+
use PhpOffice\PhpPresentation\Shape\MemoryDrawing as MemoryDrawing;
3535
3636
If you *have* followed the installation instructions and you *have* added
3737
the necessary ``use`` statements to your code, then maybe you are still
@@ -47,3 +47,8 @@ translating the verbose class references into the correct file name and
4747
location. However, ``PHPPowerPoint`` now relies exclusively on the PSR-4
4848
autoloader, so old code that may have been referencing the classes with
4949
the verbose class names will need to be updated accordingly.
50+
51+
Why PHPPowerPoint become PHPPresentation ?
52+
------------------------------------------
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>`__.
54+
For avoiding any problems with Microsoft, we decide to change the name to a more logic name, with our panel of readers/writers.

0 commit comments

Comments
 (0)