Load with styles should not default to black fill color
Fixes #1353 Closes #1361
This commit is contained in:
parent
a6c56d0f81
commit
e2f87e8b7a
|
@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
|
||||||
- Fix loading styles from vmlDrawings when containing whitespace [#1347](https://github.com/PHPOffice/PhpSpreadsheet/issues/1347)
|
- Fix loading styles from vmlDrawings when containing whitespace [#1347](https://github.com/PHPOffice/PhpSpreadsheet/issues/1347)
|
||||||
- Fix incorrect behavior when removing last row [#1365](https://github.com/PHPOffice/PhpSpreadsheet/pull/1365)
|
- Fix incorrect behavior when removing last row [#1365](https://github.com/PHPOffice/PhpSpreadsheet/pull/1365)
|
||||||
- MATCH with a static array should return the position of the found value based on the values submitted [#1332](https://github.com/PHPOffice/PhpSpreadsheet/pull/1332)
|
- MATCH with a static array should return the position of the found value based on the values submitted [#1332](https://github.com/PHPOffice/PhpSpreadsheet/pull/1332)
|
||||||
|
- Fix Xlsx Reader's handling of undefined fill color [#1353](https://github.com/PHPOffice/PhpSpreadsheet/pull/1353)
|
||||||
|
|
||||||
## [1.11.0] - 2020-03-02
|
## [1.11.0] - 2020-03-02
|
||||||
|
|
||||||
|
|
|
@ -1620,8 +1620,6 @@ class Xlsx extends BaseReader
|
||||||
$docStyle->getFill()->setFillType($patternType);
|
$docStyle->getFill()->setFillType($patternType);
|
||||||
if ($style->fill->patternFill->fgColor) {
|
if ($style->fill->patternFill->fgColor) {
|
||||||
$docStyle->getFill()->getStartColor()->setARGB(self::readColor($style->fill->patternFill->fgColor, true));
|
$docStyle->getFill()->getStartColor()->setARGB(self::readColor($style->fill->patternFill->fgColor, true));
|
||||||
} else {
|
|
||||||
$docStyle->getFill()->getStartColor()->setARGB('FF000000');
|
|
||||||
}
|
}
|
||||||
if ($style->fill->patternFill->bgColor) {
|
if ($style->fill->patternFill->bgColor) {
|
||||||
$docStyle->getFill()->getEndColor()->setARGB(self::readColor($style->fill->patternFill->bgColor, true));
|
$docStyle->getFill()->getEndColor()->setARGB(self::readColor($style->fill->patternFill->bgColor, true));
|
||||||
|
|
|
@ -83,8 +83,8 @@ class XlsxTest extends TestCase
|
||||||
{
|
{
|
||||||
$expectedColours = [
|
$expectedColours = [
|
||||||
1 => ['A' => 'C00000', 'C' => 'FF0000', 'E' => 'FFC000'],
|
1 => ['A' => 'C00000', 'C' => 'FF0000', 'E' => 'FFC000'],
|
||||||
3 => ['A' => '7030A0', 'C' => '000000', 'E' => 'FFFF00'],
|
3 => ['A' => '7030A0', 'C' => 'FFFFFF', 'E' => 'FFFF00'],
|
||||||
5 => ['A' => '002060', 'C' => '000000', 'E' => '92D050'],
|
5 => ['A' => '002060', 'C' => 'FFFFFF', 'E' => '92D050'],
|
||||||
7 => ['A' => '0070C0', 'C' => '00B0F0', 'E' => '00B050'],
|
7 => ['A' => '0070C0', 'C' => '00B0F0', 'E' => '00B050'],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue