Commit Graph

2374 Commits

Author SHA1 Message Date
Mark Baker a367f35438
Trend function unit tests (#1089)
* Merge branch 'master' of C:\Projects\PHPOffice\PHPSpreadsheet\develop with conflicts.

* More trend function unit tests

* Yet more trend function unit tests
2019-07-16 23:51:48 +02:00
MarkBaker 4a1808ee1e Merge remote-tracking branch 'origin/master' 2019-07-16 20:39:44 +02:00
Mark Baker 6d739f1fe6
Additional statistical work (#1088)
* Merge branch 'master' of C:\Projects\PHPOffice\PHPSpreadsheet\develop with conflicts.

* More statistical tests

* Further statistical tests

* Unit tests for some of the trend functions

* resolve scrutiniser objections

* Fix order of @return types :-(
2019-07-16 20:35:48 +02:00
MarkBaker e153c33bbe Merge remote-tracking branch 'origin/master' 2019-07-16 16:19:16 +02:00
Mark Baker f1e82a212f
Extended unit tests (#1087)
* Merge branch 'master' of C:\Projects\PHPOffice\PHPSpreadsheet\develop with conflicts.

* Additional unit tests for average functions, and fix to AVERAGEIF() function if third argument is passed

* Update change log

* Stricter typed comparisons in AVERAGEIF() conditions

* Unit tests for BETADIST() and BETAINV()
2019-07-16 16:18:42 +02:00
MarkBaker 13942e89dd Merge remote-tracking branch 'origin/master' 2019-07-16 11:06:34 +02:00
Mark Baker 5f7ed98aa6
Prevent duplicate no fills (#1086)
* Merge branch 'master' of C:\Projects\PHPOffice\PHPSpreadsheet\develop with conflicts.

* Ignore colours for hash generation when fill style in NONE

* Update changelog
2019-07-16 11:00:00 +02:00
MarkBaker 0e8a56dda3 Merge remote-tracking branch 'origin/master' 2019-07-16 00:00:49 +02:00
Mark Baker 987147e916
Number formatting further refactoring (#1082)
* Merge branch 'master' of C:\Projects\PHPOffice\PHPSpreadsheet\develop with conflicts.

* further refactoring of number formatting logic
2019-07-15 23:51:04 +02:00
MarkBaker 1bdf920f39 Merge remote-tracking branch 'origin/master' 2019-07-15 22:12:26 +02:00
Mark Baker 20f36ccd79
Number formatting minor refactoring (#1081)
* Merge branch 'master' of C:\Projects\PHPOffice\PHPSpreadsheet\develop with conflicts.

* Handle literal (non-decimal) dots in complex number format masks

* Minor refactoring nd reformatting

* Appease CS

* Update changelog
2019-07-15 22:05:59 +02:00
MarkBaker effa5175ed Merge remote-tracking branch 'origin/master'
# Conflicts:
#	tests/data/Style/NumberFormat.php
2019-07-14 19:39:44 +02:00
MarkBaker bcda8307ab Merge branch 'master' of C:\Projects\PHPOffice\PHPSpreadsheet\develop with conflicts. 2019-07-14 19:39:33 +02:00
Mark Baker ab1c6e53b6
Number format with colours (#1080)
* Fix number formatting using named colours in format masks

* Handle number formatting with ful substitution of values by a string

* Update changelog
2019-07-14 19:36:34 +02:00
Mark Baker a91acec5d9
Countif strict comparison (#1078)
* Stricter-typed comparison testing in COUNTIF() and COUNTIFS() evaluation [Issue #1046](https://github.com/PHPOffice/PhpSpreadsheet/issues/1046)

* Codestyle

* Codestyle

* Codestyle in tests
2019-07-14 16:22:31 +02:00
MarkBaker 36135a4c05 Use empty to check for empty array 2019-07-14 13:36:23 +02:00
MarkBaker 6500128451 Update calculation functions implemented lists 2019-07-14 13:12:43 +02:00
Juluan 7505638dc8 Fix 1055 (#1076)
* Fix #1055 : Make hlookup require ordered list only if asking for not exact match

* Added test for #1055
2019-07-14 12:56:17 +02:00
Zdeněk Drahoš 42fc71f314 Calculation/Statistical :: Add MAXIFS, MINIFS, COUNTIFS and Remove MINIF, MAXIF (#1059)
* #1056 - replace invalid minif/maxif functions by not implemented minifs/maxifs

minif/maxif is not support in Excel, Google Spreadsheets, Libreoffice
https://support.office.com/en-us/article/excel-functions-alphabetical-b3944572-255d-4efb-bb96-c6d90033e188#bm13

* #1056 - implement minifs/maxifs

Copy-pasted sumifs...
https://github.com/PHPOffice/PhpSpreadsheet/blob/1.8.1/src/PhpSpreadsheet/Calculation/MathTrig.php#L1254

* #1056 - implement countifs

* #1056 - fix code style

composer check
composer fix

* #1056 - update changelog
2019-07-14 12:55:42 +02:00
Mr Maker 22190615ce When <br> appears in a table cell, set the cell to wrap. (#1070)
* When <br> appears in a table cell, set the cell to wrap.

If the cell is not set to wrap, it appears as a single line when first
displayed in Excel, although editing the cell will cause Excel to wrap
it.

* fix whitespace

Upstream has a coding standard that includes whitespace
2019-07-12 07:53:07 +02:00
Mark Baker bf59cf0cbc
Html cellwrapping (#1075)
* When <br> appears in a table cell, set the cell to wrap.

If the cell is not set to wrap, it appears as a single line when first
displayed in Excel, although editing the cell will cause Excel to wrap
it.

* fix whitespace

Upstream has a coding standard that includes whitespace

* Add Unit tests for cell wrapping

* Update changelog
2019-07-12 07:52:03 +02:00
Mark Baker de3f948b27
Coupnum fix (#1069)
* New Unit Tests for COUPNUM()

* COUPNUM should not return zero when settlement is in the last period

* Additional tests and fixes for COUPNCD() and COUPPCD() functions

* Additional tests and fixes for COUPNCD() and COUPPCD() functions
2019-07-10 22:41:28 +02:00
Mark Baker 0ea97f14e1
Fixes to coupon functions (#1068)
* New Unit Tests for COUPNUM()

* COUPNUM should not return zero when settlement is in the last period

* Additional tests and fixes for COUPNCD() and COUPPCD() functions
2019-07-10 21:22:16 +02:00
MarkBaker 38e71a1210 Fix Documentation type 2019-07-09 19:39:12 +02:00
MarkBaker 0c1346a195 Update changelog with fixes implemented in 1.8.2 release 2019-07-08 23:21:25 +02:00
Mark Baker 094933164d
Ods reader fix for property reader when none set (#1064)
* Fix for Ods Property Reader when no core properties are defined

* Fix for Ods Property Reader when no meta properties are defined
2019-07-08 22:35:08 +02:00
Mark Baker d8047b071b
Basic unit test and fix for loading data validations from xlsx file (#1063) 2019-07-08 19:55:14 +02:00
MarkBaker d4eab49815 case-insensitive charset name in xml scanner 2019-07-03 18:34:11 +02:00
rtek 6ab969e9cc Allow XmlScanner to correctly restore libxml entity_loader setting (#1050)
XmlScanner was not restoring libxml_disable_entity_loader since
destruct was not being called until script shutdown. This is because
the shutdown handler required an XmlScanner instance.

Also fix an unrelated bug where the UTF-8 encoding test was
case sensitive.
2019-07-03 09:53:43 +02:00
MarkBaker 352c7002fe Allow nullable theme for Xlsx Style Reader class 2019-07-01 22:46:51 +02:00
Mark Baker d645ed92d5
Allow nullable theme for Xlsx Style Reader class (#1044) 2019-07-01 20:59:34 +02:00
Mark Baker 0e6238c69e
CVE-2019-12331 (#1041)
* Detect doubly-encoded xml to hide XXE attacks
Correct use of LibXml_Disable_Entity_Loader

* New test for double-encoded xml in security scanner
2019-07-01 00:55:25 +02:00
Mark Baker 1e711541f1
Refactoring xlsx reader (#1033)
Start work on breaking up monolithic Reader and Writer classes into dedicated subclasses to make maintenance work easier
2019-06-30 23:42:25 +02:00
Mark Baker e884271dc2
Scrutinizer resolutions (#1032)
* list($ac, $ar) = sscanf($a, '%[A-Z]%d'); to appease scrutinizer, which complains about ($a, '%[A-Z]%d')

* Fix a docblock error

* More scrutinizer happiness
2019-06-23 22:13:49 +02:00
Mark Baker 591f1e0c70
Scrutinizer resolutions (#1031)
* list($ac, $ar) = sscanf($a, '%[A-Z]%d'); to appease scrutinizer, which complains about ($a, '%[A-Z]%d')

* Fix a docblock error
2019-06-23 19:19:45 +02:00
Mark Baker 14e980625f
Yet more minor improvements (#1030) 2019-06-23 16:50:45 +02:00
Mark Baker 1b00fac6ad
Minor improvements (#1029)
* Another collection of minor improvements

* Fix broken test

* And style

* Seriously?!? The order of returned types declared in a docblock is majorly important?
2019-06-22 23:15:14 +02:00
Mark Baker 2adaad3b01
Minor improvements (#1028)
* Initial tweaks

* Move signatures for abstract BaseReader methods to the IReader interface

* Appease the great whitespace gods
2019-06-22 21:24:51 +02:00
Gowrav Vishwakarma ca56fd258c Typo (#1007)
Cell B5 is about to get the changs btw
2019-06-14 08:32:19 +02:00
Mark Baker 71f3631cfb
Rectorification (#1010)
* A few loose to strict comparisons

* More loose to strict comparisons

* Revert accidental composer hacks that shouldn't have been committed
2019-06-14 08:31:27 +02:00
Mark Baker 5fd954d2c2
Improve test code (#1003)
* Enhancements suggested by scrutiniser

* Styling

* Minor additional tests datatype fixes
2019-06-10 18:00:15 +02:00
Mark Baker e69b2ccf43
Scrutiniser recommendations (#1004) 2019-06-10 17:59:44 +02:00
Mark Baker 6c25b6f422
Refactor Xlsx Properties Reader code into a separate class (#1001)
* Unit tests for refactoring Spreadsheet properties
* Refactor Xlsx Properties Reader code into a separate class
2019-06-10 16:44:55 +02:00
Mark Baker dd656b4c53
Improve test code (#1002)
* Enhancements suggested by scrutiniser

* Styling
2019-06-10 01:48:06 +02:00
MarkBaker d6018a273e Codestyle fixes in tests.... spawn of the devil 2019-05-30 12:23:25 +02:00
MarkBaker 867237f567 Codestyle fixes 2019-05-30 12:14:05 +02:00
MarkBaker 9ba96efc97 Still test against 5.6, but with allowed failures, and skip tests explicitly for features that require PHP >= 7.0.0 2019-05-30 12:11:49 +02:00
MarkBaker 561852e341 Still test against 5.6, but with allowed failures 2019-05-30 12:00:41 +02:00
MarkBaker fc78cd5422 Minimum PHP 7.0 and updated travis 2019-05-30 11:59:01 +02:00
kraser 906bdc613c Fix failure when parsing xlsx with drawing having double (redefined) … (#945)
* Fix failure when parsing xlsx with drawing having double (redefined) attributes

* Fix failure when parsing xlsx with drawing having double (redefined) attributes
2019-05-30 11:42:00 +02:00