Skip to content

Commit 927aae5

Browse files
authored
Merge branch 'develop' into fix_TemplateProcessor
2 parents 0114698 + af5a271 commit 927aae5

File tree

26 files changed

+295
-46
lines changed

26 files changed

+295
-46
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ vendor
1818
/.settings
1919
phpword.ini
2020
/.buildpath
21+
/.scannerwork
2122
/.project
2223
/nbproject
2324
/.php_cs.cache

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ matrix:
1818
env: COVERAGE=1
1919
- php: 5.3
2020
env: COMPOSER_MEMORY_LIMIT=2G
21+
- php: 7.3
22+
env: DEPENDENCIES="--ignore-platform-reqs"
2123
exclude:
22-
- php: 7.0
2324
- php: 5.3
25+
- php: 7.0
26+
- php: 7.3
2427
allow_failures:
2528
- php: 7.3
2629

@@ -43,7 +46,7 @@ before_script:
4346
- if [ -z "$COVERAGE" ]; then phpenv config-rm xdebug.ini || echo "xdebug not available" ; fi
4447
## Composer
4548
- composer self-update
46-
- travis_wait composer install --prefer-source
49+
- travis_wait composer install --prefer-source $(if [ -n "$DEPENDENCIES" ]; then echo $DEPENDENCIES; fi)
4750
## PHPDocumentor
4851
##- mkdir -p build/docs
4952
- mkdir -p build/coverage

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,20 @@ 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 xxx 2018)
6+
v0.16.0 (xx dec 2018)
77
----------------------
88
### Added
9+
- Add setting Chart Title and Legend visibility @Tom-Magill #1433
910

1011
### Fixed
1112
- Fix regex in `cloneBlock` function @nicoder #1269
1213
- HTML Title Writer loses text when Title contains a TextRun instead a string. @begnini #1436
1314
- Fix regex in fixBrokenMacros, make it less greedy @MuriloSo @brainwood @yurii-sio2 #1502 #1345
15+
- 240 twips are being added to line spacing, should not happen when using lineRule fixed @troosan #1509 #1505
16+
- Adding table layout to the generated HTML @aarangara #1441
17+
- Fix loading of Sharepoint document @Garrcomm #1498
18+
- RTF writer: Round getPageSizeW and getPageSizeH to avoid decimals @Patrick64 #1493
19+
- Fix parsing of Office 365 documents @Timanx #1485
1420

