Skip to content

Commit 21ac083

Browse files
authored
Reader Word2007 : Support Header elements within Title elements (#2674)
* fix: Support Header element within Title elements We encountered issues with a Word document where this is a valid combination. * docs(changelog): Add note about supporting Header elements within Title
1 parent 136f549 commit 21ac083

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/changes/1.x/1.4.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- Allow vAlign and vMerge on Style\Cell to be set to null by [@SpraxDev](https://github.com/SpraxDev) fixing [#2673](https://github.com/PHPOffice/PHPWord/issues/2673) in [#2676](https://github.com/PHPOffice/PHPWord/pull/2676)
1818
- Reader HTML: Support for differents size units for table by [@Progi1984](https://github.com/Progi1984) fixing [#2384](https://github.com/PHPOffice/PHPWord/issues/2384), [#2701](https://github.com/PHPOffice/PHPWord/issues/2701) in [#2725](https://github.com/PHPOffice/PHPWord/pull/2725)
1919
- Reader Word2007 : Respect paragraph indent units by [@tugmaks](https://github.com/tugmaks) & [@Progi1984](https://github.com/Progi1984) fixing [#507](https://github.com/PHPOffice/PHPWord/issues/507) in [#2726](https://github.com/PHPOffice/PHPWord/pull/2726)
20+
- Reader Word2007 : Support Header elements within Title elements by [@SpraxDev](https://github.com/SpraxDev) fixing [#2616](https://github.com/PHPOffice/PHPWord/issues/2616), [#2426](https://github.com/PHPOffice/PHPWord/issues/2426) in [#2674](https://github.com/PHPOffice/PHPWord/pull/2674)
2021

2122
### Miscellaneous
2223

src/PhpWord/Element/AbstractContainer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ private function checkValidity($method)
254254
'Footnote' => ['Section', 'TextRun', 'Cell', 'ListItemRun'],
255255
'Endnote' => ['Section', 'TextRun', 'Cell'],
256256
'PreserveText' => ['Section', 'Header', 'Footer', 'Cell'],
257-
'Title' => ['Section', 'Cell'],
257+
'Title' => ['Section', 'Cell', 'Header'],
258258
'TOC' => ['Section'],
259259
'PageBreak' => ['Section'],
260260
'Chart' => ['Section', 'Cell'],

0 commit comments

Comments
 (0)