Skip to content

Commit

Permalink
Merge pull request #262 from PHPOffice/develop
Browse files Browse the repository at this point in the history
Version 0.7.0
  • Loading branch information
Progi1984 authored Sep 12, 2016
2 parents b70f7ea + 637bf34 commit 4f40d93
Show file tree
Hide file tree
Showing 234 changed files with 15,529 additions and 8,045 deletions.
16 changes: 16 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
engines:
phpcodesniffer:
enabled: true
phpmd:
enabled: true
duplication:
enabled: true
config:
languages:
- php
ratings:
paths:
- src/**/*
- tests/**
exclude_paths:
- vendor/**/*
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ php:

matrix:
allow_failures:
- php: 7.0
- php: hhvm

env:
Expand All @@ -22,6 +21,8 @@ addons:
apt:
packages:
- graphviz
code_climate:
repo_token: 9d5714bfd25acc27c449c2d71cfb444351a3b91c59ed1a5dc3a50732d2bf45f0

before_script:
## Composer
Expand Down Expand Up @@ -51,6 +52,8 @@ after_script:
## Scrutinizer
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
## CodeClimate
- ./vendor/bin/test-reporter

notifications:
webhooks:
Expand Down
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,43 @@
# Changelog

## 0.7.0 - 2016-09-12

### Bugfix
- Fixed the image project - @mvargasmoran GH-177
- PowerPoint2007 Writer : Bugfix for printing slide notes - @JewrassicPark @Progi1984 GH-179

### Changes
- PhpOffice\PhpPresentation\Writer\ODPresentation : Move to Design Pattern Decorator - @Progi1984
- PhpOffice\PhpPresentation\Writer\PowerPoint2007 : Move to Design Pattern Decorator - @Progi1984
- PhpOffice\PhpPresentation\Shape\Type\AbstracType\getData has been deprecated for PhpOffice\PhpPresentation\Shape\Type\AbstracType\getSeries - @Progi1984 GH-169
- PhpOffice\PhpPresentation\Shape\Type\AbstracType\setData has been deprecated for PhpOffice\PhpPresentation\Shape\Type\AbstracType\setSeries - @Progi1984 GH-169
- Added documentation for chart series (font, outline, marker) - @Progi1984 GH-169
- Internal Structure for Drawing Shape - @Progi1984 GH-192
- Documentation about manual installation - @danielbair GH-254

### Features
- ODPresentation & PowerPoint2007 Writer : Add support for Comment - @Progi1984 GH-116
- ODPresentation & PowerPoint2007 Writer : Thumbnail of the presentation - @Progi1984 GH-125
- ODPresentation & PowerPoint2007 Writer : Add support for Gridlines in Chart - @Progi1984 GH-129
- ODPresentation & PowerPoint2007 Writer : Support for images in base 64 - @Progi1984 GH-168
- ODPresentation & PowerPoint2007 Writer : Marker of Series in Line & Scatter chart is customizable - @Progi1984 GH-169
- ODPresentation & PowerPoint2007 Writer : Outline of Series in Line & Scatter chart is customizable - @Progi1984 GH-169
- ODPresentation & PowerPoint2007 & Serialized Writer : Support for Zip Adapter - @Progi1984 GH-176
- ODPresentation & PowerPoint2007 Writer : language property to TextElement - @skrajewski & @Progi1984 GH-180
- ODPresentation & PowerPoint2007 Writer : Add Font Support For Chart Axis - @jrking4 GH-186
- ODPresentation & PowerPoint2007 Writer : Support for video - @Progi1984 GH-123
- ODPresentation & PowerPoint2007 Writer : Support for Visibility for slides - @Progi1984
- PowerPoint2007 Reader : Layout Management - @vincentKool @Progi1984 GH-161
- PowerPoint2007 Reader : Slide size - @loverslcn @Progi1984 GH-246
- PowerPoint2007 Reader : Bullet Color - @Progi1984 GH-257
- PowerPoint2007 Reader : Line Spacing - @Progi1984 GH-257
- PowerPoint2007 Writer : Presentation with predefined View Type - @Progi1984 GH-120
- PowerPoint2007 Writer : Implement alpha channel to Fills - @Dayjo GH-203 / @Progi1984 GH-215
- PowerPoint2007 Writer : Implement Animations - @JewrassicPark GH-214 / @Progi1984 GH-217
- PowerPoint2007 Writer : Layout Management - @vincentKool @Progi1984 GH-161
- PowerPoint2007 Writer : Bullet Color - @piotrbelina GH-249
- PowerPoint2007 Writer : Line Spacing - @piotrbelina GH-249

## 0.6.0 - 2016-01-24

### Bugfix
Expand Down
39 changes: 27 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# ![PHPPresentation](https://github.com/PHPOffice/PHPPresentation/raw/master/docs/images/PHPPowerPointLogo.png "PHPPresentation")
# ![PHPPresentation](https://raw.githubusercontent.com/mvargasmoran/PHPPresentation/develop/docs/images/PHPPresentationLogo.png "PHPPresentation")

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


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

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

Read more about PHPPresentation:

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

### Features
Expand Down Expand Up @@ -48,6 +48,8 @@ PHPPresentation requires the following:

### Installation

#### Composer method

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

Expand All @@ -59,14 +61,25 @@ the following lines to your ``composer.json``.
}
```

Alternatively, you can download the latest release from the [releases page](https://github.com/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.
#### Manual download method

Alternatively, you can download the latest release from the [releases page](https://github.com/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/PhpPresentation/src/PhpPresentation/Autoloader.php';
\PhpOffice\PhpPresentation\Autoloader::register();
```

