Skip to content

Commit e9d1dfd

Browse files
committed
Merge branch 'develop' of https://github.com/PHPOffice/PHPWord into PHPOffice-develop
2 parents c20a2fd + 1956908 commit e9d1dfd

Some content is hidden

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

70 files changed

+1811
-174
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ matrix:
2424
- php: 5.3
2525
- php: 7.0
2626
- php: 7.3
27-
allow_failures:
28-
- php: 7.3
2927

3028
cache:
3129
directories:

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,42 @@ Change Log
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55

6-
v0.16.0 (xx dec 2018)
6+
v0.17.0 (?? ??? 2019)
77
----------------------
88
### Added
9+
- Add RightToLeft table presentation. @troosan #1550
10+
11+
### Fixed
12+
13+
### Miscelaneous
14+
- Use embedded http server to test loading of remote images @troosan #
15+
16+
v0.16.0 (30 dec 2018)
17+
----------------------
18+
### Added
19+
- Add getVariableCount method in TemplateProcessor. @nicoder #1272
920
- Add setting Chart Title and Legend visibility @Tom-Magill #1433
21+
- Add ability to pass a Style object in Section constructor @ndench #1416
22+
- Add support for hidden text @Alexmg86 #1527
23+
- Add support for setting images in TemplateProcessor @SailorMax #1170
24+
- Add "Plain Text" type to SDT (Structured Document Tags) @morrisdj #1541
25+
- Added possibility to index variables inside cloned block in TemplateProcessor @JPBetley #817
26+
- Added possibility to replace variables inside cloned block with values in TemplateProcessor @DIDoS #1392
1027

1128
### Fixed
1229
- Fix regex in `cloneBlock` function @nicoder #1269
1330
- HTML Title Writer loses text when Title contains a TextRun instead a string. @begnini #1436
31+
- Fix regex in fixBrokenMacros, make it less greedy @MuriloSo @brainwood @yurii-sio2 #1502 #1345
1432
- 240 twips are being added to line spacing, should not happen when using lineRule fixed @troosan #1509 #1505
1533
- Adding table layout to the generated HTML @aarangara #1441
1634
- Fix loading of Sharepoint document @Garrcomm #1498
1735
- RTF writer: Round getPageSizeW and getPageSizeH to avoid decimals @Patrick64 #1493
1836
- Fix parsing of Office 365 documents @Timanx #1485
37+
- For RTF writers, sizes should should never have decimals @Samuel-BF #1536
38+
- Style Name Parsing fails if document generated by a non-english word version @begnini #1434
39+
40+
### Miscelaneous
41+
- Get rid of duplicated code in TemplateProcessor @abcdmitry #1161
1942

2043
v0.15.0 (14 Jul 2018)
2144
----------------------

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
# ![PHPWord](https://rawgit.com/PHPOffice/PHPWord/develop/docs/images/phpword.svg "PHPWord")
22

