Commit Graph

2764 Commits

Author SHA1 Message Date
MarkBaker 43dcd84520 Update change log 2021-05-29 13:43:40 +02:00
MarkBaker c1f64a2429 Typehinting to keep phpstan happy 2021-05-29 13:35:42 +02:00
MarkBaker 70a518981c Additional unit tests for HLOOKUP() and VLOOKUP() and Examples for VLOOKUP() 2021-05-29 13:35:42 +02:00
Owen Leibman 3540a275b9 Scrutinizer and Phpstan
Didn't realize Scrutinizer enforces complexity limits in tests.
2021-05-29 12:52:11 +02:00
Owen Leibman 68dd2c39da Tests for PreCalc
PR #2110 added some documentation for an unexpected observation when formula pre-calculation was set to false. I had suggested adding a unit test to demonstrate the observation, but I couldn't find any existing tests for PreCalc. This PR rectifies that omission.
2021-05-29 12:52:11 +02:00
oleibman 7e4331e3ab
Error in COUPNCD (#2119)
See issue #2116. Code for handling end of month (method couponFirstPeriodDate) needed a fix. Fixed it, confirmed it covered the reported issue with no regression problems. Then added some extra similar tests to all the callers of couponFirstPeriodDate, and ...

One new test, in COUPDAYSNC, does not agree with Excel. It also does not agree with LibreOffice. It does, however, agree with Gnumeric, and with my (hardly guaranteed) hand calculation of what the result should be. So, I'm going with it (and have added an appropriate comment to the test data). I'm glad to discuss the matter with anyone more familiar than I with how this is supposed to work - those 360-day years are killers.
2021-05-29 12:02:36 +02:00
Matjaž Drolc 0b0f02206f fix: Set font size to 10 when given 0
This change restored behavior from PHP7 in PHP8. In PHP7 calling
setSize(0) resulted in font size being set to 10. The fix addresses
change to equal comparisons in PHP8. Extra comparison is added to keep
result from PHP7 in PHP8 for the setSize(0) case.
2021-05-29 11:17:25 +02:00
MarkBaker f5c2cf9df9 Fix more phpcs issues 2021-05-28 22:35:37 +02:00
MarkBaker 5e531b4511 Fix phpcs, phpstan and scrutinizer issues 2021-05-28 22:35:37 +02:00
MarkBaker e0e5a81d69 Move documentation builder to infra so that it isn't included in non `--dev` composer downloads
Unit test for locale builder
Add new function stubs (as dummy) to Calculation list of functions
2021-05-28 22:35:37 +02:00
Samuel Laulhau 290c125e2e fix type flies => files 2021-05-28 11:06:54 +02:00
MarkBaker 004eacc49b Update changelog, and phpstan appeasement 2021-05-27 12:02:38 +02:00
MarkBaker 4089aede0a Resolve default values when a null argument is passed for HLOOKUP(), VLOOKUP() and ADDRESS() functions 2021-05-27 12:02:38 +02:00
Athena Metis e400b35122 Update reading-and-writing-to-file.md
Added a note about formulas still being calculated where column autosizing is turned on, even if pre-calculation is set to false. This is true at least for the Xlsx writer but probably others to if they use calculateColumnWidths from Worksheet/Worksheet.php
2021-05-26 15:33:01 -07:00
MarkBaker 5e657b296a Eliminate spurious test that I managed to introduce by accident (related to a different issue) 2021-05-20 23:29:57 +02:00
MarkBaker 91af5bbc4f Resolve phpcs issues 2021-05-20 23:29:57 +02:00
MarkBaker 60ade80c0f Resolve Issue with float values losing their decimal when read from SpreadsheetML 2021-05-20 23:29:57 +02:00
Nathan Dench e6a4442d9a Use named data provider in AddressHelper tests 2021-05-20 21:26:20 +02:00
Nathan Dench 8e7771cde1 Create R1C1_COORDINATE_REGEX constant 2021-05-20 21:26:20 +02:00
Nathan Dench 992108cea7 Update Changelog 2021-05-20 21:26:20 +02:00
Nathan Dench 4650dd34ab Add capturing back into to AddressHelper::convertFormulaToA1 2021-05-20 21:26:20 +02:00
Nathan Dench 1a78ecfb10 Track down bug in AddressHelper::convertFormulaToA1 2021-05-20 21:26:20 +02:00
Nathan Dench 03ba547f5a Test convertFormulaToA1FromR1C1 2021-05-20 21:26:20 +02:00
Nathan Dench 62d3a56a57 Add AddressHelper::convertFormulaToA1 tests for SpreadsheetXML 2021-05-20 21:26:20 +02:00
MarkBaker f15de096b5 I don't know what happened to this PR, but it seems to have lost files that had been added and commtted 2021-05-20 20:57:09 +02:00
MarkBaker 7be35da3cc Add translations spreadsheet 2021-05-20 20:54:52 +02:00
MarkBaker 25ba691c8c Keep phpstan happy 2021-05-20 20:41:09 +02:00
MarkBaker 41a52c592c Some simplification to the locale file loader 2021-05-20 20:41:09 +02:00
MarkBaker 8acf5e6448 PHPStan appeasement 2021-05-20 20:41:09 +02:00
MarkBaker 547f3ce798 Use "short" error codes for config files 2021-05-20 20:41:09 +02:00
MarkBaker 902f054cb8 Remember to add nb local files 2021-05-20 20:41:09 +02:00
MarkBaker 65309dbe78 Fix unit tests for function list markdown, and style issues for DOLLAR/USDOLLAR 2021-05-20 20:41:09 +02:00
MarkBaker f89bfc9e02 Additional language data, and improved automated build of translation files for Calculation Engine locale 2021-05-20 20:41:09 +02:00
MarkBaker 1b8286501b Add first pass at the Translations spreadsheet used for building locales 2021-05-20 20:41:09 +02:00
MarkBaker e83f862d0b Initial work on auto-building locale files for Exce functions 2021-05-20 20:41:09 +02:00
oleibman d0570bc766
Merge pull request #2080 from oleibman/sample19b
Two Problems with Sample19
2021-05-18 21:14:23 -07:00
oleibman 990d46d451
Merge branch 'master' into sample19b 2021-05-18 21:01:36 -07:00
Adrien Crivelli ea2d4b96f6
Avoid memory leak
When creating a spreadsheet, and writing to Xlsx, then to Xls, then
reading the Xls, it would leak memory during reading.

Fixes #2092
2021-05-17 11:19:19 +09:00
Adrien Crivelli e5185eab0c
Avoid memory leak by allowing to release `Style` objects (bis)
Fixes #2092
2021-05-16 13:54:13 +09:00
Adrien Crivelli 5dd00b1b1a
Avoid memory leak by releasing image resources
This also better support image cloning with a proper
clone of the GD resource.

#2092
2021-05-16 12:39:09 +09:00
Adrien Crivelli 50683e6068
Avoid memory leak by allowing to release `Style` objects
Fixes #2092
2021-05-16 12:39:09 +09:00
Adrien Crivelli 09b979defa
Avoid memory leak by registering shutdown function exactly 1 time
Fixes #2092
2021-05-16 12:39:08 +09:00
MarkBaker b01a485f4f A couple of extra unit tests 2021-05-14 14:35:23 +02:00
MarkBaker 061744c6bd PHPCS Fixes 2021-05-14 14:35:23 +02:00
MarkBaker 924cfe2e7b Fix a couple of methods that call mathods that we've modified 2021-05-14 14:35:23 +02:00
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