Commit Graph

2718 Commits

Author SHA1 Message Date
MarkBaker 5173eaa302 More grouping and renaming 2021-05-14 14:35:23 +02:00
MarkBaker fb251eb6ab Fix Exception cases to always use the PhpSpreadsheet Calculation Exception 2021-05-14 14:35:23 +02:00
MarkBaker 71bc7e6f89 Final phase of aggregating the MathTrig function implementations into commonly-themed groups 2021-05-14 14:35:23 +02:00
Adrien Crivelli ac5b96d0f1
Avoid `func` prefix in function name
As decided in
https://github.com/PHPOffice/PhpSpreadsheet/pull/1954#issuecomment-809824463
2021-05-14 20:47:17 +09:00
Owen Leibman 4bd506b414 Minor Improvement to Test Cleanup DateTime
Permit spreadsheet allocated as private member in test class to be garbage-collected after test completion.
2021-05-14 10:53:27 +02:00
Owen Leibman efe8f49123 Minor Improvement to Test Cleanup LookupRef
Permit spreadsheet allocated as private member in test class to be garbage-collected after test completion.
2021-05-14 10:30:49 +02:00
Owen Leibman 7aa83eb72f Missed One
Correct one test.
2021-05-14 09:54:24 +02:00
Owen Leibman 4df184320a Minor Improvement to Test Cleanup MathTrig
Permit spreadsheet allocated as private member in test class to be garbage-collected after test completion.
2021-05-14 09:54:24 +02:00
MarkBaker 9204d2d6b3 Updates to ensure that we're using the correct Namespaced exception 2021-05-13 16:01:30 +02:00
MarkBaker 4b17188250 That should be most of the trig implementation functions grouped and methods renamed for clarity 2021-05-13 16:01:30 +02:00
MarkBaker 0c26333e96 Start Grouping the trig functions related to sine and cosine into one class each, and rename methods 2021-05-13 16:01:30 +02:00
MarkBaker fe5fde26bb Remove a test file that I'd accidentally added 2021-05-13 16:01:30 +02:00
MarkBaker 5715bf4644 Next wave of grouping for the refactored MathTrig functions into small group classes, and renaming of methods 2021-05-13 16:01:30 +02:00
MarkBaker 22468a7965 Some initial grouping of the refactored MathTrig functions into small group classes, and renaming of methods 2021-05-13 16:01:30 +02:00
oleibman 4b82920120
Merge pull request #2036 from oleibman/mpdfcache
Mpdf Caching
2021-05-12 13:51:30 -07:00
oleibman a5b7b3074a
Merge branch 'master' into mpdfcache 2021-05-12 13:23:30 -07:00
MarkBaker 9b34f8746b Use correct Exception, ensure that Shared\Date is referenced by a synonym to ensure clarity, and ensure case-sensitivity for class references 2021-05-12 17:17:25 +02:00
MarkBaker 765d4586ae Renaming the last of the DateTime implementation methods 2021-05-12 17:17:25 +02:00
MarkBaker f7a07747fd More method renaming 2021-05-12 17:17:25 +02:00
MarkBaker aa3269a863 Some method renaming 2021-05-12 17:17:25 +02:00
MarkBaker 97472ae383 Fix AutoFilter dat break referencing the old Now::evaluate() class/method, rather than the new Current::now() 2021-05-12 17:17:25 +02:00
MarkBaker cd667500e0 Group some of the newly extracted Excel DateTime function implementations into groups of related functions with appropriate and meaningful class names, and rename the public methods to be more descriptive of their purpose 2021-05-12 17:17:25 +02:00
MarkBaker 7903827475 Deprecation notice in ChangeLog for the old Excel funcion implementations 2021-05-12 09:55:01 +02:00
oleibman 6fb3d840c2
Merge pull request #2049 from xandros15/#984
#984 Add support notContainsText for conditional styles in xlsx
2021-05-11 14:56:15 -07:00
oleibman d5492ac8ed
Merge branch 'master' into #984 2021-05-11 14:44:33 -07:00
Tanguy De Taxis d08653433c fr locale - Add JOURS function (DAYS equivalent) 2021-05-11 14:49:26 +02:00
Owen Leibman 9c43d5f1b7 Xlsx Writer Formula with Bool Result of False
Fix for #2082. Xlsx Writer was writing a cell which is a formula which evaluates to boolean false as an empty XML tag. This is okay for Excel 365, but not for Excel 2016-. Change to write the tag as a value of 0 instead, which works for all Excel releases. Add test.
2021-05-11 13:48:38 +02:00
xandros15 bb11378fca #984 fix php-cs-fixer warnings 2021-05-11 12:44:40 +02:00
MarkBaker e5bfc3c899 Add phpcs version compatibility check to pipeline 2021-05-10 22:55:32 +02:00
MarkBaker a0719d8dd4 Use modification time from properties when saving Excel5 2021-05-09 21:03:23 +02:00
MarkBaker 2ddb23574e PHPCS Fix 2021-05-08 22:50:36 +02:00
MarkBaker 9a5a630e3f Check against font attributes 2021-05-08 22:50:36 +02:00
MarkBaker bb572f757f Should fix phpstan 2021-05-08 22:50:36 +02:00
MarkBaker 60e6a59ff2 Additional refactoring 2021-05-08 22:50:36 +02:00
MarkBaker 13ec163333 phpstan appeasement 2021-05-08 22:50:36 +02:00
MarkBaker 5d6b072fb0 More Minor tweaks 2021-05-08 22:50:36 +02:00
MarkBaker e71c2e46d0 Minor style tweaks 2021-05-08 22:50:36 +02:00
MarkBaker 351804335c Refactor Gnumeric Style Reader into a separate dedicated class 2021-05-08 22:50:36 +02:00
Mark Baker d2e6db71fa
Lookup functions additional unit tests (#2074)
* Additional unit tests for VLOOKUP() and HLOOKUP()
* Additional unit tests for CHOOSE()
* Unit tests for HYPERLINK() function
* Fix CHOOSE() test for spillage
2021-05-07 23:40:30 +02:00
Nathan Dench f28eea7341 Use named regex groups and constants for regex strings 2021-05-07 14:34:05 +02:00
Nathan Dench df01db58ad Remove complexity from AddressHelper::convertToR1C1 2021-05-07 14:34:05 +02:00
Nathan Dench a96109d89b Update CHANGELOG.md with R1C1 conversion change 2021-05-07 14:34:05 +02:00
Nathan Dench 76ac008911 R1C1 conversion should handle absolute A1 references 2021-05-07 14:34:05 +02:00
Mark Baker 72a36a5bb8
Resolve issue with conditional font size set to zero in PHP8 (#2073)
* Let's see if the tests now pass against PHP8; output file looks to be good
* Font can't be both superscript and subscript at the same time, so we use if/else rather than if/if
2021-05-07 12:53:59 +02:00
Mark Baker 115e39ae0c
Issue 2066, highlighting more validation needed for LookupRef Functions (#2069)
* Issue 2066, highlighting more validation needed for LookupRef Functions
* Additional test cases
2021-05-07 11:20:38 +02:00
Mark Baker 5ee4fbf090
Implement basic autofilter ranges with Gnumeric Reader (#2057)
* Load basic autofilter ranges with Gnumeric Reader
* Handle null values passed to row height/column with/merged cells/autofilters
2021-05-04 22:32:12 +02:00
oleibman 4be9366722
Gnumeric Better Namespace Handling (#2022)
* Gnumeric Better Namespace Handling

There have been a number of issues concerning the handling of legitimate but unexpected namespace prefixes in Xlsx spreadsheets created by software other than Excel and PhpSpreadsheet/PhpExcel.I have studied them, but, till now, have not had a good idea on how to act on them. A recent comment https://github.com/PHPOffice/PhpSpreadsheet/issues/860#issuecomment-824926224 in issue #860 by @IMSoP has triggered an idea about how to proceed.

Although the issues exclusively concern Xlsx format, I am starting out by dealing with Gnumeric. It is simpler and smaller than Xlsx, and, more important, already has a test for an unexpected prefix, since, at some point, it changed its generic prefix from gmr to gnm. I added support and a test for that some time ago, but almost certainly not in the best possible manner. The code as changed for this PR seems simpler and less kludgey, both for that exceptional case as well as for normal handling.

My hope is that this change can be a template for similar Reader changes for Xml, Ods, and, especially, Xlsx.

All grandfathered Phpstan issues with Gnumeric are fixed and eliminated from baseline as part of this change.

* Namespace Handling using XMLReader

Adopt a suggestion from @IMSoP affecting listWorkSheetInfo, which uses XMLReader rather than SimpleXML for its processing.

* Update GnumericLoadTest.php

PR #2024 was pushed last night, causing a Phpstan problem with this member.

* Update Gnumeric.php

Suggestions from Mark Baker - strict equality test, more descriptive variable names.
2021-05-04 21:41:11 +02:00
xandros15 d0f76fd3ba #984 change to force typing in condition 2021-05-04 11:41:55 +02:00
Mark Baker 5873116488
Unit testing for row/column/worksheet visibility for Xls and Xlsx files (#2059)
* Unit testing for row/column/worksheet visibility for Xls and Xlsx files
* Include very hidden in worksheet visibility tests
2021-05-03 23:46:40 +02:00
Mark Baker 2b268c8dd9
Fix row visibility in XLS Writer (#2058)
* Fix reversed visibility in Xls Writer
2021-05-03 22:21:57 +02:00