3+
Master:
34
[![Latest Stable Version](https://poser.pugx.org/phpoffice/phpword/v/stable.png)](https://packagist.org/packages/phpoffice/phpword)
45
[![Build Status](https://travis-ci.org/PHPOffice/PHPWord.svg?branch=master)](https://travis-ci.org/PHPOffice/PHPWord)
5-
[![Code Quality](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/badges/quality-score.png?s=b5997ce59ac2816b4514f3a38de9900f6d492c1d)](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/)
6-
[![Coverage Status](https://coveralls.io/repos/github/PHPOffice/PHPWord/badge.svg?branch=develop)](https://coveralls.io/github/PHPOffice/PHPWord?branch=develop)
6+
[![Code Quality](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/)
7+
[![Coverage Status](https://coveralls.io/repos/github/PHPOffice/PHPWord/badge.svg?branch=master)](https://coveralls.io/github/PHPOffice/PHPWord?branch=master)
78
[![Total Downloads](https://poser.pugx.org/phpoffice/phpword/downloads.png)](https://packagist.org/packages/phpoffice/phpword)
89
[![License](https://poser.pugx.org/phpoffice/phpword/license.png)](https://packagist.org/packages/phpoffice/phpword)
910
[![Join the chat at https://gitter.im/PHPOffice/PHPWord](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/PHPOffice/PHPWord)
1011

12+
Develop:
13+
[![Latest Development Version](https://img.shields.io/badge/unstable-dev--develop-orange.svg)](https://packagist.org/packages/phpoffice/phpword#dev-develop)
14+
[![Build Status](https://travis-ci.org/PHPOffice/PHPWord.svg?branch=develop)](https://travis-ci.org/PHPOffice/PHPWord/branches)
15+
[![Code Quality](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/?branch=develop)
16+
[![Coverage Status](https://coveralls.io/repos/github/PHPOffice/PHPWord/badge.svg?branch=develop)](https://coveralls.io/github/PHPOffice/PHPWord?branch=develop)
17+
1118
PHPWord is a library written in pure PHP that provides a set of classes to write to and read from different document file formats. The current version of PHPWord supports Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML), OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF), [Rich Text Format](http://en.wikipedia.org/wiki/Rich_Text_Format) (RTF), HTML, and PDF.
1219

1320
PHPWord is an open source project licensed under the terms of [LGPL version 3](https://github.com/PHPOffice/PHPWord/blob/develop/COPYING.LESSER). PHPWord is aimed to be a high quality software product by incorporating [continuous integration](https://travis-ci.org/PHPOffice/PHPWord) and [unit testing](http://phpoffice.github.io/PHPWord/coverage/develop/). You can learn more about PHPWord by reading the [Developers' Documentation](http://phpword.readthedocs.org/).
@@ -81,7 +88,7 @@ You can of course also manually edit your composer.json file
8188
```json
8289
{
8390
"require": {
84-
"phpoffice/phpword": "v0.14.*"
91+
"phpoffice/phpword": "v0.16.*"
8592
}
8693
}
8794
```

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"php-cs-fixer fix --ansi --dry-run --diff",
4646
"phpcs --report-width=200 --report-summary --report-full samples/ src/ tests/ --ignore=src/PhpWord/Shared/PCLZip --standard=PSR2 -n",
4747
"phpmd src/,tests/ text ./phpmd.xml.dist --exclude pclzip.lib.php",
48-
"@test"
48+
"@test-no-coverage"
4949
],
5050
"fix": [
5151
"php-cs-fixer fix --ansi"
@@ -90,7 +90,7 @@
9090
},
9191
"extra": {
9292
"branch-alias": {
93-
"dev-develop": "0.16-dev"
93+
"dev-develop": "0.17-dev"
9494
}
9595
}
9696
}

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
# built documents.
4949
#
5050
# The short X.Y version.
51-
version = '0.14.0'
51+
version = '0.16.0'
5252
# The full version, including alpha/beta/rc tags.
5353
release = version
5454

docs/containers.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ You can pass an optional parameter to specify where the header/footer should be
104104
- ``Footer::FIRST`` each first page of the section
105105
- ``Footer::EVEN`` each even page of the section. Will only be applied if the evenAndOddHeaders is set to true in phpWord->settings
106106

107+
To change the evenAndOddHeaders use the ``getSettings`` method to return the Settings object, and then call the ``setEvenAndOddHeaders`` method:
108+
109+
.. code-block:: php
110+
111+
$phpWord->getSettings()->setEvenAndOddHeaders(true);
112+
107113
Footers
108114
-------
109115

docs/elements.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Legend:
6161
Texts
6262
-----
6363

64-
Text can be added by using ``addText`` and ``addTextRun`` method.
64+
Text can be added by using ``addText`` and ``addTextRun`` methods.
6565
``addText`` is used for creating simple paragraphs that only contain texts with the same style.
6666
``addTextRun`` is used for creating complex paragraphs that contain text with different style (some bold, other
6767
italics, etc) or other elements, e.g. images or links. The syntaxes are as follow:
@@ -155,13 +155,18 @@ method or using the ``pageBreakBefore`` style of paragraph.
155155
Lists
156156
-----
157157

158-
To add a list item use the function ``addListItem``.
158+
Lists can be added by using ``addListItem`` and ``addListItemRun`` methods.
159+
``addListItem`` is used for creating lists that only contain plain text.
160+
``addListItemRun`` is used for creating complex list items that contains texts
161+
with different style (some bold, other italics, etc) or other elements, e.g.
162+
images or links. The syntaxes are as follow:
159163

160164
Basic usage:
161165

162166
.. code-block:: php
163167
164168
$section->addListItem($text, [$depth], [$fontStyle], [$listStyle], [$paragraphStyle]);
169+
$listItemRun = $section->addListItemRun([$depth], [$listStyle], [$paragraphStyle])
165170
166171
Parameters:
167172

@@ -172,6 +177,8 @@ Parameters:
172177
TYPE\_ALPHANUM, TYPE\_BULLET\_FILLED, etc. See list of constants in PHPWord\\Style\\ListItem.
173178
- ``$paragraphStyle``. See :ref:`paragraph-style`.
174179

180+
See ``Sample_09_Tables.php`` for more code sample.
181+
175182
Advanced usage:
176183

177184
You can also create your own numbering style by changing the ``$listStyle`` parameter with the name of your numbering style.

docs/styles.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Available Font style options:
6161
- ``lang``. Language, either a language code like *en-US*, *fr-BE*, etc. or an object (or as an array) if you need to set eastAsian or bidirectional languages
6262
See ``\PhpOffice\PhpWord\Style\Language`` class for some language codes.
6363
- ``position``. The text position, raised or lowered, in half points
64+
- ``hidden``. Hidden text, *true* or *false*.
6465

6566
.. _paragraph-style:
6667

@@ -107,11 +108,12 @@ Available Table style options:
107108
- ``border(Top|Right|Bottom|Left)Size``. Border size in *twip*.
108109
- ``cellMargin(Top|Right|Bottom|Left)``. Cell margin in *twip*.
109110
- ``indent``. Table indent from leading margin. Must be an instance of ``\PhpOffice\PhpWord\ComplexType\TblWidth``.
110-
- ``width``. Table width in percent.
111+
- ``width``. Table width in Fiftieths of a Percent or Twentieths of a Point.
111112
- ``unit``. The unit to use for the width. One of ``\PhpOffice\PhpWord\SimpleType\TblWidth``. Defaults to *auto*.
112113
- ``layout``. Table layout, either *fixed* or *autofit* See ``\PhpOffice\PhpWord\Style\Table`` for constants.
113114
- ``cellSpacing`` Cell spacing in *twip*
114115
- ``position`` Floating Table Positioning, see below for options
116+
- ``bidiVisual`` Present table as Right-To-Left
115117

116118
Floating Table Positioning options:
117119

0 commit comments

Comments
 (0)