Commit Graph

5508 Commits

Author SHA1 Message Date
oleibman 2d1f4e87d6 Merge pull request #4465 from oleibman/issue282
Removing Columns/Rows Containing Merged Cells
2025-05-15 01:17:36 +00:00
oleibman 37f7c0d366 Update CHANGELOG.md 2025-05-14 18:15:05 -07:00
oleibman 6786cd5f25 Something More Sophisticated
When the merged cells start outside the deleted range but end inside it, the merge is truncated to that portion which is outside the range.
2025-05-13 21:54:27 -07:00
oleibman 3e93d4d85c Merge pull request #4463 from oleibman/stan1005
More Phpstan 10 Prep
2025-05-11 22:32:16 +00:00
oleibman bc54cfd199 Update MergeCellsDeletedTest.php 2025-05-09 21:10:55 -07:00
oleibman 0245f6ba22 Removing Columns/Rows Containing Merged Cells
Fix #282, which went stale over 7 years ago, and is now reopened. This is certainly related to issue #4379. If merged cells are in the midst of deleted rows/columns, the merge may continue to exist after the deletion, leading to various problems including spreadsheet corruption. The problem is not with either Reader or Writer.

This PR will automatically unmerge all merged cells whose first cell is in the delete range before performing the deletion. This will address the corruption problem. Something more sophisticated may be required, so I won't merge this PR for a while to give me a chance to think about it some more.
2025-05-09 20:58:06 -07:00
oleibman e53a04b016 Start Calculation Changes 2025-05-08 22:44:13 -07:00
oleibman 130c6e99d2 More Phpstan 10 Prep
All of Calculation and Shared/OLE are left to tackle.
2025-05-07 23:57:33 -07:00
oleibman 89343c81f5 Merge pull request #4462 from oleibman/issue2735
Minor Documentation Update
2025-05-08 00:10:21 +00:00
oleibman 773585ad19 Minor Documentation Update
Fix #2735.
2025-05-07 17:05:30 -07:00
oleibman 3922d9ad00 Merge pull request #4453 from oleibman/issue56
Xls Writer Treat Hyperlink Starting with # as Internal
2025-05-07 03:02:50 +00:00
oleibman 8be18d1a49 Update CHANGELOG.md 2025-05-06 20:00:22 -07:00
oleibman 576ce504f9 Merge branch 'master' into issue56 2025-05-06 19:51:00 -07:00
oleibman f9b1b76322 Merge pull request #4459 from oleibman/stan1004
More Phpstan Level 10 Prep - Readers and Styles
2025-05-07 02:43:16 +00:00
oleibman 3977e2ace7 Add Style 2025-05-05 09:19:24 -07:00
oleibman 5c94de34a9 More Phpstan Level 10 Prep - Readers
Also upgrade Phpstan.
2025-05-03 21:18:55 -07:00
oleibman c2a9649782 Merge pull request #4457 from PHPOffice/dependabot/composer/squizlabs/php_codesniffer-3.12.2
Bump squizlabs/php_codesniffer from 3.12.0 to 3.12.2
2025-05-01 15:04:24 +00:00
oleibman b504baf196 Merge pull request #4458 from PHPOffice/dependabot/composer/tecnickcom/tcpdf-6.9.3
Bump tecnickcom/tcpdf from 6.9.0 to 6.9.3
2025-05-01 15:04:05 +00:00
dependabot[bot] aa88cd8f23 Bump tecnickcom/tcpdf from 6.9.0 to 6.9.3
Bumps [tecnickcom/tcpdf](https://github.com/tecnickcom/TCPDF) from 6.9.0 to 6.9.3.
- [Changelog](https://github.com/tecnickcom/TCPDF/blob/main/CHANGELOG.TXT)
- [Commits](https://github.com/tecnickcom/TCPDF/compare/6.9.0...6.9.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 11:26:54 +00:00
dependabot[bot] c82aac1d5f Bump squizlabs/php_codesniffer from 3.12.0 to 3.12.2
Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.12.0 to 3.12.2.
- [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.12.0...3.12.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 11:26:48 +00:00
oleibman c88627681c Merge pull request #4452 from oleibman/stan1003write
More Phpstan Level 10 Prep - Writers
2025-04-30 07:47:46 +00:00
oleibman 92d3c1bc7d Xls Writer Treat Hyperlink Starting with # as Internal
Fix #56, which had gone stale but is now reopened. The problem which it reported with Xlsx Writer was fixed long ago. However, Xls Writer has 2 problems regarding hyperlinks. First, some logic which should have been `if ... elseif ... else ...` was coded as `if ... if ... unconditional ...`, resulting in multiple writes and a corrupt worksheet (which Excel does fix correctly). Second, it treated a hyperlink url starting with `#` (pointer to a cell in the same spreadsheet) as external, when it should be treated as internal.

Also changed `Hyperlink::isInternal` to recognize a starting `#`, and to use `str_starts_with('sheet://')` rather than `str_contains`.
2025-04-30 00:23:35 -07:00
oleibman 662033720c Include Some Readers 2025-04-28 15:24:46 -07:00
oleibman ebb04a8811 More Phpstan Level 10 Prep - Writers 2025-04-27 07:15:26 -07:00
oleibman fb2cfed070 Merge pull request #4450 from oleibman/issue1275
Print Area and Row Break
2025-04-23 06:09:17 +00:00
oleibman f474cd6773 Update CHANGELOG.md 2025-04-22 23:06:04 -07:00
oleibman ac9a0fed7e Merge branch 'master' into issue1275 2025-04-22 22:50:27 -07:00
oleibman d8ad4b03d7 Merge pull request #4449 from oleibman/issue4448
XML Reader Recognize Indents
2025-04-23 05:45:32 +00:00
oleibman 11f0b571a4 Merge pull request #4442 from oleibman/issue4438
Micro-optimization for excelToDateTimeObject
2025-04-23 05:16:56 +00:00
oleibman 3c7afe6879 Merge pull request #4447 from oleibman/stan1002
Phpstan 10 and IterableValue Prep Part 2
2025-04-23 05:08:50 +00:00
oleibman 0d236eb274 Print Area and Row Break
Fix #1275, which had been closed as stale, and is now reopened pending the implementation of this PR. If there is a page break inside a defined print area, Excel may not render the print correctly unless the xml `brk` tag contains a `max` attribute. Libre Office renders it correctly. This seems like a bug in Excel (https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/b32ae11b-dee7-4dcb-9b46-a0feb32ce94f states that Office ignores min and max). PR #3345 (issue #3143) already addressed this problem by allowing the user to explicitly specify a `max` property in the PageBreak object. This PR eliminates the need for the user to make use of that kludge, by adding `max` to the xml whenever a page break is specified on a sheet with a defined print area. Xlsx Reader will now ignore the `max` attribute for row breaks, since it is no longer needed; it already ignores it for column breaks. The user may still set the `max` property if desired, just in case the new treatment is not adequate (I have not found a case where that is true). Two existing unit tests are very marginally changed because of this PR.
2025-04-21 23:52:08 -07:00
oleibman de9fdc3855 XML Reader Recognize Indents
Fix #4448
2025-04-20 16:10:50 -07:00
oleibman 1bd8bd90f6 Update Some More Tests 2025-04-20 00:53:29 -07:00
oleibman 455c259e41 Minor Tweak 2025-04-19 10:07:27 -07:00
oleibman 19555d6d96 Phpstan 10 and IterableValue Prep Part 2
There will probably be dozens, if not hundreds, of these before I'm ready to commit.
2025-04-18 23:27:29 -07:00
oleibman e8316367b9 Merge pull request #4439 from oleibman/stan1001
Phpstan Tweaks
2025-04-17 04:43:10 +00:00
oleibman 5f6d7410e5 Merge pull request #4445 from oleibman/changelog20250416
Prepare Changelog for New Release
4.2.0
2025-04-17 02:41:45 +00:00
oleibman ede1f642d0 Prepare Changelog for New Release 2025-04-16 19:37:48 -07:00
oleibman 5c6f2d0e34 Micro-optimization for excelToDateTimeObject
Fix #4438. Do some optimization if Excel value is an integer. This is unlikely to make much of a difference, but the use case seems pretty common (cell represents a date rather than date-time), so we may as well do it. There had been no tests for negative integer values, because Excel does not handle those well, but OpenOffice and Gnumeric handle them just fine, so add some tests for them.
2025-04-13 14:43:16 -07:00
oleibman c2b5cb3a6d ArrayEnabled and Database Functions 2025-04-13 14:32:05 -07:00
oleibman 6cec624f6a Scrutinizer 2025-04-06 20:12:01 -07:00
oleibman 1da177e0d3 Make Files Executable 2025-04-06 18:27:55 -07:00
oleibman f1a61c4c6b Phpstan Tweaks
Phpstan level 10 reports an enormous number of errors. So does the excluded missingType.iterableValue. I do not plan to introduce either any time soon. But I will submit piecemeal changes from time to time. Changes will be mostly limited to phpdoc type declarations.
2025-04-06 18:14:59 -07:00
oleibman 86cca1230a Merge pull request #4436 from oleibman/issue4435
Ods Reader No Datatype for Null Value
2025-04-06 00:32:02 +00:00
oleibman 5ce46da559 Merge branch 'master' into issue4435 2025-04-05 17:29:22 -07:00
oleibman 70a590b117 Update CHANGELOG.md 2025-04-05 17:28:31 -07:00
oleibman 19465642df Merge pull request #4437 from oleibman/stansamp
Phpstan and Samples
2025-04-05 22:04:45 +00:00
oleibman ecbd702628 Phpstan and Samples
Phpstan hasn't identified any errors in Samples in a long time. But, as it turns out, one particular error is suppressed:
```
Variable $helper might not be defined.
```
This error would be generated by almost all samples, and the errors that it suppresses will become problematic if we move to Level 10. We are not yet committed to doing that, but it is pretty easy to write a script to change the samples so that error no longer happens, and there isn't really any reason to delay doing so. The results of that script constitute this PR.
2025-04-05 13:54:20 -07:00
oleibman 5b799dbbed Ods Reader No Datatype for Null Value
Issue #4435 was initially described incorrectly. While investigating the original description, I came upon this problem. Ods Reader is trying to set some cells to null without supplying a valid DataType to setValueExplicit, causing that method to throw an exception. Reader is changed to no longer call that method when value is null and DataType is null-string.
2025-04-03 19:55:33 -07:00
oleibman d51bf5f65a Merge pull request #4429 from oleibman/stan2lv909
Phpstan Level 9: Last
2025-04-04 01:52:29 +00:00