Skip to content

Commit

Permalink
Merge pull request #134 from PHPOffice/develop
Browse files Browse the repository at this point in the history
Version 0.5.0
  • Loading branch information
Progi1984 committed Oct 8, 2015
2 parents 7d30b8c + 25591b5 commit 464b206
Show file tree
Hide file tree
Showing 216 changed files with 7,033 additions and 5,171 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ vendor
/samples/#*
/samples/Github_*.*
/samples/results
/composer.lock
13 changes: 8 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sudo: false
language: php

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

addons:
apt:
packages:
- graphviz

before_script:
## Packages
- sudo apt-get -qq update > /dev/null
- sudo apt-get -qq install graphviz > /dev/null
## Composer
- composer self-update
- composer install --prefer-source --dev
- composer install --prefer-source
## PHPDocumentor
- mkdir -p build/docs
- mkdir -p build/coverage
Expand Down Expand Up @@ -55,4 +58,4 @@ notifications:
- https://webhooks.gitter.im/e/0dbc70ac93ba40880eef
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false
on_start: false # default: false
2 changes: 2 additions & 0 deletions .travis_shell_after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ echo "TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG"
echo "TRAVIS_PHP_VERSION: $TRAVIS_PHP_VERSION"
echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST"

##if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPPresentation" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then
if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPPowerPoint" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then

echo -e "Publishing PHPDoc...\n"
Expand All @@ -15,6 +16,7 @@ if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPPowerPoint" ] && [ "$TRAVIS_PULL_REQUE
cd $HOME
git config --global user.email "[email protected]"
git config --global user.name "travis-ci"
## git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/PHPOffice/PHPPresentation gh-pages > /dev/null
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/PHPOffice/PHPPowerPoint gh-pages > /dev/null

cd gh-pages
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# Changelog
## 0.5.0 - 2015-10-08

### Features
- PowerPoint2007 Reader : Initial Commit - @Progi1984 GH-44
- ODPresentation Reader : Initial Commit - @Progi1984 GH-113

### Bugfix
- Fixed the sample in Readme.md - @Progi1984 GH-114

### Changes
- PhpOffice\PhpPowerpoint becomes PhpOffice\PhpPresentation - @Progi1984 GH-25
- PhpOffice\PhpPowerpoint\Style\Font::setStriketrough has been removed : Use setStrikethrough - @Progi1984
- PhpOffice\PhpPowerpoint\AbstractShape::getSlide has been removed - @Progi1984
- PhpOffice\PhpPowerpoint\AbstractShape::setSlide has been removed - @Progi1984
- PhpOffice\PhpPowerpoint\DocumentLayout::getLayoutXmilli has been removed : getCX(DocumentLayout::UNIT_MILLIMETER) - @Progi1984
- PhpOffice\PhpPowerpoint\DocumentLayout::getLayoutYmilli has been removed : getCY(DocumentLayout::UNIT_MILLIMETER) - @Progi1984
- PhpOffice\PhpPowerpoint\DocumentLayout::setLayoutXmilli has been removed : setCX(DocumentLayout::UNIT_MILLIMETER) - @Progi1984
- PhpOffice\PhpPowerpoint\DocumentLayout::setLayoutYmilli has been removed : setCY(DocumentLayout::UNIT_MILLIMETER) - @Progi1984
- Update the dependence PhpOffice\Common to 0.2.* - @Progi1984
- Migrated Travis CI to legacy - @Progi1984 GH-115

## 0.4.0 - 2015-07-07

### Features
Expand Down
10 changes: 5 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
PHPPowerPoint, a pure PHP library for writing presentations files.
PHPPresentation, a pure PHP library for writing presentations files.

Copyright (c) 2010-2014 PHPPowerPoint.
Copyright (c) 2010-2015 PHPPresentation.

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

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

You should have received a copy of the GNU Lesser General Public License version 3
along with PHPPowerPoint. If not, see <http://www.gnu.org/licenses/>.
along with PHPPresentation. If not, see <http://www.gnu.org/licenses/>.
56 changes: 32 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ![PHPPowerPoint](https:/PHPOffice/PHPPowerPoint/raw/master/docs/images/PHPPowerPointLogo.png "PHPPowerPoint")
# ![PHPPresentation](https:/PHPOffice/PHPPresentation/raw/master/docs/images/PHPPowerPointLogo.png "PHPPresentation")