1521
v0.15.0 (14 Jul 2018)
1622
----------------------

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ $objWriter->save('helloWorld.html');
161161
```
162162

163163
More examples are provided in the [samples folder](samples/). For an easy access to those samples launch `php -S localhost:8000` in the samples directory then browse to [http://localhost:8000](http://localhost:8000) to view the samples.
164-
You can also read the [Developers' Documentation](http://phpword.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPWord/docs/master/) for more detail.
164+
You can also read the [Developers' Documentation](http://phpword.readthedocs.org/) for more detail.
165165

166166
## Contributing
167167

docs/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Fixes # (issue)
88

99
- [ ] I have run `composer run-script check --timeout=0` and no errors were reported
1010
- [ ] The new code is covered by unit tests (check build/coverage for coverage report)
11-
- [ ] I have update the documentation to describe the changes
11+
- [ ] I have updated the documentation to describe the changes

docs/styles.rst

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Available Section style options:
2929
- ``marginRight``. Page margin right in *twip*.
3030
- ``marginBottom``. Page margin bottom in *twip*.
3131
- ``orientation``. Page orientation (``portrait``, which is default, or ``landscape``).
32+
See ``\PhpOffice\PhpWord\Style\Section::ORIENTATION_...`` class constants for possible values
3233
- ``pageSizeH``. Page height in *twip*. Implicitly defined by ``orientation`` option. Any changes are discouraged.
3334
- ``pageSizeW``. Page width in *twip*. Implicitly defined by ``orientation`` option. Any changes are discouraged.
3435

@@ -45,7 +46,7 @@ Available Font style options:
4546
- ``color``. Font color, e.g. *FF0000*.
4647
- ``doubleStrikethrough``. Double strikethrough, *true* or *false*.
4748
- ``fgColor``. Font highlight color, e.g. *yellow*, *green*, *blue*.
48-
See ``\PhpOffice\PhpWord\Style\Font::FGCOLOR_...`` constants for more values
49+
See ``\PhpOffice\PhpWord\Style\Font::FGCOLOR_...`` class constants for possible values
4950
- ``hint``. Font content type, *default*, *eastAsia*, or *cs*.
5051
- ``italic``. Italic, *true* or *false*.
5152
- ``name``. Font name, e.g. *Arial*.
@@ -56,7 +57,7 @@ Available Font style options:
5657
- ``subScript``. Subscript, *true* or *false*.
5758
- ``superScript``. Superscript, *true* or *false*.
5859
- ``underline``. Underline, *single*, *dash*, *dotted*, etc.
59-
See ``\PhpOffice\PhpWord\Style\Font::UNDERLINE_...`` constants for more values
60+
See ``\PhpOffice\PhpWord\Style\Font::UNDERLINE_...`` class constants for possible values
6061
- ``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
6162
See ``\PhpOffice\PhpWord\Style\Language`` class for some language codes.
6263
- ``position``. The text position, raised or lowered, in half points
@@ -69,7 +70,7 @@ Paragraph
6970
Available Paragraph style options:
7071

7172
- ``alignment``. Supports all alignment modes since 1st Edition of ECMA-376 standard up till ISO/IEC 29500:2012.
72-
See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details.
73+
See ``\PhpOffice\PhpWord\SimpleType\Jc`` class constants for possible values.
7374
- ``basedOn``. Parent style.
7475
- ``hanging``. Hanging in *twip*.
7576
- ``indent``. Indent in *twip*.
@@ -80,16 +81,17 @@ Available Paragraph style options:
8081
- ``pageBreakBefore``. Start paragraph on next page, *true* or *false*.
8182
- ``spaceBefore``. Space before paragraph in *twip*.
8283
- ``spaceAfter``. Space after paragraph in *twip*.
83-
- ``spacing``. Space between lines.
84+
- ``spacing``. Space between lines in *twip*. If spacingLineRule is auto, 240 (height of 1 line) will be added, so if you want a double line height, set this to 240.
8485
- ``spacingLineRule``. Line Spacing Rule. *auto*, *exact*, *atLeast*
86+
See ``\PhpOffice\PhpWord\SimpleType\LineSpacingRule`` class constants for possible values.
8587
- ``suppressAutoHyphens``. Hyphenation for paragraph, *true* or *false*.
8688
- ``tabs``. Set of custom tab stops.
8789
- ``widowControl``. Allow first/last line to display on a separate page, *true* or *false*.
8890
- ``contextualSpacing``. Ignore Spacing Above and Below When Using Identical Styles, *true* or *false*.
8991
- ``bidi``. Right to Left Paragraph Layout, *true* or *false*.
9092
- ``shading``. Paragraph Shading.
9193
- ``textAlignment``. Vertical Character Alignment on Line.
92-
See ``\PhpOffice\PhpWord\SimpleType\TextAlignment`` class for possible values.
94+
See ``\PhpOffice\PhpWord\SimpleType\TextAlignment`` class constants for possible values.
9395

9496
.. _table-style:
9597

@@ -99,7 +101,7 @@ Table
99101
Available Table style options:
100102

101103
- ``alignment``. Supports all alignment modes since 1st Edition of ECMA-376 standard up till ISO/IEC 29500:2012.
102-
See ``\PhpOffice\PhpWord\SimpleType\JcTable`` and ``\PhpOffice\PhpWord\SimpleType\Jc`` classes for the details.
104+
See ``\PhpOffice\PhpWord\SimpleType\JcTable`` and ``\PhpOffice\PhpWord\SimpleType\Jc`` class constants for possible values.
103105
- ``bgColor``. Background color, e.g. '9966CC'.
104106
- ``border(Top|Right|Bottom|Left)Color``. Border color, e.g. '9966CC'.
105107
- ``border(Top|Right|Bottom|Left)Size``. Border size in *twip*.
@@ -168,7 +170,7 @@ Numbering level
168170
Available NumberingLevel style options:
169171

170172
- ``alignment``. Supports all alignment modes since 1st Edition of ECMA-376 standard up till ISO/IEC 29500:2012.
171-
See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details.
173+
See ``\PhpOffice\PhpWord\SimpleType\Jc`` class constants for possible values.
172174
- ``font``. Font name.
173175
- ``format``. Numbering format bullet\|decimal\|upperRoman\|lowerRoman\|upperLetter\|lowerLetter.
174176
- ``hanging``. See paragraph style.
@@ -190,6 +192,14 @@ Available Chart style options:
190192
- ``width``. Width (in EMU).
191193
- ``height``. Height (in EMU).
192194
- ``3d``. Is 3D; applies to pie, bar, line, area, *true* or *false*.
195+
- ``colors``. A list of colors to use in the chart.
196+
- ``title``. The title for the chart.
197+
- ``showLegend``. Show legend, *true* or *false*.
198+
- ``categoryLabelPosition``. Label position for categories, *nextTo* (default), *low* or *high*.
199+
- ``valueLabelPosition``. Label position for values, *nextTo* (default), *low* or *high*.
200+
- ``categoryAxisTitle``. The title for the category axis.
201+
- ``valueAxisTitle``. The title for the values axis.
202+
- ``majorTickMarkPos``. The position for major tick marks, *in*, *out*, *cross*, *none* (default).
193203
- ``showAxisLabels``. Show labels for axis, *true* or *false*.
194204
- ``gridX``. Show Gridlines for X-Axis, *true* or *false*.
195205
- ``gridY``. Show Gridlines for Y-Axis, *true* or *false*.

phpunit.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323
<logging>
2424
<log type="coverage-html" target="./build/coverage" />
2525
<log type="coverage-clover" target="./build/logs/clover.xml" />
26+
<log type="junit" target="./build/logs/logfile.xml"/>
2627
</logging>
2728
</phpunit>

sonar-project.properties

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# must be unique in a given SonarQube instance
2+
sonar.projectKey=phpoffice:phpword
3+
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
4+
sonar.projectName=PHPWord
5+
sonar.projectVersion=0.16
6+
7+
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
8+
# This property is optional if sonar.modules is set.
9+
sonar.sources=src
10+
sonar.tests=tests
11+
sonar.php.coverage.reportPaths=build/logs/clover.xml
12+
sonar.php.tests.reportPath=build/logs/logfile.xml
13+
14+
# Encoding of the source code. Default is default system encoding
15+
#sonar.sourceEncoding=UTF-8
16+
17+
sonar.host.url=http://localhost:9000

src/PhpWord/Reader/MsDoc.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2185,6 +2185,8 @@ private function readPrl($data, $pos, $cbNum)
21852185

21862186
$sprmCPicLocation += $embeddedBlipRH['recLen'];
21872187
break;
2188+
case self::OFFICEARTBLIPPNG:
2189+
break;
21882190
default:
21892191
// print_r(dechex($embeddedBlipRH['recType']));
21902192
}

src/PhpWord/Reader/Word2007.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public function load($docFile)
6262
foreach ($steps as $step) {
6363
$stepPart = $step['stepPart'];
6464
$stepItems = $step['stepItems'];
65+
if (!isset($relationships[$stepPart])) {
66+
continue;
67+
}
6568
foreach ($relationships[$stepPart] as $relItem) {
6669
$relType = $relItem['type'];
6770
if (isset($stepItems[$relType])) {

0 commit comments

Comments
 (0)