PhpSpreadsheet/samples/templates
oleibman 67bf45d700
Fill Pattern Start and End Colors (#2444)
* 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().
2021-12-18 08:53:23 -08:00
..
26template.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
27template.xls Could not read old PNG with latest libpng on Ubuntu 17.04 2017-05-26 12:47:14 +02:00
28iterators.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
30template.xls Stacked Alignment - Use Class Constant Rather than Literal (#1716) 2021-02-03 23:53:04 +01:00
30templatebiff5.xls Stacked Alignment - Use Class Constant Rather than Literal (#1716) 2021-02-03 23:53:04 +01:00
31docproperties.xls Reorganize code samples 2016-09-01 01:17:13 +09:00
31docproperties.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32chartreadwrite.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32complexChartreadwrite.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteAreaChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteAreaChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteAreaChart3.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteAreaChart3D1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteAreaPercentageChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteAreaPercentageChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteAreaPercentageChart3D1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteAreaStackedChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteAreaStackedChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteAreaStackedChart3D1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteBarChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteBarChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteBarChart3.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteBarChart3D1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteBarPercentageChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteBarPercentageChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteBarPercentageChart3D1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteBarStackedChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteBarStackedChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteBarStackedChart3D1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteBubbleChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteBubbleChart3D1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteChartWithImages1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteColumnChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteColumnChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteColumnChart3.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteColumnChart3D1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteColumnChart4.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteColumnPercentageChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteColumnPercentageChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteColumnPercentageChart3D1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteColumnStackedChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteColumnStackedChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteColumnStackedChart3D1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteDonutChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteDonutChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteDonutChart3.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteDonutChart4.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteDonutChartExploded1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteDonutChartMultiseries1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteLineChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteLineChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteLineChart3.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteLineChart3D1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteLineChartNoPointMarkers1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteLinePercentageChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteLinePercentageChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteLineStackedChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteLineStackedChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwritePieChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwritePieChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwritePieChart3.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwritePieChart3D1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwritePieChart4.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwritePieChartExploded1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwritePieChartExploded3D1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteRadarChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteRadarChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteRadarChart3.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteScatterChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteScatterChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteScatterChart3.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteScatterChart4.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteScatterChart5.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteStockChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteStockChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteStockChart3.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteStockChart4.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteSurfaceChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteSurfaceChart2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteSurfaceChart3.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
32readwriteSurfaceChart4.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
36writeLineChart1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
43mergeBook1.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
43mergeBook2.xlsx Reorganize code samples 2016-09-01 01:17:13 +09:00
46readHtml.html HTML reader supports text and background color from inline CSS, for `td` and `th` element 2017-06-23 11:28:17 +02:00
47_xlsfill.xls Fill Pattern Start and End Colors (#2444) 2021-12-18 08:53:23 -08:00
47_xlsxfill.xlsx Fill Pattern Start and End Colors (#2444) 2021-12-18 08:53:23 -08:00
Excel2003XMLTest.xml Prefer https:// URLs when available in docs & comments 2018-10-28 13:55:00 +11:00
GnumericTest.gnumeric Improve Coverage for Gnumeric (#1517) 2020-06-19 20:34:02 +02:00
OOCalcTest.ods Clean up very obsolete links 2017-12-30 19:07:22 +09:00
SylkTest.slk Improve Coverage for Sylk (#1514) 2020-06-19 20:35:44 +02:00
chartSpreadsheet.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
excel2003.short.bad.xml Improving Coverage for Excel2003 XML Reader (#1557) 2020-10-11 13:26:56 +02:00
excel2003.xml Reader XML Properties - Eliminate strtotime (#2134) 2021-05-31 11:04:07 +02:00
largeSpreadsheet.php Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
old.gnumeric Improve Coverage for Gnumeric (#1517) 2020-06-19 20:34:02 +02:00
sampleSpreadsheet.php Use DateTime Rather than gmmktime in Sample Template (#1827) 2021-02-14 18:54:49 +01:00
sampleSpreadsheet2.php Special Characters in Image File Name (#2416) 2021-12-06 06:50:09 -08:00