PhpSpreadsheet/tests/PhpSpreadsheetTests
oleibman a32861a0a0
Copy from Xls(x) to Html/Pdf Loses Drawings (#2788)
Drawings in an Xlsx file are stored in such a way that Php can read their contents using the `zip:` protocol. This does not, however, work when the file is read by PhpSpreadsheet and then saved as Html or Pdf, since the browser will not recognize that protocol even if the file is available. Such drawings need to be saved in the html as embedded images in order for the copy to display them properly. This is true even when the writer is set to not embed images (default).

An additional problem arises when an Html file with an embedded image is read, because `Worksheet\Drawing::setPath` attempts to validate the path, which it cannot do for the `data:image` Url which embedded images use.

And yet another problem. Writer/Html writes out a MemoryDrawing as a png using the imagepng function; but then declares it as jpeg in the Html. This is now corrected.

And a fourth problem. Writer/Html ignores the last row if it contains nothing but a Memory Drawing, which can be true when copying an Xls file.

These changes are testable (it's how I discovered the second part of this parlay). I think it is also useful to add a sample to see the results of this type of copy.
2022-05-07 08:10:24 -07:00
..
Calculation Resolve Calculation Engine bug with row and column ranges being identified as named ranges, adding overhead with the additional validation to process that named range 2022-04-15 14:53:33 +02:00
Cell Add functionality to adjust CellRange by "modifying" the from/to CellAddress Value objects 2022-04-01 15:41:55 +02:00
Chart DocBlock Changes for Chart/Title 2021-07-02 14:33:43 -07:00
Collection More significant reductions in memory usage for peaks, and faster execution times for key Cell Collection methods 2022-04-30 17:07:24 +02:00
Custom Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
Document Fix Fluke Failure in Document Properties Test (#2738) 2022-04-17 08:44:29 -07:00
Features/AutoFilter/Xlsx Issue 2216 resolve office365 auto filter structure move (#2218) 2021-07-12 03:19:40 +02:00
Functional Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
Helper Set precision for Database function unit tests, for RowColumnReference and Dimension Helper unit tests (#2604) 2022-02-18 21:37:26 +01:00
Reader Real Errors Identified in Calculation by Scrutinizer (#2774) 2022-04-30 19:13:17 -07:00
Shared Eliminate Most Scrutinizer Problems in Test Suite (#2699) 2022-03-21 13:58:42 -07:00
Style Eliminate Most Scrutinizer Problems in Test Suite (#2699) 2022-03-21 13:58:42 -07:00
Worksheet Update logic in Cell Iterators to use Cell Collection directly where appropriate, bypassing the overhead of additional calls through the worksheet with extra checks and validations 2022-05-06 10:11:01 +02:00
Writer Copy from Xls(x) to Html/Pdf Loses Drawings (#2788) 2022-05-07 08:10:24 -07:00
CellReferenceHelperTest.php Provide $includeAbsoluteReferences option for the CellReferenceHelper when updating cell addresses 2022-03-16 19:14:50 +01:00
CommentTest.php Namespacing Phase 2 - Styles (#2471) 2022-02-11 06:42:04 -08:00
DefinedNameFormulaTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
DefinedNameTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
DocumentGeneratorTest.php Move documentation builder to infra so that it isn't included in non `--dev` composer downloads 2021-05-28 22:35:37 +02:00
HashTableTest.php Improve Coverage for HashTable, Fix Clone 2021-05-30 13:03:37 +02:00
IOFactoryTest.php Allow Reader format identification to use a subset of possible Readers 2022-04-19 14:24:53 +02:00
LocaleGeneratorTest.php Fix phpcs, phpstan and scrutinizer issues 2021-05-28 22:35:37 +02:00
NamedFormulaTest.php Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
NamedRange2Test.php Validate Input to SetSelectedCells (#2280) 2021-09-11 06:55:00 -07:00
NamedRangeTest.php Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
ReferenceHelperTest.php More unit testing for inserting/deleting rows/columns with DataValidation, ConditionalFormatting and PrintArea 2022-03-17 15:48:30 +01:00
SettingsTest.php Fix SettingsTest 2021-06-30 11:33:35 -07:00
SpreadsheetTest.php FIX: Invalid styles in rowDimensions of added external sheet. 2022-04-12 13:38:19 +02:00