Commit Graph

2987 Commits

Author SHA1 Message Date
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
oleibman b9a9eb2316
Update Csv.php 2021-05-16 15:02:11 -07:00
oleibman 294933c9e5
Update CsvContiguousTest.php 2021-05-16 11:48:12 -07:00
oleibman 1d4e4af705
Update Csv.php 2021-05-16 10:04:46 -07:00
oleibman 251df6e61e
Merge branch 'master' into csvdflts 2021-05-16 06:13:40 -07:00
Owen Leibman ae80c12ef0 CSV Reader Enhancements
This PR came about as I pondered how feasible it was to change the default escape character from backslash to null string, since the latter emulates Excel's own actions. Also, surveying issues relating to CSV, it seems that people are often in a situation where the current defaults aren't optimal for them (e.g. they are in a region where semicolon rather than comma is a better default delimiter). My case and that case can both be handled by methods after a reader is constructed. However, the issues also show that many use `IOFactory::load` rather than `new Csv()`, and the methods to affect the defaults are not available in that case.

Adding a static callback that can be invoked by the constructor addresses all these problems. This can be set as part of the user application's normal initialization, and no special attention needs to be paid to CSV loads thereafter, no matter how they are invoked.

This also makes it feasible to use 'guess' as inputEncoding, by providing a new setFallbackEncoding (default CP1252) method to use if none of the heuristic tests pass. There was already the ability to guess the encoding before `$reader->load()`, but not before `IOFactory::load`.

Almost all typehints in Reader/Csv and Reader/Csv/Delimiter are now part of the function signature rather than in the DocBlock. The exceptions are one method in Delimiter which uses a `resource` parameter, and the `canRead` and `load` methods, which must match the signature in IOFactory. I will look into changing those later.

The Csv Reader tests are moved into their own directory. All Phpstan baseline entries involving Csv Reader are eliminated.
2021-05-16 06:05:02 -07: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
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