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leibman@users.noreply.github.com>
Date: Fri, 29 Dec 2023 13:48:08 -0800
Subject: [PATCH 2/6] Add Pseudo Change Log Entry
---
docs/changes/1.x/1.3.0.md | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 docs/changes/1.x/1.3.0.md
diff --git a/docs/changes/1.x/1.3.0.md b/docs/changes/1.x/1.3.0.md
new file mode 100644
index 0000000000..cb8e11eecc
--- /dev/null
+++ b/docs/changes/1.x/1.3.0.md
@@ -0,0 +1,15 @@
+# [1.3.0](https://github.com/PHPOffice/PHPWord/tree/1.3.0) (WIP)
+
+[Full Changelog](https://github.com/PHPOffice/PHPWord/compare/1.2.0...1.3.0)
+
+## Enhancements
+
+### Bug fixes
+
+- MsDoc Reader : Correct Font Size Calculation by [@oleibman](https://github.com/oleibman) Issue [#2526](https://github.com/PHPOffice/PHPWord/issues/2526) PR [#2531](https://github.com/PHPOffice/PHPWord/pull/2531)
+- 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)
+- Table Borders Fixes by [@oleibman](https://github.com/oleibman) Issue [#2402](https://github.com/PHPOffice/PHPWord/issues/2402) Issue [#2474](https://github.com/PHPOffice/PHPWord/issues/2474) PR [#2535](https://github.com/PHPOffice/PHPWord/pull/2535)
+
+### Miscellaneous
+
+### BC Breaks
From a4178cb9eaef526e4d89597e1e0bb993c3f7ebc3 Mon Sep 17 00:00:00 2001
From: oleibman <10341515+oleibman@users.noreply.github.com>
Date: Fri, 29 Dec 2023 17:57:41 -0800
Subject: [PATCH 3/6] Html Font background-color
Code to support it was missing, and is now added.
---
src/PhpWord/Writer/HTML/Style/Font.php | 7 +++++++
tests/PhpWordTests/Shared/Html2402Test.php | 1 +
2 files changed, 8 insertions(+)
diff --git a/src/PhpWord/Writer/HTML/Style/Font.php b/src/PhpWord/Writer/HTML/Style/Font.php
index eb59d02d1e..29b35687a7 100644
--- a/src/PhpWord/Writer/HTML/Style/Font.php
+++ b/src/PhpWord/Writer/HTML/Style/Font.php
@@ -73,6 +73,13 @@ public function write()
} elseif ($style->isRTL() === false) {
$css['direction'] = 'ltr';
}
+ $shading = $style->getShading();
+ if ($shading !== null) {
+ $fill = $shading->getFill();
+ if (!empty($fill)) {
+ $css['background-color'] = preg_match('/^[0-9a-fA-F]{6}$/', $fill) ? "#$fill" : $fill;
+ }
+ }
return $this->assembleCss($css);
}
diff --git a/tests/PhpWordTests/Shared/Html2402Test.php b/tests/PhpWordTests/Shared/Html2402Test.php
index b934d96855..f3f7f78c0a 100644
--- a/tests/PhpWordTests/Shared/Html2402Test.php
+++ b/tests/PhpWordTests/Shared/Html2402Test.php
@@ -73,6 +73,7 @@ public function testParseTableBorder0(): void
self::assertSame($expected, $count);
$substring2 = 'border-top-style: dotted; border-top-color: #FF0000; border-left-style: dotted; border-left-color: #FF0000; border-bottom-style: dotted; border-bottom-color: #FF0000; border-right-style: dotted; border-right-color: #FF0000;';
self::assertSame(1, substr_count($content, $substring2));
+ self::assertStringContainsString('style="background-color: #00FF00;">header c', $content);
}
public function testParseTableStyleBorderNone(): void
From 7c4eb2102fa4a928e62a4b5d8f9a6adaead79360 Mon Sep 17 00:00:00 2001
From: oleibman <10341515+oleibman@users.noreply.github.com>
Date: Tue, 21 May 2024 21:45:31 -0700
Subject: [PATCH 4/6] Update Html.php
---
src/PhpWord/Shared/Html.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/PhpWord/Shared/Html.php b/src/PhpWord/Shared/Html.php
index 5f50e644c3..f64dc30466 100644
--- a/src/PhpWord/Shared/Html.php
+++ b/src/PhpWord/Shared/Html.php
@@ -147,7 +147,7 @@ protected static function parseInlineStyle($node, $styles = [])
break;
case 'bgcolor':
// tables, rows, cells e.g.
- HtmlColours::setArrayColour($styles, 'bgColor', $val);
+ HtmlColours::setArrayColour($styles, 'bgColor', self::convertRgb($val));
break;
case 'valign':
@@ -726,11 +726,11 @@ protected static function parseStyleDeclarations(array $selectors, array $styles
break;
case 'color':
- HtmlColours::setArrayColour($styles, 'color', $value);
+ HtmlColours::setArrayColour($styles, 'color', self::convertRgb($value));
break;
case 'background-color':
- HtmlColours::setArrayColour($styles, 'bgColor', $value);
+ HtmlColours::setArrayColour($styles, 'bgColor', self::convertRgb($value));
break;
case 'line-height':
From 34f252307234f2087fa299e52715d3cc27f1d03e Mon Sep 17 00:00:00 2001
From: oleibman <10341515+oleibman@users.noreply.github.com>
Date: Tue, 28 Jan 2025 22:04:30 -0800
Subject: [PATCH 5/6] Update StyleTableTest.php
---
tests/PhpWordTests/Reader/Word2007/StyleTableTest.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/PhpWordTests/Reader/Word2007/StyleTableTest.php b/tests/PhpWordTests/Reader/Word2007/StyleTableTest.php
index fd1a69c0b8..cb8c255018 100644
--- a/tests/PhpWordTests/Reader/Word2007/StyleTableTest.php
+++ b/tests/PhpWordTests/Reader/Word2007/StyleTableTest.php
@@ -1,4 +1,5 @@
Date: Tue, 28 Jan 2025 22:05:00 -0800
Subject: [PATCH 6/6] Update Html2402Test.php
---
tests/PhpWordTests/Shared/Html2402Test.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/PhpWordTests/Shared/Html2402Test.php b/tests/PhpWordTests/Shared/Html2402Test.php
index f3f7f78c0a..043aa0361e 100644
--- a/tests/PhpWordTests/Shared/Html2402Test.php
+++ b/tests/PhpWordTests/Shared/Html2402Test.php
@@ -1,4 +1,5 @@