* Fill Pattern Start and End Colors Fix #2441. The Fill constructor sets start color to white and end color to black and the Xlsx writer writes these values to the output file. This appears to be the wrong setting for all 7 LIGHT* pattern types, 2 of the 7 DARK* patterns (DARKGRAY and DARKTRELLIS), and 1 of the 3 GRAY patterns (GRAY0625). When the wrong colors are written at save time, those patterns are not as expected. Xls writer does not appear to have the same problem. The XML does not require either a start or end color, and the omission of these colors in the file being read was responsible for the problem. The code is changed to mimic that behavior by omitting the color tags at write time if they have not changed from when they were created by the Fill constructor (they will be written for gradient or solid patterns regardless). This is another change which is easier to confirm via samples rather than tests. There are separate samples for Xlsx and Xls; as Excel will be quick to warn you, Xls is not as fully functional as Xlsx with respect to fill patterns. The samples do include a cell where one of the cells (LightGrid in C11) explicitly specifies the "default" colors. * Scrutinizer It somehow ascribed to me a problem in code which was unchanged by this PR. Correct it anyhow, along with some Phpstan fixes (errors now ignored because of change). * Added Tests Also corrected some docBlock problems with Style/*/parent and getSharedComponent. * Create 2 Abstract Methods Scrutinizer complained that 2 methods found in all Supervisor sub-types were not defined in Supervisor. Add abstract methods to satisfy it. * Scrutinizer Ignoring Typehints Try this instead. * Slight Improvement Better handling of Style->getParent(). |
||
|---|---|---|
| .. | ||
| AlignmentTest.php | ||
| BorderRangeTest.php | ||
| BorderTest.php | ||
| ColorTest.php | ||
| ConditionalTest.php | ||
| ExportArrayTest.php | ||
| FillTest.php | ||
| FontTest.php | ||
| NumberFormatBuiltinTest.php | ||
| NumberFormatRoundTest.php | ||
| NumberFormatTest.php | ||
| StyleTest.php | ||