Commit Graph

2344 Commits

Author SHA1 Message Date
Adrien Crivelli
48f8b5c1f2
Move phpcs config to file 2020-07-26 14:48:06 +09:00
Adrien Crivelli
6a41381c1d
PSR12 code style 2020-07-26 14:13:11 +09:00
Adrien Crivelli
4739f8b2e7
Merge branch 'readhtml' 2020-07-26 13:11:15 +09:00
oleibman
735103c120
Improve Coverage for ODS Reader (#1545)
* Improve Coverage for ODS Reader

Reader/ODS/Properties is now 100% covered.
Reader/ODS is covered except for 1 statement. As the original author
put it, "table-header-rows TODO: figure this out ... I'm not sure that
PhpExcel has an API for this". I'm still thinking about it, but, so far,
I agree with the author.

There are minimal code changes.
- Several places test !zip->open() to see whether the test failed.
  However, zip->open() returns true or a string, so the test never
  detects failure. Change to zip->open() !== true. No previous tests.
- Suppress warning messages from simplexml_load_string (there had
  been no tests for invalid xml).
- One document property was misnamed, and one non-existent property
  was tested for.

I added a number of tests, creating an ODS directory, and moving
OdsTest to that directory.

* Scrutinizer Recommendation

Unused variable in one test.

* Update CHANGELOG

Co-authored-by: Adrien Crivelli <adrien.crivelli@gmail.com>
2020-07-26 12:40:49 +09:00
Adrien Crivelli
763b208a68
Update CHANGELOG 2020-07-26 12:19:02 +09:00
oleibman
7ddf6ccf41
PrintArea Causes Exception
I wanted to investigate #1523, but I couldn't duplicate its results
because the sample code in the issue caused an Exception to be thrown.
The exception happened because, when the Print Range Set method is
set to Insert (as oppposed to Overwrite), and the Print Range is
empty, it is created with a leading or trailing comma, and Writer/Xlsx
objects. This is, in a sense, a user error, but the software should
be more resilient. This can be accomplished by ensuring that no
leading or trailing comma is generated when Print Range is empty.

This code change fixes that problem. Since I couldn't reproduce the
original, I can't say for sure that it fixes it. However, with the
sample code provided, I can write a spreadsheet which Excel reads
without any problems, so it probably fixes the original.

Closes  #1544
Fixes #1523
2020-07-26 12:15:57 +09:00
Adrien Crivelli
234580323e
Merge pull request #1510 from reijnnn/fix-worksheet-protection
Delete unnecessary class member
2020-07-26 12:03:01 +09:00
Adrien Crivelli
bd66a58203
Merge pull request #1559 from PHPOffice/Page-Setup-Page-Order
Support pageOrder in page setup for Xlsx/Xls Readers/Writers, and implement basic page setup support for other Readers/Writers
2020-07-26 12:00:25 +09:00
Adrien Crivelli
0489e785d2
Merge branch 'master' into Page-Setup-Page-Order 2020-07-26 10:50:41 +09:00
MarkBaker
16a9ff14d4 Experiment 2020-07-25 23:17:26 +02:00
Mark Baker
fe121e8f7a
Additional statistical unit tests for non-happy path (#1594)
* Additional statistical unit tests for non-happy path
2020-07-25 21:58:08 +02:00
Mark Baker
57213deb64
Implementation of MS Excel's LOGNORM.DIST(), NORM.S.DIST(), F.DIST(), GAUSS() and GAMMA() functions (#1588)
* `GAUSS()` and `GAMMA()`, `NORM.S.DIST()`, `LOGNORM.DIST()` and `F.DIST()` function implementations, and further unit tests for a number of the statistical functions

Co-authored-by: Adrien Crivelli <adrien.crivelli@gmail.com>
2020-07-25 12:44:51 +02:00
Mark Baker
e084e89698
Reconcile function discrepancies between the documented lists, and the Calculation Engine (#1585)
* Update the Calculation engine list to reflect the complete set of all MS Excel functions as of 1st July 2020
2020-07-25 12:16:54 +02:00
Mark Baker
5233e9caaf
Merge branch 'master' into Page-Setup-Page-Order 2020-07-19 12:57:48 +02:00
Adrien Crivelli
a79c736f42
Update CHANGELOG 2020-07-19 18:55:18 +09:00
Adrien Crivelli
a8197128c6
Remove links that should never have been links 2020-07-19 18:54:34 +09:00
Adrien Crivelli
2383aad568
1.14.1 2020-07-19 18:51:35 +09:00
Dhaval Purohit
7e12575d86
Borders are complete even on rowspanned columns using HTML reader
Fixed #1455
Closes #1473
2020-07-19 14:04:53 +09:00
Adrien Crivelli
395b750030
Stricter visibility 2020-07-19 12:30:31 +09:00
Adrien Crivelli
c3fa31de13
Missing typing 2020-07-19 12:21:40 +09:00
Adrien Crivelli
7cb4884b96
WEBSERVICE is HTTP client agnostic
HTTP client must be configured via `Settings::setHttpClient()`. This is
a small breaking change, but only for the very few people who started using
WEBSERVICE from last version.

Fixes #1562
Closes #1568
2020-07-19 11:33:01 +09:00
oleibman
165034ad70
Restoring State After Static Changes in Tests (#1571)
This request does not change any source code, only tests.

For a change on which I was working, a test passed when run on its own,
but failed when run as part of the full test suite. It turned out that
an existing test had changed a static value,
thousands separator in this case, and failed to restore it.
The test turned out to be AdvancedBinderTest.

The search for the offending test was more difficult than it should have
been because 26 test scripts which had nothing to do with thousands
separator nevertheless changed that value. They all changed
decimal separator, currency code, and compatibility mode as well,
again for no reason. I changed all of those to eliminate those operations.

I changed the following tests, which actually do change the static
properties identified above for a reason, to restore them as part of teardown.
- CalculationTest sets compatibilityMode and locale
- DayTest sets compatibilityMode, returnDateType, and excelCalendar
- CountTest sets compatibilityMode
- FunctionsTest sets compatibilityMode and returnDateType
- AdvancedValueBinderTest sets currencyCode, decimalSeparator, thousandsSeparator
- StringHelperTest sets currencyCode, decimalSeparator, thousandsSeparator
- NumberFormatTest sets currencyCode, decimalSeparator, thousandsSeparator
- HtmlNumberFormatTest sets currencyCode, decimalSeparator, thousandsSeparator
2020-07-15 13:23:00 +02:00
Mark Baker
b89968d206
Additional Unit Tests (#1582) 2020-07-14 10:58:50 +02:00
MarkBaker
47eb3e9f12 Update Change Log 2020-07-05 21:05:21 +02:00
MarkBaker
d4094c0b58 Minor refactoring 2020-07-05 20:43:59 +02:00
MarkBaker
c6de56e4cf Minor refactoring 2020-07-05 20:21:54 +02:00
MarkBaker
f3fc321177 Gah! Using PHPStorm refactor changes the formatting, so valid code suddenly triggers in phpcs 2020-07-05 18:32:40 +02:00
MarkBaker
6cbb622a9e Minor refactoring 2020-07-05 18:25:39 +02:00
MarkBaker
586b36b440 Refactor Xml PageSettings into a separate loader class 2020-07-05 18:11:14 +02:00
MarkBaker
961dc693d1 Improve SCrutinizer happiness 2020-07-05 17:35:13 +02:00
MarkBaker
cf6769eab1 Hopefully a final phpcs fix before I start looking at how to run a pre-commit hook on Windows 10 2020-07-05 17:17:56 +02:00
MarkBaker
e89196f65b phpcs fixes, although I thought I'd successfully added the pre-commit hook to pick those up before the commit, guess the problem is running from Windoze, so I'll have to address that 2020-07-05 17:05:44 +02:00
MarkBaker
3997dcc3af Not sure why PHP 7.4 should suddenly have decided to report a notice in a totally unrelated part of the Xml Reader 2020-07-05 16:39:47 +02:00
MarkBaker
d009347e25 Forgot to check in the test files for the unit tests 2020-07-05 16:28:46 +02:00
MarkBaker
8629337101 Retrieving print/page setup for the Xml Reader 2020-07-05 16:22:35 +02:00
MarkBaker
84ba21400c Fix datatype conversion for Gnumeric values 2020-07-04 00:28:16 +02:00
MarkBaker
aecef1372f Read Ods Margins 2020-07-03 19:26:57 +02:00
MarkBaker
c288c11d01 Failed to avoid the void trap 2020-07-01 20:06:36 +02:00
MarkBaker
e644cc72d0 Additional print information for Gnumeric 2020-07-01 19:55:25 +02:00
MarkBaker
163da06505 Horizontal an dVertical centering for the Ods Reader 2020-07-01 14:50:13 +02:00
MarkBaker
736d9ffd3b Gotta keep phpcs happy, even if it is only a blank line between property declarations 2020-06-30 22:45:08 +02:00
MarkBaker
4dadf4a5c8 Refactor reading Ods Page Settings into a separate class 2020-06-30 22:23:33 +02:00
MarkBaker
13a3363410 Return void, just to keep phpcs happy 2020-06-30 19:15:08 +02:00
MarkBaker
3780072ae9 Retrieve basic print settings in the Ods Reader 2020-06-30 19:07:56 +02:00
MarkBaker
1f865c84c0 Keep phpcs happy 2020-06-30 07:24:12 +02:00
MarkBaker
fbb04c1f82 Xls Writer changes to save print order 2020-06-30 07:01:51 +02:00
MarkBaker
4060cdec7e Fix comment 2020-06-30 01:11:53 +02:00
MarkBaker
362b18ca12 Read Print Settings Page Order in Xls Reader
And eliminate switch for simple boolean portrait/landscape option
2020-06-30 00:53:10 +02:00
MarkBaker
21b34f0afb pageOrder is nullable 2020-06-29 20:27:47 +02:00
MarkBaker
a0bba38281 Support pageOrder in page setup for Xlsx Reader and Writer 2020-06-29 20:15:41 +02:00