Commit Graph

3866 Commits

Author SHA1 Message Date
MarkBaker b6d3ad1678 DealerDirect have renamed the branch for phpcodesniffer-composer-installer from master to main
(cherry picked from commit 247f9cb7f9)
2023-02-08 07:54:10 +01:00
MarkBaker 030a8e2664 Prepare ChangeLog for next release 2023-01-24 21:17:11 +01:00
MarkBaker eeb8582f9c Update ChangeLog 1.27.0 2023-01-24 21:07:45 +01:00
MarkBaker 8fc7d986f2 Formatting in documentation 2023-01-24 11:52:12 +01:00
Mark Baker 366592648c Merge pull request #3315 from PHPOffice/Iterators_Empty-within-range-option
Option to specify a range of columns/rows for the Row/Column `isEmpty()` methods
2023-01-23 11:50:02 +01:00
MarkBaker 4b72546050 Option to specify a range of columns/rows for the Row/Column isEmpty() methods 2023-01-23 11:35:19 +01:00
MarkBaker 4e79838da4 Patreon 2023-01-22 17:17:56 +01:00
MarkBaker 79c49ea99a Patreon 2023-01-22 13:32:35 +01:00
Mark Baker 964eb2750d Merge pull request #3314 from PHPOffice/CellIterator-Option-to-create-new-cell-or-return-null
Provide an option for Cell Iterators to return a null or create a new cell when cell doesn't exist
2023-01-21 18:17:48 +01:00
MarkBaker 8ad39f7cc9 Update Documentation 2023-01-21 17:40:30 +01:00
MarkBaker 27bdda2aa7 Update Change Log 2023-01-21 17:40:30 +01:00
MarkBaker 9a752ef5b3 Provide an option that determines whether Cell Iterators should create a new cell or return a null when they try to access a cell that does not exist 2023-01-21 17:40:30 +01:00
Mark Baker 5419eee3b6 Merge pull request #3311 from PHPOffice/StructuredReference_Invalid-Column-return-#REF!
For Structured References, an Invalid column reference should return an Excel #REF! error
2023-01-21 11:54:36 +01:00
Mark Baker 346ec071e4 Merge branch 'master' into StructuredReference_Invalid-Column-return-#REF! 2023-01-21 11:18:48 +01:00
MarkBaker d0910bd263 Additional unit tests for invalid column name 2023-01-21 02:47:33 +01:00
MarkBaker e02439aeb1 For Structured References, an Invalid column reference should return an Excel #REF! error 2023-01-21 02:42:12 +01:00
oleibman 84e4896192 Catch Up Change Log (#3313)
Prior to release 1.27.
2023-01-20 17:41:30 -08:00
oleibman 6443416828 Xls Reader Vertical Break and Writer Page Order (#3306)
Fix #3055. Xls Reader can set vertical break specifying row 0, causing an exception. It is doubtful that Excel needs a row for a vertical break; code is changed to use row 1 if the input file specifies row 0 (or lower). Code in question has not been exercised in unit test suite. Similarly, code to set horizontal break (which probably does not have a bug) is not exercised in test suite. Finally, page order in Writer incorrectly uses value in opposite way that Reader does. A new sample is added to illustrate that these are all handled correctly; it is easier to verify this by visually comparing the source spreadsheet and the copy made from it. A unit test is also added for the same spreadsheet to formally assert that the 3 properties in question are both read and written correctly.
2023-01-20 17:33:19 -08:00
Mark Baker 1194b25575 Merge pull request #3309 from PHPOffice/RowIterator_Destructor
Add destructor for RowIterator to ensure disconnection from worksheet
2023-01-20 12:48:52 +01:00
MarkBaker 89c67431a8 Add destructor for RowIterator to ensure disconnection from worksheet 2023-01-20 12:30:57 +01:00
Mark Baker da3bcc3fe4 Merge pull request #3302 from PHPOffice/Iterator_Method-Synonyms
getColumnIterator() and getRowIterator() synonyms for getCellIterator() methods
2023-01-19 13:43:07 +01:00
MarkBaker 7127c73108 getColumnIterator() getRowIterator() synonyms for getCellIterator() methods in Row and Column objects 2023-01-19 12:56:45 +01:00
Mark Baker 80e270b2a3 Merge pull request #3300 from PHPOffice/Reader-Options_Docblock-Updates
Update to docblocks
2023-01-18 09:23:37 +01:00
Mark Baker ce81ca8862 Merge branch 'master' into Reader-Options_Docblock-Updates 2023-01-17 23:24:01 +01:00
MarkBaker c9d9207b12 Update to docblocks 2023-01-17 18:09:57 +01:00
oleibman 8497a320ea Resolve Phpstan Messages in Calculation Statistical (#3290)
* Resolve Phpstan Messages in Calculation Statistical

Reduce number of Phpstan messages by addressing their issues.

I did not eliminate the messages for Trends, because I did not understand why it is working as it does, so felt it was better to leave it alone.

* Scrutinizer

A new false positive.
2023-01-16 07:19:39 -08:00
oleibman c93d2a53db Resolve Phpstan Messages in Calculation Functions Internal and MathTrig (#3288)
Reduce number of Phpstan messages by addressing their issues.
2023-01-16 06:15:02 -08:00
oleibman ac5299b5df Minor Fix for AND/OR/XOR (#3287)
* Minor Fix for AND/OR/XOR

These 3 fall into the set of functions where Excel treats string literals differently depending on whether they are passed to the function directly or as a cell reference. PhpSpreadsheet is updated to try to duplicate that logic. New tests are added. Some existing test results had to change as a result of this code change.

* Adopt A Suggestion From Mark Baker

Reduce if statements by adding functions.
2023-01-16 05:35:28 -08:00
Jonathan Goode b043a01055 RE: #3294 - provide a sample that sets the X-axis as type "value" (#3295) 2023-01-15 08:59:00 -08:00
oleibman a5f1de02e3 Resolve Phpstan Messages in Calculation Financial (#3284)
Reduce number of Phpstan messages by addressing their issues.
2023-01-15 08:18:33 -08:00
oleibman 811406ba7a Resolve Phpstan Messages in Calculation Engineering and DateTime (#3283)
Reduce number of Phpstan messages by addressing their issues.
2023-01-14 07:29:51 -08:00
oleibman a3f3d2c9ad Clean Up Documentation for Worksheet (#3281)
* Clean Up Documentation for Worksheet

This PR was intended to clean up Phpstan/Scrutinizer messages regarding Worksheet. It is, for the most part, straightforward, but there is one problem which complicates things. The frequently-called public method `getParent` returns `Worksheet` or `null` but is documented to return only `Worksheet`. This can be addressed in either of two ways - change the code to match the documentation (smaller number of changes but a backwards compatibility break), or change the documentation to match the code (larger number of changes but no compatibility break). I have prepared a PR for each approach, but avoiding a compatibility break seems better, so I am pushing the latter. I can switch to the other if preferred. Most existing internal calls to `getParent` are changed to use a new method `getParentOrThrow`, which will throw an exception if parent is null. These calls would all have thrown a null pointer exception anyhow in that situation, so this should not cause any new breaks.

* Scrutinizer

One false positive, and one message leading to a minor code improvement.
2023-01-11 23:34:52 -08:00
oleibman e742bf2294 Attempt To Honor Fit to 1-Page Height for Html/Pdf (#3279)
* Attempt To Honor Fit to 1-Page Height for Html/Pdf

Fix #3266. Each sheet in a spreadsheet can specify that it be set to fit width or height to a fixed number of pages. Mpdf and most browsers already handle the common case of fit to 1 page wide; I am unable to find a solution for Dompdf or Tcpdf. Code is added for the common case of fit to 1 page high when possible; this will usually work in Mpdf, Dompdf, and most browsers. I am not able to come up with a way to handle fit to more than 1 page wide or high.

* Synchronizer

Remove one unused assignment in test.
2023-01-11 12:02:21 -08:00
oleibman d5b13f64d5 Change Test To Avoid Bug in Latest Php (#3289)
Unit tests were failing at Github, having nothing to do with PhpSpreadsheet. Change test to avoid bug, which is reported at https://github.com/php/php-src/issues/10285
2023-01-10 20:19:57 -08:00
Mark Baker 9f0ec1cb35 Merge pull request #3282 from PHPOffice/Reader_Minor-Flag-Modifications
IGNORE_EMPTY_CELLS flag
2023-01-07 11:59:59 +01:00
MarkBaker 8406cc6176 IGNORE_EMPTY_CELLS flag 2023-01-07 11:16:32 +01:00
Mark Baker 4b16f36bf4 Merge pull request #3278 from kbond/issue-3277-reproducer
Reproducer for #3277
2023-01-04 11:43:06 +01:00
Mark Baker 8602496fcb Merge branch 'master' into issue-3277-reproducer 2023-01-04 11:37:19 +01:00
MarkBaker 6f29e9ea49 Fix for single row/column tables... though very weird to create manually in MS Excel, because creating a single row table always creates a two row table (1 row headers and 1 row data). But subsequently hiding the header row; and then deleting that row will create such a table. 2023-01-04 11:17:46 +01:00
oleibman 46fdc87bf8 Update Change Log (#3280)
Add changes from last month not already included.
2023-01-03 19:27:54 -08:00
Kevin Bond 9366c3ea8f add reproducer 2023-01-03 11:52:46 -05:00
Mark Baker e980f97298 Merge pull request #3276 from PHPOffice/Structured-Reference_Unhappy-Path
Use exception code rather than exception message for #Headers Structured Reference Exception
2023-01-03 12:57:06 +01:00
MarkBaker 0e3f1f187d Use exception code rather than exception message to identify whether the Calc Engine should throw an exception or push to stack for Structured Reference Exceptions 2023-01-03 12:27:20 +01:00
Mark Baker 7e345ad012 Merge pull request #3275 from PHPOffice/Structured-Reference_Header-Reference-when-Disabled
Unhappy path for Structured References
2023-01-03 02:45:46 +01:00
Mark Baker 23c7b952c5 Merge branch 'master' into Structured-Reference_Header-Reference-when-Disabled 2023-01-02 22:22:44 +01:00
MarkBaker 1bb0d56b15 Unhappy path for Structured References (referencing #Headers when headers are hidden) 2023-01-02 22:01:10 +01:00
oleibman 644547fb86 Update Column Reference for Columns Beginning with Y and Z (#3264)
Fix #3263. Code was comparing column string to max column (XFD), but comparison was done by strings so that any column beginning with Y or Z would seem to exceed the max and would be handled incorrectly. Change to compare to maximum integer index of column (16384) instead.
2023-01-01 15:29:04 -08:00
oleibman d2938477d9 Xlsx Reader/Writer Composite Charts (#3265)
Fix #2333. Thanks to @SSI-johnnypops for discovering the problem and formulating most of the solution. The classes involved in setting up composite charts made it relatively easy to code them; however, there can be problems when reading a spreadsheet with such a chart and then saving a copy of it. In  particular, the ordering conventions when reading the chart may not match the expectations when writing. The original attempt to resolve this worked for read/write but broke one of our samples (33_Chart_create_composite), which probably means that it would break other code which is now working in the wild. It has now been refined so that it (hopefully) makes adjustments to the ordering if and only if they are required. The new code works with the failing spreadsheet reported in the issue, with the unchanged sample code, and with an alternate version of the sample which contains what is probably a better model for people to use when coding such a chart.
2023-01-01 15:08:14 -08:00
dependabot[bot] 43da1c9965 Bump mpdf/mpdf from 8.1.2 to 8.1.4 (#3273)
Bumps [mpdf/mpdf](https://github.com/mpdf/mpdf) from 8.1.2 to 8.1.4.
- [Release notes](https://github.com/mpdf/mpdf/releases)
- [Changelog](https://github.com/mpdf/mpdf/blob/development/CHANGELOG.md)
- [Commits](https://github.com/mpdf/mpdf/compare/v8.1.2...v8.1.4)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: oleibman <10341515+oleibman@users.noreply.github.com>
2023-01-01 13:56:03 -08:00
dependabot[bot] 797c861b32 Bump friendsofphp/php-cs-fixer from 3.13.0 to 3.13.1 (#3272)
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.13.0 to 3.13.1.
- [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.13.0...v3.13.1)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-01 13:34:09 -08:00