Skip to content

Commit 68e67eb

Browse files
committed
Doc: Update manual and changelog
1 parent 284fdac commit 68e67eb

File tree

4 files changed

+182
-83
lines changed

4 files changed

+182
-83
lines changed

CHANGELOG.md

Lines changed: 47 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,50 @@
1-
**************************************************************************************
2-
* PHPPowerPoint
3-
*
4-
* Copyright (c) 2009 - 2010 PHPPowerPoint
5-
*
6-
* This library is free software; you can redistribute it and/or
7-
* modify it under the terms of the GNU Lesser General Public
8-
* License as published by the Free Software Foundation; either
9-
* version 2.1 of the License, or (at your option) any later version.
10-
*
11-
* This library is distributed in the hope that it will be useful,
12-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14-
* Lesser General Public License for more details.
15-
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this library; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19-
*
20-
* @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
21-
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
22-
* @version ##VERSION##, ##DATE##
23-
**************************************************************************************
24-
25-
26-
To be planned:
27-
- General: (MB) CP-1165 - Rename PHPPowerpoint.php to PHPPowerPoint.php
28-
- General: (MB) CP-5270 - Create build script using Phing
29-
- Feature: (MB) CP- 815 - Provide fluent interfaces where possible
30-
- Feature: (MB) CP-1034 - Use existing presentation template when writing PPTX file
31-
- Feature: (MB) CP-1093 - Implement bullet and numeric lists
32-
- Feature: (MB) CP-1173 - getProperties: setCompany feature request
33-
- Feature: (MB) CP-1375 - New shape type: table
34-
- Feature: (MB) CP-2804 - Use of CDATA text when writing text
35-
- Feature: (MB) CP-1378 - Possibility to set borders on tables and table cells
36-
- Feature: (MB) CP-4921 - Access to additional properties of Text Boxes
37-
- Feature: (MB) CP-7010 - Applied patch 7010
38-
- Feature: (MB) CP-7020 - Applied patch 7020
39-
- Feature: (MB) CP-1196 - Add a hyperlink to an image or textbox
40-
- Feature: (MBaker) Implement autoloader
41-
- Feature: (Progi1984) Implement ODP Writer
42-
- Feature: (MB) CP-4953 - PowerPoint Charts
43-
- Feature: (MB) CP-5580 - Editing chart data
44-
- Feature: (MB) CP-5461 - Solid Fill support
45-
- Feature: (MB) CP-8375 - Applied patch 8375
46-
- Feature: (Progi1984) Implement ODP Writer
47-
- Bugfix: (MBaker) Allow solid colour fill
48-
- Bugfix: (MB) CP-3910 - Table width setting Office 2007
49-
- Bugfix: (MB) CP-4598 - Bullet characters in Master Slide Layouts of template file become corrupted
50-
- Bugfix: (MB) CP-3424 - Generated files cannot be opened in Office 08 for Mac OSX
51-
- Bugfix: (MB) CP-2541 - Table Cell Borders Not Displaying Correctly
52-
- Bugfix: (MB) CP-4597 - Multiple Master Slides are not supported
53-
- Bugfix: (MB) CP-4596 - Images in Layouts other than first Master Slide within Template file causes corrupted PPTX
54-
- Bugfix : (delphiki) GH-16 - Fixed A3 and A4 formats dimensions
55-
- Bugfix : (delphiki) GH-18 - Fixed custom document layout
56-
57-
Initial version:
1+
# Changelog
2+
3+
## 0.2.0 - Not yet released
4+
5+
### Features
6+
7+
- Provide fluent interfaces where possible - @maartenba CP- 815
8+
- Use existing presentation template when writing PPTX file - @maartenba CP-1034
9+
- Implement bullet and numeric lists - @maartenba CP-1093
10+
- getProperties: setCompany feature request - @maartenba CP-1173
11+
- New shape type: table - @maartenba CP-1375
12+
- Use of CDATA text when writing text - @maartenba CP-2804
13+
- Possibility to set borders on tables and table cells - @maartenba CP-1378
14+
- Access to additional properties of Text Boxes - @maartenba CP-4921
15+
- Applied patch 7010 - @maartenba CP-7010
16+
- Applied patch 7020 - @maartenba CP-7020
17+
- Add a hyperlink to an image or textbox - @maartenba CP-1196
18+
- PowerPoint Charts - @maartenba CP-4953
19+
- Editing chart data - @maartenba CP-5580
20+
- Solid Fill support - @maartenba CP-5461
21+
- Applied patch 8375 - @maartenba CP-8375
22+
- Implement autoloader - @MarkBaker
23+
- Implement ODP Writer - @Progi1984
24+
25+
### Bugfix
26+
27+
- Allow solid colour fill - @MarkBaker
28+
- Table width setting Office 2007 - @maartenba CP-3910
29+
- Bullet characters in Master Slide Layouts of template file become corrupted - @maartenba CP-4598
30+
- Generated files cannot be opened in Office 08 for Mac OSX - @maartenba CP-3424
31+
- Table Cell Borders Not Displaying Correctly - @maartenba CP-2541
32+
- Multiple Master Slides are not supported - @maartenba CP-4597
33+
- Images in Layouts other than first Master Slide within Template file causes corrupted PPTX - @maartenba CP-4596
34+
- Fixed A3 and A4 formats dimensions - @delphiki GH-16
35+
- Fixed custom document layout - @delphiki GH-18
36+
37+
### Miscellaneous
38+
39+
- Rename PHPPowerpoint.php to PHPPowerPoint.php - @maartenba CP-1165
40+
- Create build script using Phing - @maartenba CP-5270
41+
- QA: Prepare `.travis.yml` and `phpcs.xml` for Travis build passing - @Progi1984 @ivanlanin
42+
- QA: Initiate unit tests - @Progi1984 @ivanlanin
43+
- QA: Cleanup source code for PSR dan PHPDoc compatibility - @ivanlanin
44+
- Doc: Initiate documentation - @ivanlanin
45+
46+
## 0.1.0
47+
5848
- Create a Presentation object
5949
- Add one or more Slide objects
6050
- Add one or more Shapes to Slide objects

