Commit Graph

5218 Commits

Author SHA1 Message Date
oleibman 77815d2dcc Remove Previously Announced Deprecations
Remove
- Worksheet::getHashCode
- Worksheet::getProtectecCells
- Worksheet::getStyles
- Drawing::setIsUrl
- IReader::SKIP_EMPTY_CELLS
- Settings:setLibXmlLoaderOptions and getLibXmlLoaderOptions
- Writer/Html::isMpdf
2025-02-04 19:30:57 -08:00
oleibman eafbed6ca8 Merge pull request #4314 from oleibman/issue4312
CF Priority Property and Overlapping Ranges
2025-02-04 04:35:13 +00:00
oleibman e1ae687a35 Merge pull request #4240 from oleibman/issue797
Breaking Change for DataValidation
2025-02-04 04:31:00 +00:00
oleibman d93a707d37 Update CHANGELOG.md 2025-02-03 20:28:13 -08:00
oleibman cfc8b8c26f Merge branch 'master' into issue797 2025-02-03 17:50:15 -08:00
oleibman e721975cb6 Merge pull request #4333 from oleibman/issue4331
Xls Writer Parser Mis-handling TRUE/FALSE As VLOOKUP Arguments
2025-02-03 00:14:18 +00:00
oleibman 21d8f00c61 Update CHANGELOG.md 2025-02-02 16:11:54 -08:00
oleibman dd600fe621 Merge pull request #4338 from PHPOffice/dependabot/composer/friendsofphp/php-cs-fixer-3.68.5
Bump friendsofphp/php-cs-fixer from 3.66.0 to 3.68.5
2025-02-01 15:43:18 +00:00
oleibman 6523dc7ef0 Merge pull request #4337 from PHPOffice/dependabot/composer/dompdf/dompdf-3.1.0
Bump dompdf/dompdf from 3.0.2 to 3.1.0
2025-02-01 15:42:43 +00:00
oleibman fcc8ade7fe Merge pull request #4336 from PHPOffice/dependabot/composer/tecnickcom/tcpdf-6.8.2
Bump tecnickcom/tcpdf from 6.8.0 to 6.8.2
2025-02-01 15:42:09 +00:00
oleibman a8faaad961 Merge pull request #4335 from PHPOffice/dependabot/composer/squizlabs/php_codesniffer-3.11.3
Bump squizlabs/php_codesniffer from 3.11.2 to 3.11.3
2025-02-01 15:41:40 +00:00
dependabot[bot] 1e4beba5e4 Bump friendsofphp/php-cs-fixer from 3.66.0 to 3.68.5
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.66.0 to 3.68.5.
- [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.66.0...v3.68.5)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 11:35:11 +00:00
dependabot[bot] 1a9000a649 Bump dompdf/dompdf from 3.0.2 to 3.1.0
Bumps [dompdf/dompdf](https://github.com/dompdf/dompdf) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/dompdf/dompdf/releases)
- [Commits](https://github.com/dompdf/dompdf/compare/v3.0.2...v3.1.0)

---
updated-dependencies:
- dependency-name: dompdf/dompdf
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 11:35:02 +00:00
dependabot[bot] 793075a97e Bump tecnickcom/tcpdf from 6.8.0 to 6.8.2
Bumps [tecnickcom/tcpdf](https://github.com/tecnickcom/TCPDF) from 6.8.0 to 6.8.2.
- [Changelog](https://github.com/tecnickcom/TCPDF/blob/main/CHANGELOG.TXT)
- [Commits](https://github.com/tecnickcom/TCPDF/compare/6.8.0...6.8.2)

---
updated-dependencies:
- dependency-name: tecnickcom/tcpdf
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 11:34:58 +00:00
dependabot[bot] ba7976c1cc Bump squizlabs/php_codesniffer from 3.11.2 to 3.11.3
Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.11.2 to 3.11.3.
- [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases)
- [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.2...3.11.3)

---
updated-dependencies:
- dependency-name: squizlabs/php_codesniffer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 11:34:55 +00:00
oleibman 4afa7513f5 Merge pull request #4327 from oleibman/pdfchart
Pdf Charts and Drawings
2025-01-30 01:49:10 +00:00
oleibman db8c7689da Update CHANGELOG.md 2025-01-29 17:46:40 -08:00
oleibman 3c02232b2a Merge branch 'master' into pdfchart 2025-01-29 17:40:05 -08:00
oleibman a0f1efea42 Xls Writer Parser Mis-handling TRUE/FALSE As VLOOKUP Arguments
Fix #4331. Parser treats TRUE/FALSE as functions rather than constants, which is nominally harmless, but it then expects an argument count of 0 and instead sees null-string. Changed to recognize this situation and leave TRUE/FALSE/TRUE()/FALSE() unchanged.
2025-01-28 20:24:41 -08:00
oleibman 414f8a2aa1 Merge pull request #4329 from oleibman/updchglog
Update Changelog
3.9.0
2025-01-26 05:10:24 +00:00
oleibman e4211b7454 Update Changelog 2025-01-25 20:56:52 -08:00
oleibman 4a2b731ec2 Pdf Charts and Drawings
Fix #4129. Fix #4168. Html Writer, which all the Pdf writers use, defines its charts and drawings (henceforth I will just use charts for this discussion) using position:absolute and z-index. Browsers handle this correctly, but none of the Pdf writers do, and I can't think of an alternative method of styling them. The result is that the charts take up too much or too little room on the Pdf.

I suggested in the two discussions that treating the areas covered by the charts as merged cells might mitigate the problem. I think there are too many unknowns to do so automatically (and see next paragraph). However, adding to Spreadsheet new methods `mergeChartCellsForPdf` and `mergeDrawingCellsForPdf` allows the end user to do this if desired. The new methods are exercised for charts in samples/Chart/32_Chart_read_write_PDF, the results of which are much improved as a result. New samples/Pdf/21f_Drawing_mpdf does likewise for drawings.

The new methods alter the spreadsheet they are working on, which could be a problem if you still wish to work with the spreadsheet after writing it to Pdf. In that case, making a copy of the spreadsheet, then calling the new methods on the copy, and writing the copy to Pdf is probably best.
2025-01-25 19:20:37 -08:00
oleibman cde2926a9e Merge commit from fork
* Security Patch

Control characters should not be allowed in protocol.

* Tighten Up Drawing

* Fix Test
2025-01-23 21:25:36 -08:00
oleibman 89b30eb41a Merge branch 'master' into issue797 2025-01-21 20:01:25 -08:00
oleibman 8d7500b1e2 Merge branch 'master' into issue4312 2025-01-21 19:58:05 -08:00
oleibman ed66270d9c Merge pull request #4325 from oleibman/sampsup
Fix 2 Samples
2025-01-22 03:16:48 +00:00
oleibman 191bf214d9 Fix 2 Samples
Custom properties would be better in this context using j (no leading 0) rather than d (leading 0) for day of month.

Properties has the same problem, and also needs backslashes before p to make it part of a <sup> tag.
2025-01-21 19:10:54 -08:00
oleibman 3f15579d17 Merge pull request #4323 from oleibman/comppcre
Use Composer/Pcre Part 1 of Many
2025-01-21 23:15:27 +00:00
oleibman e7ae646a2d Update CHANGELOG.md 2025-01-21 15:13:02 -08:00
oleibman dfd8f3c40f Merge branch 'master' into comppcre 2025-01-21 15:07:32 -08:00
oleibman 887109541e Merge pull request #4322 from oleibman/issue4316
Html Writer Allow mailto
2025-01-21 22:06:59 +00:00
oleibman d24325ba30 Update CHANGELOG.md 2025-01-21 14:04:16 -08:00
oleibman 5f1d86932f Merge branch 'master' into issue4316 2025-01-21 14:01:35 -08:00
oleibman 3f8fea0d20 Delete 2 No-longer-needed Comments 2025-01-21 11:03:07 -08:00
oleibman d433504631 Add Comp/Pcre Phpstan Extension
Eliminate a number of annotations.
2025-01-20 20:53:08 -08:00
oleibman fde46cf08e Merge pull request #4320 from oleibman/issue4319
Mpdf and Tcpdf Hidden Columns and Merged Cells
2025-01-20 05:13:01 +00:00
oleibman 12b1690c52 Update CHANGELOG.md 2025-01-19 21:09:37 -08:00
oleibman e1984c6f1b Merge branch 'master' into issue4319 2025-01-19 21:02:02 -08:00
oleibman f33a440822 Merge pull request #4317 from oleibman/crstyle
Get Style for Row or Column
2025-01-20 04:48:09 +00:00
oleibman a72b206950 Merge branch 'master' into crstyle 2025-01-19 20:45:42 -08:00
oleibman a6cd613073 Update CHANGELOG.md 2025-01-19 20:44:50 -08:00
oleibman 9b122cd028 Use Composer/Pcre Part 1 of Many
The native preg functions (preg_match, preg_replace, etc.) often require us to add a lot of useless boilerplate code to satisfy Phpstan, Scrutinizer, etc. Composer/Pcre offers us a way to remove that boilerplate, thereby giving us a cleaner codebase. I decided to try it on a few modules, and saw a result that clearly demonstrated the usefulness of doing this (aside from the cleaner codebase).

Sample 22_Reader_issue1767 reads an Xlsx spreadsheet with complex sheet names used in defined names, and writes it to Xlsx and Xls output files. When I changed Writer/Xls/Parser to use Composer/Pcre, this sample failed in many different places writing the Xls file. It turns out that some regexes were failing not because the string didn't match, but because the regex encountered "catastrophic backtracing". Composer/Pcre throws an exception when this happens; the native preg_match does return false, but we were not checking for that. The regexes in question are now changed to something which works, and formal unit tests are added for them. Finding this previously undetected error indicates that we should proceed with this change.

An alternative to using Composer/Pcre would be to test for false after all the preg calls. I have done this in the two samples changed with this PR. That seems adequate for a small number of changes, but it really just makes for more clutter considering the large number of regexps that we use in our code. I think Composer/Pcre is a better choice.

It isn't quite transparent. Composer forces all regexps to use PREG_UNMATCHED_AS_NULL, so some match fields will now be null instead of null-string (or non-existent if the unmatched field comes at the end). Our test suite doesn't report any problem (yet) due to this change, although Phpstan is sensitive to it. Several Phpstan annotations were eliminated due to this change, but some others are now needed.

It is not necessary to do this all at once. This PR addresses all the calls in Writer. I intend to address other components in several tickets.
2025-01-17 09:44:45 -08:00
oleibman f98fd239cf Merge pull request #4315 from oleibman/duplicatesheet
Add Spreadsheet Method for Duplicating Worksheet
2025-01-16 07:45:43 +00:00
oleibman c176cc4f2a Update CHANGELOG.md 2025-01-15 23:43:22 -08:00
oleibman 5b96bcc1e2 Merge pull request #4313 from oleibman/issue4311b
Ods Reader Sheet Names with Period in Addresses and Formulas
2025-01-16 07:28:44 +00:00
oleibman 9ca6846316 Update CHANGELOG.md 2025-01-15 23:26:08 -08:00
oleibman f8bf5087ff Merge branch 'master' into issue4311b 2025-01-15 23:22:32 -08:00
oleibman 6d11fd27b5 Html Writer Allow mailto
Fix #4316. A security patch white-listed the protocols that could be used in a hyperlink. This PR adds mailto to the list.
2025-01-15 07:38:36 -08:00
oleibman eacaa25dca Merge pull request #4321 from oleibman/docprop
Tweak One Test
2025-01-15 09:47:00 +00:00
oleibman d5e69e3686 Tweak One Test
Fluke failure in CI push.
2025-01-15 01:43:42 -08:00