[![Latest Stable Version](https://poser.pugx.org/phpoffice/phppowerpoint/v/stable.png)](https://packagist.org/packages/phpoffice/phppowerpoint)
[![Build Status](https://travis-ci.org/PHPOffice/PHPPowerPoint.svg?branch=master)](https://travis-ci.org/PHPOffice/PHPPowerPoint)
Expand All @@ -9,20 +9,19 @@
[![Join the chat at https://gitter.im/PHPOffice/PHPPowerPoint](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/PHPOffice/PHPPowerPoint)


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).
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).

PHPPowerPoint is an open source project licensed under the terms of [LGPL version 3](https:/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/).
PHPPresentation is an open source project licensed under the terms of [LGPL version 3](https:/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/).

Read more about PHPPowerPoint:
Read more about PHPPresentation:

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Getting started](#getting-started)
- [Known issues](#known-issues)
- [Contributing](#contributing)
- [Developers' Documentation](http://phppowerpoint.readthedocs.org/)
- [API Documentation](http://phpoffice.github.io/PHPPowerPoint/docs/master/)
- [API Documentation](http://phpoffice.github.io/PHPPresentation/docs/master/)

### Features

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

### Requirements

PHPPowerPoint requires the following:
PHPPresentation requires the following:

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

### Installation

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

```json
{
"require": {
"phpoffice/phppowerpoint": "dev-master"
"phpoffice/phppresentation": "dev-master"
}
}
```

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

```php
require_once 'path/to/PhpPowerpoint/src/PhpPowerpoint/Autoloader.php';
\PhpOffice\PhpPowerpoint\Autoloader::register();
require_once 'path/to/PhpPresentation/src/PhpPresentation/Autoloader.php';
\PhpOffice\PhpPresentation\Autoloader::register();
```

## Getting started

The following is a basic usage example of the PHPPowerPoint library.
The following is a basic usage example of the PHPPresentation library.

```php
require_once 'src/PhpPowerpoint/Autoloader.php';
\PhpOffice\PhpPowerpoint\Autoloader::register();
// with your own install
require_once 'src/PhpPresentation/Autoloader.php';
\PhpOffice\PhpPresentation\Autoloader::register();

$objPHPPowerPoint = new PhpPowerpoint();
// with Composer
require_once 'vendor/autoload.php';

use PhpOffice\PhpPresentation\PhpPowerpoint;
use PhpOffice\PhpPresentation\IOFactory;
use PhpOffice\PhpPresentation\Style\Color;
use PhpOffice\PhpPresentation\Style\Alignment;

$objPHPPowerPoint = new PhpPresentation();

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

// Create a shape (drawing)
$shape = $currentSlide->createDrawingShape();
$shape->setName('PHPPowerPoint logo')
->setDescription('PHPPowerPoint logo')
$shape->setName('PHPPresentation logo')
->setDescription('PHPPresentation logo')
->setPath('./resources/phppowerpoint_logo.gif')
->setHeight(36)
->setOffsetX(10)
Expand All @@ -100,7 +108,7 @@ $shape = $currentSlide->createRichTextShape()
->setOffsetX(170)
->setOffsetY(180);
$shape->getActiveParagraph()->getAlignment()->setHorizontal( Alignment::HORIZONTAL_CENTER );
$textRun = $shape->createTextRun('Thank you for using PHPPowerPoint!');
$textRun = $shape->createTextRun('Thank you for using PHPPresentation!');
$textRun->getFont()->setBold(true)
->setSize(60)
->setColor( new Color( 'FFE06B20' ) );
Expand All @@ -111,14 +119,14 @@ $oWriterODP = IOFactory::createWriter($objPHPPowerPoint, 'ODPresentation');
$oWriterODP->save(__DIR__ . "/sample.odp");
```

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.
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.


## Contributing

We welcome everyone to contribute to PHPPowerPoint. Below are some of the things that you can do to contribute:
We welcome everyone to contribute to PHPPresentation. Below are some of the things that you can do to contribute:

- Read [our contributing guide](https:/PHPOffice/PHPPowerPoint/blob/master/CONTRIBUTING.md)
- [Fork us](https:/PHPOffice/PHPPowerPoint/fork) and [request a pull](https:/PHPOffice/PHPPowerPoint/pulls) to the [develop](https:/PHPOffice/PHPPowerPoint/tree/develop) branch
- Submit [bug reports or feature requests](https:/PHPOffice/PHPPowerPoint/issues) to GitHub
- Read [our contributing guide](https:/PHPOffice/PHPPresentation/blob/master/CONTRIBUTING.md)
- [Fork us](https:/PHPOffice/PHPPresentation/fork) and [request a pull](https:/PHPOffice/PHPPresentation/pulls) to the [develop](https:/PHPOffice/PHPPresentation/tree/develop) branch
- Submit [bug reports or feature requests](https:/PHPOffice/PHPPresentation/issues) to GitHub
- Follow [@PHPOffice](https://twitter.com/PHPOffice) on Twitter
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "phpoffice/phppowerpoint",
"description": "PHPPowerPoint - Read, Create and Write Presentations documents in PHP",
"name": "phpoffice/phppresentation",
"description": "PHPPresentation - Read, Create and Write Presentations documents in PHP",
"keywords": ["PHP","PowerPoint","LibreOffice","pptx","ppt","odp","presentations"],
"homepage": "http://phpoffice.github.io",
"type": "library",
Expand All @@ -22,7 +22,7 @@
"php": ">=5.3.0",
"ext-xml": "*",
"ext-zip": "*",
"phpoffice/common": "0.1.*"
"phpoffice/common": "0.2.*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
Expand All @@ -37,7 +37,7 @@
},
"autoload": {
"psr-4": {
"PhpOffice\\PhpPowerpoint\\": "src/PhpPowerpoint/"
"PhpOffice\\PhpPresentation\\": "src/PhpPresentation/"
}
}
}
26 changes: 13 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# PhpPowerpoint documentation build configuration file, created by
# PhpPresentation documentation build configuration file, created by
# sphinx-quickstart on Fri Mar 14 23:09:26 2014.
#
# This file is execfile()d with the current directory set to its containing dir.
Expand Down Expand Up @@ -40,8 +40,8 @@
master_doc = 'index'

# General information about the project.
project = u'PhpPowerpoint'
copyright = u'2014, PHPPowerPoint Contributors'
project = 'PhpPresentation'
copyright = u'2014, PHPPresentation Contributors'

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

# Output file base name for HTML help builder.
htmlhelp_basename = 'PhpPowerpointdoc'
htmlhelp_basename = 'PhpPresentation'


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

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

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

Expand All @@ -244,9 +244,9 @@
# -- Options for Epub output ---------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = u'PhpPowerpoint'
epub_author = u'The PhpPowerpoint Team'
epub_publisher = u'The PhpPowerpoint Team'
epub_title = u'PhpPresentation'
epub_author = u'The PhpPresentation Team'
epub_publisher = u'The PhpPresentation Team'
epub_copyright = copyright

# The language of the text. It defaults to the language option
Expand Down
13 changes: 9 additions & 4 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ find in PHPPowerPoint 0.1. The development in CodePlex is halted and
switched to GitHub to allow more participation from the crowd. The more
the merrier, right?

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

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

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

.. code-block:: php
use PhpOffice\PhpPowerpoint\Shape\MemoryDrawing as MemoryDrawing;
use PhpOffice\PhpPresentation\Shape\MemoryDrawing as MemoryDrawing;
If you *have* followed the installation instructions and you *have* added
the necessary ``use`` statements to your code, then maybe you are still
Expand All @@ -47,3 +47,8 @@ translating the verbose class references into the correct file name and
location. However, ``PHPPowerPoint`` now relies exclusively on the PSR-4
autoloader, so old code that may have been referencing the classes with
the verbose class names will need to be updated accordingly.

Why PHPPowerPoint become PHPPresentation ?
------------------------------------------
As `Roman Syroeshko noticed us <https:/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>`__.
For avoiding any problems with Microsoft, we decide to change the name to a more logic name, with our panel of readers/writers.
Loading

0 comments on commit 464b206

Please sign in to comment.