Documentation/PHPPowerPoint Manual.md renamed to Documentation/PHPPowerPointManual.md

Lines changed: 130 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,33 @@
11
# PHPPowerPoint Manual
22

3-
PHPPowerPoint is a library written in pure PHP that provides a set of classes to write to and read from different presentation file formats, i.e. OpenXML (.pptx) and OpenDocument (.odp). PHPPowerPoint is an open source project licensed under LGPL.
3+
PHPPowerPoint is a library written in pure PHP that provides a set of classes to write to different presentation file formats, i.e. OpenXML (.pptx) and OpenDocument (.odp). PHPPowerPoint is an open source project licensed under LGPL.
4+
5+
## Contents
6+
7+
- [Overview](#overview)
8+
- [Features](#features)
9+
- [Requirements](#requirements)
10+
- [Installation](#installation)
11+
- [Objects](#objects)
12+
- [Document properties](#document-properties)
13+
- [Slides](#slides)
14+
- [Shapes](#shapes)
15+
- [Rich text](#rich-text)
16+
- [Line](#line)
17+
- [Chart](#chart)
18+
- [Drawing](#drawing)
19+
- [Table](#table)
20+
- [Styles](#styles)
21+
- [Fill](#fill)
22+
- [Border](#border)
23+
- [Alignment](#alignment)
24+
- [Font](#font)
25+
- [Bullet](#bullet)
26+
- [Color](#color)
27+
- [Writers](#writers)
28+
- [OOXML](#ooxml)
29+
- [OpenDocument](#opendocument)
30+
- [References](#references)
431

532
## Overview
633

@@ -39,7 +66,7 @@ After that, you can use the library by creating a new instance of the class.
3966
$phpPowerPoint = new PHPPowerPoint();
4067
```
4168

42-
## Usages
69+
## Objects
4370

4471
### Document properties
4572

@@ -75,22 +102,7 @@ $shape = $slide->createRichTextShape();
75102

76103
### Shapes
77104

78-
Shapes are objects that can be added to a slide. There are five types of shapes that can be used, i.e. rich text, line, chart, drawing, and table.
79-
80-
To create a shape, use the following methods of a slide.
81-
82-
- `createRichTextShape`
83-
- `createLineShape`
84-
- `createChartShape`
85-
- `createDrawingShape`
86-
- `createTableShape`
87-
88-
Example:
89-
90-
```php
91-
$richText = $slide->createRichTextShape();
92-
$line = $slide->createLineShape();
93-
```
105+
Shapes are objects that can be added to a slide. There are five types of shapes that can be used, i.e. [rich text](#rich-text), [line](#line), [chart](#chart), [drawing](#drawing), and [table](#table). Read the corresponding section of this manual for detail information of each shape.
94106

95107
Every shapes have common properties that you can set by using fluent interface.
96108

@@ -99,9 +111,9 @@ Every shapes have common properties that you can set by using fluent interface.
99111
- `offsetX` in pixels
100112
- `offsetY` in pixels
101113
- `rotation` in degrees
102-
- `fill`
103-
- `border`
104-
- `shadow`
114+
- `fill` see *[Fill](#fill)*
115+
- `border` see *[Border](#border)*
116+
- `shadow` see *[Shadow](#shadow)*
105117
- `hyperlink`
106118

107119
Example:
@@ -116,7 +128,13 @@ $richtext = $slide->createRichTextShape()
116128

117129
#### Rich text
118130

119-
Rich text shapes contain paragraphs of texts. Below are the properties that you can set for a rich text shape.
131+
Rich text shapes contain paragraphs of texts. To create a rich text shape, use `createRichTextShape` method of slide.
132+
133+
```php
134+
$richtext = $slide->createRichTextShape()
135+
```
136+
137+
Below are the properties that you can set for a rich text shape.
120138

121139
- `wrap`
122140
- `autoFit`
@@ -140,34 +158,105 @@ $richtext = $slide->createRichTextShape()
140158

141159
Properties that can be set for each paragraphs are as follow.
142160

143-
- `alignment`
144-
- `font`
145-
- `bulletStyle`
161+
- `alignment` see *[Alignment](#alignment)*
162+
- `font` see *[Font](#font)*
163+
- `bulletStyle` see *[Bullet](#bullet)*
146164

147165
#### Line
148166

167+
To create a line, use `createLineShape` method of slide.
168+
169+
```php
170+
$line = $slide->createLineShape($fromX, $fromY, $toX, $toY);
171+
```
172+
149173
#### Chart
150174

175+
To create a chart, use `createChartShape` method of slide.
176+
177+
```php
178+
$chart = $slide->createChartShape();
179+
```
180+
151181
#### Drawing
152182

183+
To create a drawing, use `createDrawingShape` method of slide.
184+
185+
```php
186+
$drawing = $slide->createDrawingShape();
187+
$drawing->setName('Unique name')
188+
->setDescription('Description of the drawing')
189+
->setPath('/path/to/drawing.filename');
190+
```
191+
153192
#### Table
154193

194+
To create a table, use `createTableShape` method of slide.
195+
196+
```php
197+
$table = $slide->createTableShape($columns);
198+
```
199+
155200
### Styles
156201

157202
#### Fill
158203

204+
Use this style to define fill of a shape as example below.
205+
206+
```php
207+
$shape->getFill()
208+
->setFillType(PHPPowerPoint_Style_Fill::FILL_GRADIENT_LINEAR)
209+
->setRotation(270)
210+
->setStartColor(new PHPPowerPoint_Style_Color('FFCCCCCC'))
211+
->setEndColor(new PHPPowerPoint_Style_Color('FFFFFFFF'));
212+
```
213+
214+
Properties:
215+
159216
- `fillType`
160217
- `rotation`
161218
- `startColor`
162219
- `endColor`
163220

164221
#### Border
165222

223+
Use this style to define border of a shape as example below.
224+
225+
```php
226+
$shape->getBorder()
227+
->setLineStyle(PHPPowerPoint_Style_Border::LINE_SINGLE)
228+
->setLineWidth(4)
229+
->getColor()->setARGB('FFC00000');
230+
```
231+
232+
Properties:
233+
166234
- `lineWidth`
167235
- `lineStyle`
168236
- `dashStyle`
169237
- `color`
170238

239+
#### Shadow
240+
241+
Use this style to define shadow of a shape as example below.
242+
243+
```php
244+
$shape->getShadow()
245+
->setVisible(true)
246+
->setDirection(45)
247+
->setDistance(10);
248+
```
249+
250+
Properties:
251+
252+
- `visible`
253+
- `blurRadius`
254+
- `distance`
255+
- `direction`
256+
- `alignment`
257+
- `color`
258+
- `alpha`
259+
171260
#### Alignment
172261

173262
- `horizontal`
@@ -197,3 +286,19 @@ Properties that can be set for each paragraphs are as follow.
197286
- `bulletNumericStartAt`
198287

199288
#### Color
289+
290+
To be completed.
291+
292+
## Writers
293+
294+
### OOXML
295+
296+
To be completed.
297+
298+
### OpenDocument
299+
300+
To be completed.
301+
302+
## References
303+
304+
To be completed.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ $phpPowerPoint = new PHPPowerPoint();
4242

4343
### Want to learn more?
4444

45-
[Read the manual](Documentation/PHPPowerPoint Manual.md).
45+
[Read the manual](Documentation/PHPPowerPointManual.md).
4646

4747
### Want to contribute?
4848

composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
{
1414
"name": "Franck Lefevre",
1515
"homepage": "http://blog.rootslabs.net"
16+
},
17+
{
18+
"name": "Ivan Lanin",
19+
"homepage": "http://ivan.lanin.org"
1620
}
1721
],
1822
"require": {

0 commit comments

Comments
 (0)