You will also need to download the latest PHPOffice/Common release from its [releases page](https://github.com/PHPOffice/Common/releases).
And you will also have to register its autoloader, too.

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

## Getting started

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

// with Composer
require_once 'vendor/autoload.php';
Expand Down Expand Up @@ -119,7 +134,7 @@ $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/PHPPresentation/docs/master/) for more detail.
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.


## Contributing
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.0
0.6.0
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@
"php": ">=5.3.0",
"ext-xml": "*",
"ext-zip": "*",
"phpoffice/common": "0.2.*"
"phpoffice/common": "0.2.*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
"phpdocumentor/phpdocumentor":"2.*",
"phpmd/phpmd": "2.*",
"sebastian/phpcpd": "2.*",
"phploc/phploc": "2.*",
"squizlabs/php_codesniffer": "2.*"
"squizlabs/php_codesniffer": "2.*",
"codeclimate/php-test-reporter": "dev-master"
},
"suggest": {
"ext-gd2": "Required to add images"
Expand Down
4 changes: 3 additions & 1 deletion docs/credits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
Credits
=======

Images from chart page come from the `LibreOffice Core <https://github.com/LibreOffice/core/tree/master/icon-themes/galaxy/chart2/res>`.
Images from chart page come from the `LibreOffice Core <https://github.com/LibreOffice/core/tree/master/icon-themes/galaxy/chart2/res>`.

Some definitions come from the `Office Open XML <http://officeopenxml.com/>`.
75 changes: 74 additions & 1 deletion docs/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Document information
--------------------

You can set the document information such as title, creator, and company
name. Use the following functions:
name. Use the following functions :

.. code-block:: php
Expand All @@ -69,3 +69,76 @@ name. Use the following functions:
$properties->setSubject('My subject');
$properties->setKeywords('my, key, word');
Presentation Properties
-----------------------

You can define some properties which are relative to the presentation, like the zoom or the thumbnail.

Comments
````````

You can define if the presentation display or not the comments with the method ``setCommentVisible``.

.. code-block:: php
$oPresentation = new PhpPresentation();
$oProperties = $oPresentation->getPresentationProperties();
// Get the display for comment
var_export($oProperties->isCommentVisible());
// Output : false
// Enable the display for comment
$oProperties->setCommentVisible(true);
// Get the display for comment
var_export($oProperties->isCommentVisible());
// Output : true
Last View
`````````

You can define the last view of the presentation with the method ``setLastView``.

.. code-block:: php
$oPresentation = new PhpPresentation();
$oProperties = $oPresentation->getPresentationProperties();
// Get the last view of the presentation
echo $oProperties->getZoom();
// Output : PresentationProperties::VIEW_SLIDE
// Set the last view of the presentation
$oProperties->setLastView(PresentationProperties::VIEW_NOTES);
// Get the last view of the presentation
echo $oProperties->getZoom();
// Output : PresentationProperties::VIEW_NOTES
Thumbnail
`````````

You can define the thumbnail of the presentation with the method ``setThumbnailPath``.

.. code-block:: php
$oPresentation = new PhpPresentation();
$oProperties = $oPresentation->getPresentationProperties();
// Set path of the thumbnail
$oProperties->setThumbnailPath(__DIR__.'\resources\phppowerpoint_logo.gif');
// Get path of the thumbnail
echo $oProperties->getThumbnailPath();
Zoom
````

You can define the zoom of the presentation with the method ``setZoom``.

.. code-block:: php
$oPresentation = new PhpPresentation();
$oProperties = $oPresentation->getPresentationProperties();
// Get zoom of the presentation
echo $oProperties->getZoom();
// Output : 1
// Set zoom of the presentation (3 = 300%)
$oProperties->setZoom(3);
// Get zoom of the presentation
echo $oProperties->getZoom();
// Output : 3
Binary file removed docs/images/PHPPowerPointLogo.png
Binary file not shown.
Binary file added docs/images/PHPPresentationLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 16 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
contain the root `toctree` directive.
Welcome to PHPPresentation's documentation
========================================
==========================================

|PHPPresentation|

Expand All @@ -19,19 +19,32 @@ PHPPresentation is a library written in pure PHP that provides a set of classes
slides
shapes
styles
writersreaders
writers
readers
recipes
faq
credits
references


.. _slidesdocs:

.. toctree::
:maxdepth: 2
:caption: Slides

slides_animation

.. _shapesdocs:

.. toctree::
:maxdepth: 2
:caption: Shapes

shapes_chart
shapes_comment
shapes_drawing
shapes_media
shapes_richtext
shapes_table

Indices and tables
Expand Down
15 changes: 9 additions & 6 deletions docs/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,20 @@ To install via Composer, add the following lines to your
Manual install
~~~~~~~~~~~~~~

To install manually, `download PHPPresentation package from
github <https://github.com/PHPOffice/PHPPresentation/archive/master.zip>`__.
Extract the package and put the contents to your machine. To use the
library, include ``src/PhpPresentation/Autoloader.php`` in your script and
invoke ``Autoloader::register``.
To install manually, `download PHPOffice\PHPPresentation package from
GitHub <https://github.com/PHPOffice/PHPPresentation/archive/master.zip>`__
and `download PHPOffice\Common package from
GitHub <https://github.com/PHPOffice/Common/archive/master.zip>`__.
Extract the package and put the contents to your machine.

.. code-block:: php
require_once '/path/to/src/PhpPresentation/Autoloader.php';
require_once 'path/to/PhpPresentation/src/PhpPresentation/Autoloader.php';
\PhpOffice\PhpPresentation\Autoloader::register();
require_once 'path/to/PhpOffice/Common/src/Common/Autoloader.php';
\PhpOffice\Common\Autoloader::register();
Using samples
-------------

Expand Down
Loading

0 comments on commit 4f40d93

Please sign in to comment.