Skip to content

Commit aa4c3f8

Browse files
authored
HTML writer fixes
* fixed HTML superscript, and added allcaps, smallcaps, and letter-spacing * make Comment constructor attributes optional
2 parents f4697ab + 15eeaa2 commit aa4c3f8

File tree

13 files changed

+30
-13
lines changed

13 files changed

+30
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ vendor
1919
phpword.ini
2020
/.buildpath
2121
/.project
22+
/nbproject
2223
/.php_cs.cache

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ This is the last version to support PHP 5.3
2929
- Impossible to add element PreserveText in Section - @rvanlaak #452
3030
- Added missing options for numbering format - @troosan #1041
3131
- Fixed impossibility to set a different footer for first page - @ctrlaltca #1116
32+
- Fixed styles not being applied by HTML writer, better pdf output - @sarke #1047 #500 #1139
3233

3334
v0.13.0 (31 July 2016)
3435
-------------------

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
{
3030
"name": "Roman Syroeshko",
3131
"homepage": "http://ru.linkedin.com/pub/roman-syroeshko/34/a53/994/"
32+
},
33+
{
34+
"name": "Antoine de Troostembergh"
3235
}
3336
],
3437
"require": {

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@
4141

4242
# General information about the project.
4343
project = u'PHPWord'
44-
copyright = u'2014-2015, PHPWord Contributors'
44+
copyright = u'2014-2017, PHPWord Contributors'
4545

4646
# The version info for the project you're documenting, acts as replacement for
4747
# |version| and |release|, also used in various other places throughout the
4848
# built documents.
4949
#
5050
# The short X.Y version.
51-
version = '0.13.0'
51+
version = '0.14.0'
5252
# The full version, including alpha/beta/rc tags.
5353
release = version
5454

@@ -120,7 +120,7 @@
120120
# Add any paths that contain custom static files (such as style sheets) here,
121121
# relative to this directory. They are copied after the builtin static files,
122122
# so a file named "default.css" will overwrite the builtin "default.css".
123-
html_static_path = ['_static']
123+
#html_static_path = ['_static']
124124

125125
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
126126
# using the given strftime format.

docs/elements.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ Comments
432432
---------
433433

434434
Comments can be added to a document by using ``addComment``.
435-
The comment can contain formatted text. Once the comment has been added, it can be linked to any to any element.
435+
The comment can contain formatted text. Once the comment has been added, it can be linked to any element with ``setCommentStart``.
436436

437437
.. code-block:: php
438438

docs/installing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Example:
3434
3535
{
3636
"require": {
37-
"phpoffice/phpword": "v0.13.*"
37+
"phpoffice/phpword": "v0.14.*"
3838
}
3939
}
4040

docs/references.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ References
44
==========
55

66
ISO/IEC 29500, Third edition, 2012-09-01
7-
---------------------
7+
----------------------------------------
88

99
- `Part 1: Fundamentals and Markup Language Reference
1010
<http://standards.iso.org/ittf/PubliclyAvailableStandards/c061750_ISO_IEC_29500-1_2012.zip>`__

samples/Sample_37_Comments.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
$section->addTextBreak(2);
2222

2323
// Let's create a comment that we will link to a start element and an end element
24-
$commentWithStartAndEnd = new \PhpOffice\PhpWord\Element\Comment('Foo Bar', new \DateTime(), '');
24+
$commentWithStartAndEnd = new \PhpOffice\PhpWord\Element\Comment('Foo Bar', new \DateTime());
2525
$commentWithStartAndEnd->addText('A comment with a start and an end');
2626
$phpWord->addComment($commentWithStartAndEnd);
2727

@@ -36,7 +36,7 @@
3636
$section->addTextBreak(2);
3737

3838
// Let's add a comment on an image
39-
$commentOnImage = new \PhpOffice\PhpWord\Element\Comment('Mr Smart', new \DateTime(), '');
39+
$commentOnImage = new \PhpOffice\PhpWord\Element\Comment('Mr Smart', new \DateTime());
4040
$imageComment = $commentOnImage->addTextRun();
4141
$imageComment->addText('Hey, Mars does look ');
4242
$imageComment->addText('red', array('color' => 'FF0000'));

src/PhpWord/Element/Comment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Comment extends TrackChange
5757
* @param \DateTime $date
5858
* @param string $initials
5959
*/
60-
public function __construct($author, $date, $initials)
60+
public function __construct($author, $date = null, $initials = null)
6161
{
6262
parent::__construct($author, $date);
6363
$this->initials = $initials;

src/PhpWord/Element/TrackChange.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class TrackChange extends AbstractContainer
4747
* @param string $author
4848
* @param \DateTime $date
4949
*/
50-
public function __construct($author, \DateTime $date)
50+
public function __construct($author, \DateTime $date = null)
5151
{
5252
$this->author = $author;
5353
$this->date = $date;

0 commit comments

Comments
 (0)