Skip to content

Commit 3638e1b

Browse files
committed
Changes Requested by @Progi1984
1 parent 7301f7d commit 3638e1b

File tree

3 files changed

+29
-18
lines changed

3 files changed

+29
-18
lines changed

docs/changes/1.x/1.3.0.md

-15
This file was deleted.

docs/changes/2.x/2.0.0.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# [2.0.0](https://github.com/PHPOffice/PHPWord/tree/2.0.0) (WIP)
2+
3+
[Full Changelog](https://github.com/PHPOffice/PHPWord/compare/1.2.0...2.0.0)
4+
5+
## Enhancements
6+
7+
### Bug fixes
8+
9+
- MsDoc Reader : Correct Font Size Calculation by [@oleibman](https://github.com/oleibman) fixing [#2526](https://github.com/PHPOffice/PHPWord/issues/2526) in [#2531](https://github.com/PHPOffice/PHPWord/pull/2531)
10+
- TemplateProcessor Persist File After Destruct [@oleibman](https://github.com/oleibman) fixing [#2539](https://github.com/PHPOffice/PHPWord/issues/2539) in [#2542](https://github.com/PHPOffice/PHPWord/pull/2531)
11+
- Html Reader : Process Titles as Headings not Paragraphs [@0b10011](https://github.com/0b10011) and [@oleibman](https://github.com/oleibman) Issue [#1692](https://github.com/PHPOffice/PHPWord/issues/1692) PR [#2533](https://github.com/PHPOffice/PHPWord/pull/2533)
12+
13+
### Miscellaneous
14+
15+
- Bump dompdf/dompdf from 2.0.3 to 2.0.4 by [@dependabot](https://github.com/dependabot) in [#2530](https://github.com/PHPOffice/PHPWord/pull/2530)
16+
- Bump phpunit/phpunit from 9.6.13 to 9.6.14 by [@dependabot](https://github.com/dependabot) in [#2519](https://github.com/PHPOffice/PHPWord/pull/2519)
17+
- Bump mpdf/mpdf from 8.2.0 to 8.2.2 by [@dependabot](https://github.com/dependabot) in [#2518](https://github.com/PHPOffice/PHPWord/pull/2518)
18+
- Bump phpmd/phpmd from 2.14.1 to 2.15.0 by [@dependabot](https://github.com/dependabot) in [#2538](https://github.com/PHPOffice/PHPWord/pull/2538)
19+
- Bump phpunit/phpunit from 9.6.14 to 9.6.15 by [@dependabot](https://github.com/dependabot) in [#2537](https://github.com/PHPOffice/PHPWord/pull/2537)
20+
- Bump symfony/process from 5.4.28 to 5.4.34 by [@dependabot](https://github.com/dependabot) in [#2536](https://github.com/PHPOffice/PHPWord/pull/2536)
21+
- Allow rgb() when converting Html [@oleibman](https://github.com/oleibman) fixing [#2508](https://github.com/PHPOffice/PHPWord/issues/2508) in [#2512](https://github.com/PHPOffice/PHPWord/pull/2512)
22+
23+
### BC Breaks

src/PhpWord/Writer/HTML/Element/Title.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717

1818
namespace PhpOffice\PhpWord\Writer\HTML\Element;
1919

20+
use PhpOffice\PhpWord\Element\Title as PhpWordTitle;
21+
use PhpOffice\PhpWord\Style;
2022
use PhpOffice\PhpWord\Writer\HTML;
23+
use PhpOffice\PhpWord\Writer\HTML\Style\Font;
2124

2225
/**
2326
* TextRun element HTML writer.
@@ -33,7 +36,7 @@ class Title extends AbstractElement
3336
*/
3437
public function write()
3538
{
36-
if (!$this->element instanceof \PhpOffice\PhpWord\Element\Title) {
39+
if (!$this->element instanceof PhpWordTitle) {
3740
return '';
3841
}
3942

@@ -47,9 +50,9 @@ public function write()
4750
$text = $writer->write();
4851
}
4952
$css = '';
50-
$style = \PhpOffice\PhpWord\Style::getStyle('Heading_' . $this->element->getDepth());
53+
$style = Style::getStyle('Heading_' . $this->element->getDepth());
5154
if ($style !== null) {
52-
$styleWriter = new \PhpOffice\PhpWord\Writer\HTML\Style\Font($style);
55+
$styleWriter = new Font($style);
5356
$css = ' style="' . $styleWriter->write() . '"';
5457
}
5558

0 commit comments

Comments
 (0)