Commit Graph

3424 Commits

Author SHA1 Message Date
oleibman 64e61d8dec
Prep Work for Phpstan Upgrade (#2728)
Dependabot submitted PRs #2719 and #2720 to upgrade Phpstan. As with most Phpstan upgrades, there are new error messages; this PR is an attempt to fix all 58 of the new problems in order to allow the upgrade to proceed.

Most of these fixes involve the addition of doc-block type annotations, often involving the assignment of the 'objectionable' portion of the statement to a new variable. Some use explicit casting when I am sure that's safe. Some (Reader/Ods) involve defeating result caching by Phpstan.
2022-04-10 08:14:05 -07:00
MarkBaker 83aaf32161 Handle selected cells 2022-04-06 20:37:13 +02:00
aswinkumar863 4db82032b4
Remove table by name cs fix 2022-04-03 18:51:06 +05:30
aswinkumar863 feffb76944
Added Column Formula
Option to add column formula that applied automatically
for any new rows added to the table range
2022-04-03 18:27:38 +05:30
aswinkumar863 bc6ec1932a
Auto adjust table range using ReferenceHelper
Automatically adjusts table range on insertion and
deletion of rows and columns within table range
2022-04-03 18:27:00 +05:30
aswinkumar863 50b91e8ede
Remove table By name
Option to remove the table from table collection of
worksheet
2022-04-03 18:24:38 +05:30
aswinkumar863 3c3d949a5d
Added table name validation
Validation added for
- invalid characters
- invalid names ("C", "c", "R", or "r")
- cell references
- space separate words
- maxlength of 255 characters
- unique table names across worksheet
2022-04-03 18:23:13 +05:30
aswinkumar863 0e3dbb7e03
Merge branch 'PHPOffice:master' into Table-for-Xlsx 2022-04-03 18:06:24 +05:30
dependabot[bot] 28bb2cd7c7
Bump phpunit/phpunit from 9.5.16 to 9.5.20 (#2726)
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.16 to 9.5.20.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.16...9.5.20)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-03 05:13:55 -07:00
dependabot[bot] 1ae8ef9651
Bump dompdf/dompdf from 1.2.0 to 1.2.1 (#2721)
Bumps [dompdf/dompdf](https://github.com/dompdf/dompdf) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/dompdf/dompdf/releases)
- [Commits](https://github.com/dompdf/dompdf/compare/v1.2.0...v1.2.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-03 04:56:17 -07:00
MarkBaker 3ae5a3fae3 Additional unit tests for BColumnAndRow methods, to verify that they still work as expected 2022-04-02 21:37:05 +02:00
MarkBaker 6b4ffda5ae Add functionality to adjust CellRange by "modifying" the from/to CellAddress Value objects 2022-04-01 15:41:55 +02:00
MarkBaker 1849737abc Add functionality to shift RowRange and ColumnRange 2022-04-01 11:26:47 +02:00
MarkBaker 62238bc011 Initial work on deprecating `ByColumnAndRow` methods; and providing functionality to use the basic cellAddress methods to be used with a string cell address (e.g. `C5`); an array of columnId and rowId (e.g. `[3, 5]`) or a new CellAddress object.
Current implementation for all methods that take a single cell reference argument:
 - `setCellValue()`
 - `setCellValueExplicit()`
 - `getCell()`
 - `cellExists()`
 - `setBreak()`
 - `freezePane()`
 - `getComment()`

Also introducing a CellRange object to work with similar cases for methods that accept a cell range rather than simply a cell address; and RowRange/ColumnRange objects for those cases.

Still need to apply to methods that accept a cell range or single cell:
 - `mergeCells()`
 - `unmergeCells()`
 - `protectCells()`
 - `unprotectCells()`
 - `setAutoFilter()`

Then there's a few special cases that accept row and column ranges, not simply cell ranges; or a series of cell ranges.
2022-03-31 23:22:48 +02:00
aswinkumar863 257c22277c
Merge branch 'PHPOffice:master' into Table-for-Xlsx 2022-03-26 17:04:48 +05:30
Mark Baker 8885c4eeef
Merge pull request #2713 from PHPOffice/Filter-return-result-array-indexes
Bugfix to returned column indexes for FILTER() by row
2022-03-24 22:24:39 +01:00
MarkBaker 2ab582a707 Bugfix to returned column indexes for FILTER() by row 2022-03-24 22:12:08 +01:00
Mark Baker 11edcc9f96
Merge pull request #2711 from PHPOffice/LookupRef-Sort-Functions
Implementation of the SORT() and SORTBY() Lookup/Reference functions
2022-03-24 18:30:41 +01:00
MarkBaker 9019523efc Additional unit testing
And a quick bugfix for cell ranges applied to both sort functions and to FILTER()
2022-03-24 17:51:06 +01:00
MarkBaker 7f00049fe8 Initial work on the SORT() and SORTBY() Lookup/Reference functions
The code could stil do with some cleaning up, and better optimisation for memory usage; but all tests are passing... that's for full multi-level sorting (including direction), and allowing for correct sorting of sting/numeric datatypes.
2022-03-24 12:21:27 +01:00
oleibman 6a349ccf5a
Scrutinizer Faulty Analysis (#2704)
Despite typehint, Scrutinizer assigns union type to a variable, resulting in subsequent faulty analysis of a method call invoked on that variable. Adding a bogus routine that will never actually be called to one module eliminates 8 Scrutinizer errors.
2022-03-21 14:29:57 -07:00
oleibman c112802023
Eliminate Most Scrutinizer Problems in Test Suite (#2699)
* Eliminate Most Scrutinizer Problems in Test Suite

Mostly minor code changes, with some annotations.

* Missed 2 php-cs-fixer Problems

They should be fixed now.
2022-03-21 13:58:42 -07:00
oleibman 2482203c3e
Resolve Scrutinizer Reports for Samples (#2691)
These are handled about 50-50 between code changes when reasonable, and annotations when not. No source code is changed.
2022-03-21 13:17:25 -07:00
Mark Baker 0ce56b1655
Merge pull request #2707 from PHPOffice/LookupRef-Filter-Function
Initial work implementing the FILTER() Lookup/Reference function
Tighten up on vector formats; and provide a couple of helper methods for testing row/column vectors
2022-03-20 18:18:15 +01:00
MarkBaker f3bb61f3e4 Initial work implementing the FILTER() Lookup/Reference function
Tighten up on vector formats; and provide a couple of helper methods for testing row/column vectors
2022-03-20 18:01:30 +01:00
Mark Baker 1642ee4eb1
Merge pull request #2702 from PHPOffice/Xls-Reader-CF-Styling
Support fill style and color for reading CF Formats
2022-03-19 19:57:52 +01:00
MarkBaker 0a9d15407f Suport fill style and color for reading CF Formats 2022-03-19 19:47:14 +01:00
Mark Baker be734cf922
Merge pull request #2696 from PHPOffice/Xls-Reader-Conditional-Formatting
Xls Reader: initial work on reading conditional formatting
Currently the ranges and CF Rules are read, but only the most basic style information for the font (size, weight and colour)

This will be expanded with future PRs
2022-03-19 16:37:42 +01:00
Mark Baker 23e2d702ff
Merge branch 'master' into Xls-Reader-Conditional-Formatting 2022-03-19 16:21:14 +01:00
MarkBaker be8c444951 More minor tweaks 2022-03-19 16:15:48 +01:00
MarkBaker aea156ff76 Minor tweaks 2022-03-19 16:03:17 +01:00
MarkBaker 3803658897 Some basic reading of font style information for CF Styles 2022-03-19 15:43:07 +01:00
MarkBaker 3767917ee5 Stubs for reading style information for Conditional Formatting 2022-03-19 14:48:50 +01:00
Mark Baker 1bd5369295
Merge pull request #2667 from kbond/simple-cache-2
Allow `psr/simple-cache` 2.x
2022-03-19 12:43:42 +01:00
Mark Baker 0e8c470ca6
Merge branch 'master' into simple-cache-2 2022-03-19 12:27:52 +01:00
Mark Baker 7e9edf5907
Merge pull request #2698 from PHPOffice/Xls-Reader-DataValidations-Refactoring
Move DataValidation switch statements into a dedicated helper class
2022-03-19 12:18:34 +01:00
MarkBaker c73bb612e0 Unit tests for Xls Reader DataValidation 2022-03-19 12:04:14 +01:00
Mark Baker d93f1b2800
Merge branch 'master' into simple-cache-2 2022-03-18 23:05:33 +01:00
MarkBaker 2dc9fc6bb7 Move DataValidation switch statements into a dedicated helper class 2022-03-18 22:38:24 +01:00
MarkBaker 45c08d6cd4 Initial work on reading conditional styles for the Xls Reader
Successfully reading the CF ranges and CF rules; not yet reading the styles
2022-03-18 21:09:32 +01:00
Mark Baker 0e7ee37ea6
Merge pull request #2695 from PHPOffice/Error-Handling-Spill-Calc
Add basic support for Error functions when the error is #SPILL! or #CALC!
2022-03-18 17:59:58 +01:00
MarkBaker 21b784f200 Add basic support for Error functions when the error is #SPILL! or #CALC! 2022-03-18 17:44:26 +01:00
Mark Baker dae5dfd6b6
Merge pull request #2694 from PHPOffice/Implementation-of-UNIQUE()-Function
Fix scrutinizer issue complaint
2022-03-18 15:20:08 +01:00
MarkBaker 75e45057f3 Fix scrutinizer issue complaint 2022-03-18 15:07:13 +01:00
Mark Baker 4847e05212
Merge pull request #2692 from PHPOffice/Implementation-of-UNIQUE()-Function
Initial work implementing the new UNIQUE() Lookup/Reference array function
2022-03-18 14:40:52 +01:00
MarkBaker c8cf193301 Initial work implementing the new UNIQUE() Lookup/Reference array function 2022-03-18 14:18:37 +01:00
Mark Baker 576fbc43c9
Merge pull request #2690 from PHPOffice/UnitTests_ReferenceHelper-DataValidation
More unit testing for inserting/deleting rows/columns with DataValida…
2022-03-17 16:05:45 +01:00
MarkBaker f6fcc4de87 More unit testing for inserting/deleting rows/columns with DataValidation, ConditionalFormatting and PrintArea 2022-03-17 15:48:30 +01:00
MarkBaker 9b3c3f4adf Merge branch 'master' into Xls-Reader-Conditional-Formatting 2022-03-17 12:11:19 +01:00
Mark Baker 178f748bc2
Merge pull request #2689 from PHPOffice/Issue-2678_Update-CF-Ranges-and-Conditions-on-Insert/Delete
Fix issues with updating Conditional Formatting when inserting/deleting rows/columns
2022-03-17 12:05:18 +01:00