Commit Graph

4043 Commits

Author SHA1 Message Date
MarkBaker 0c0fa705db Duration NumberFormat Wizard 2023-03-23 16:29:24 +01:00
MarkBaker 58ac4ca288 Update to Change Log 2023-03-22 13:38:00 +01:00
MarkBaker 8888c58eaa Inline documentation updates 2023-03-22 13:02:18 +01:00
Mark Baker c034e3cf15 Merge pull request #3474 from PHPOffice/Issue-3473_Shared-Formula-Chunked-Read-no-attribute-set
Shared Formulae outside the filter range when reading with a filter are not always being identified
2023-03-22 03:01:00 +01:00
Mark Baker 00ece21e40 Merge branch 'master' into Issue-3473_Shared-Formula-Chunked-Read-no-attribute-set 2023-03-22 02:42:43 +01:00
MarkBaker c77360fe47 ChangeLog 2023-03-22 02:25:45 +01:00
MarkBaker 582997dbad Scouting improvement: move the Shared Formula data to an object in an instance array, rather than using a simple nested array. This should be better for memory usage; and when we can apply readonly to object properties, then we can make the properties readonly public, eliminate the getters in the SharedFormula class 2023-03-22 02:21:02 +01:00
oleibman 514fcff904 Catch Up Change Log (#3475)
Some changes missing since release 28.
2023-03-21 17:25:47 -07:00
MarkBaker bc8feec62a When loading a file and accessing cells outside a filter range, we still check for shared formulae that may need to be used inside the filter range; so we test for the cell's f attribute.
However, in some cases this attribute isn't set and we need to check for the presence of an f child element with a shared attribute
2023-03-21 22:50:44 +01:00
oleibman dafd78b462 Support Border for Charts (#3462)
* Support Border for Charts

All chart linestyles will be supported for Chart Border. Also add fill color for Chart. Also 'nofill' for Axis (allows suppressing of vertical axis line). These are demonstrated in sample 32_readwriteChartLine5, and a new unit test member is added. This addresses some vague problems added to issue #1797 over 8 months after it was closed; there is still at least one problem, much more complicated than the 2 being addressed in this PR.

* Handle Legend Borders in Same Way as Chart Borders

Consistency is good, and the implementation of Chart Borders offers more possibilities than the implementation of Legend Borders had. Since Legend Borders hasn't made it to a release yet, there is no need for deprecations.
2023-03-19 18:32:33 -07:00
Mark Baker 025e905b97 Merge pull request #3469 from PHPOffice/Issue-3439_GetStyle-with-CellAddress-object-including-Worksheet
Fix for Issue 3439 - Getting a style for a CellAddress instance fails…
2023-03-20 00:57:18 +01:00
MarkBaker a085835eb5 Fix for Issue 3439 - Getting a style for a CellAddress instance fails if the worksheet is set in the CellAddress instance 2023-03-19 17:33:00 +01:00
Mark Baker e4a770eae9 Merge pull request #3468 from PHPOffice/NumberFormat-DateTime-Update-Documentation
Include an example of Date/Time NumberFormat Wizards in the documentation
2023-03-19 14:09:16 +01:00
MarkBaker 3240d022d5 Include an example of Date/Time NumberFormat Wizards in the documentation 2023-03-19 06:25:53 +01:00
oleibman 011f9cd1a4 Xlsx Writer Honor Alignment in Default Font (#3459)
* Xlsx Writer Honor Alignment in Default Font

Fix #3443. A mysterious implementation by Excel. The style tags have an attribute applyAlignment, which nominally says whether or not the style should use its own Alignment. Except ... Excel ignores that attribute and uses the alignment tag if it is supplied ... and, another mystery, uses not the default style for the spreadsheet if not supplied, but rather uses the default alignment style for all spreadsheets even if the spreadsheet's default style uses a non-default alignment. I am changing Xlsx Writer to generate alignment tag unless the alignment matches both the default alignment for the spreadsheet and the default alignment for all spreadsheets (which I expect to happen most of the time).

* Improve Performance

Also don't change horizontal/vertical on Xlsx Read if they aren't explicitly set.
2023-03-18 11:50:12 -07:00
Mark Baker 076ef9d542 Merge pull request #3466 from PHPOffice/NumberFormat-Wizards_Non-breaking-space
Use NBSP in Accounting WIzard, and as an option for Date/Time Wizards
2023-03-18 19:11:54 +01:00
Mark Baker c3ac0cff71 Merge branch 'master' into NumberFormat-Wizards_Non-breaking-space 2023-03-18 17:25:56 +01:00
MarkBaker b906d10111 Use NBSP in Accounting Wizard, and as an option for Date/Time Wizards 2023-03-18 17:05:40 +01:00
anhoder b4e4e2085b Fix incorrect font color read from xlsx (#3465)
Place the read font color after setting the styles
2023-03-18 09:04:31 -07:00
Pouria Seyfi 603d093df7 Specify data type in html tags using attributes (#3445)
* Specify data type in html tags using attributes #3444

* Set data types using attributes in flushCell function and add some unit tests

* Check TYPE_INLINE in flushCell and some changes in test cases
2023-03-18 08:37:39 -07:00
MarkBaker 452ec07e42 Update to Read Me 2023-03-17 13:46:00 +01:00
MarkBaker 88dba59f20 Update to Readd Me 2023-03-17 13:39:24 +01:00
Mark Baker 1192d3cbae Merge pull request #3458 from PHPOffice/NumberFormat-Wizards-Date-Time-Duration
Initial work on Date, Time and DateTime NumberFormat Wizards
2023-03-17 13:29:59 +01:00
Mark Baker cea9c4dce7 Merge branch 'master' into NumberFormat-Wizards-Date-Time-Duration 2023-03-17 13:26:47 +01:00
Mark Baker 66b95be770 Merge pull request #3463 from PHPOffice/Issue-3461_Xlsx-Writer-FunctionPrefix-Regexp
Establish boundary for function prefix regexp to prevent over-aggressive prefixing
2023-03-17 08:36:12 +01:00
MarkBaker e58d51fdb9 Issue 3461 - Establish boundary for function prefix regexp to prevent NETWORKDAYS being picked up by DAYS 2023-03-17 08:13:22 +01:00
MarkBaker ec60f5896b Escape single characters in Date, Time and DateTime NumberFormat Wizards 2023-03-16 13:06:03 +01:00
MarkBaker 7a0c18f3e7 Refinements to Date, Time and DateTime NumberFormat Wizards 2023-03-16 10:53:01 +01:00
MarkBaker ca05f69b4a Initial work on Date, Time and DateTime NumberFormat Wizards 2023-03-16 02:25:10 +01:00
Mark Baker 99a7de3812 Merge pull request #3448 from PHPOffice/UnitTests_Refactoring-Database-and-DateTime
Refactor unit tests to ensure that assertions and setup/teardown are in the actual test for ease of review
2023-03-14 11:40:57 +01:00
Mark Baker c196625cb1 Merge branch 'master' into UnitTests_Refactoring-Database-and-DateTime 2023-03-14 11:15:49 +01:00
MarkBaker fe31c2004f Extended unit tests for Engineering functions 2023-03-14 06:53:45 +01:00
MarkBaker 36e9e864e6 Additional edge-case tests 2023-03-14 06:53:45 +01:00
oleibman 4b7aa20b24 Run phpcs, php-cs-fixer, phpstan, coverage, versions as Php8.1 (#3450)
* WIP Run phpcs, php-cs-fixer, phpstan, coverage, versions as Php8.1

They all run under Php7.4 in Github. 7.4 is EOL. We still have to run unit tests in 7.4, but I think it's time to move the tools. Note that we cannot currently run Phpstan in 8.2 because of https://github.com/phpstan/phpstan/issues/8629.

* Update main.yml

Try running coverage as 8.0 rather than 8.1.

* Update main.yml

Revert Coverage to Php 7.4.

* Composer Cache Directory

Command set-output is deprecated. Upgrading to using Environment files as suggested by Github messages.

* Coverage and Php8

Try to follow advice in https://github.com/scrutinizer-ci/ocular/issues/54

* Keep Trying

See https://github.com/phpowermove/docblock/pull/12/files
2023-03-13 18:13:57 -07:00
oleibman ff625d784d More Coverage In Unit Tests (#3447)
* More Coverage In Unit Tests

Minimal source code changes.

* Scrutinizer

One legitimate complaint and one from out of left field.

* Scrutinizer Lunacy

If this doesn't stop its complaint, I give up.

* Scrutinizer - Whatever

Try again.

* Glutton For Punishment

Try again.
2023-03-13 05:25:42 -07:00
Mark Baker 0875326fa8 Merge pull request #3452 from PHPOffice/Minor-Bugfix_Apply-strict-validation-to-Complex-suffix
Apply strict type checking to Complex suffix
2023-03-12 16:00:38 +01:00
MarkBaker 6836c84888 Apply strict type checking to Complex suffix 2023-03-12 13:12:05 +01:00
oleibman a3489b5d89 Minor Changes to 3 Tests/Samples (#3451)
No source changes. Act on some items that have come up in recent discussions.
- Sample 33_Chart_create_line creates a stacked line chart. According to @MarkBaker, the stacking is done on the wrong variable, and, even were that not the case, stacking is unusual for line charts. Since this is our primary sample showing how to create a line chart, remove the stacking. Another sample, with a more appropriate choice of chart (33_Chart_create_bar_stacked), still shows how to create a stacked chart.
- The test for reading a styled cell from Html is flawed. It sets a date format for a string date/time, but the format is applied only to numeric data, so the format, although set correctly, is ineffective. Keep the test, but add some explanation in the assertion, and add some new more effective tests, also with explanations in the assertions.
- Wrong namespace used for Writer/Xlsx/ConditionalFillTest.
2023-03-12 00:22:20 -08:00
MarkBaker 9c2deb125f Scrutinizer really sucks!!!
Stop a few of scrutinizers complaints about 100% valid use of PHP variadics.
Hopefully, this issue will cease to be an issue when we can specify mixed datatype for variadic arguments in the tests
2023-03-10 04:43:11 +01:00
MarkBaker a91dd60a98 Refactor unit tests to ensure that assertions are in the actual test, and not in an abstract class; and that setup/teardown are in the test and not an abstract. This means that assertions and setup/teardown are always in the file when reviewing PRs.
Also enforce more rigorous Excel Function implementation by testing the underlying implementation, call via the Calc Engine, and execution from in a worksheet.
Separate out unhappy path (exception) checks into a separate test, so that a single test isn't made overcomplex checking for every potentiality.

Scrutinizer may dislike variadics, for variable number of arguments of mixed type; but tough. It's 100% valid PHP, accepted by phpstan, and makes life a lot easier.

Initial work here covers all the database and datetime unit tests for Excel function implementations.
2023-03-10 04:15:12 +01:00
oleibman 20348642ed More Display Options for Chart Axis and Legend (#3434)
* Allow Color and Effects on Data Points on Chart Axis

Fix #3414. There had been no way to do this. It is now supported via a new AxisText class, which derives from Properties, and has FillColor and effects (glow/shadow/softEdges) properties. The code changes in chart sample 33_Chart_create_scatter2 illustrate usage.

* Minor Performance Improvement

May also get rid of Scrutinizer complaint.

* Eliminate New Spacing Patch

No need for it.

* Add Legend Formatting to Change

Much in common with Data Point formatting.
2023-03-09 10:15:24 -08:00
Mark Baker 64f32d8c75 Merge pull request #3441 from PHPOffice/Documentation-Updates
Update recipe docs for Spreadsheet Properties.
2023-03-09 17:52:08 +01:00
MarkBaker d73d063556 Update contributor notes and related composer scripts 2023-03-09 17:38:20 +01:00
MarkBaker 202964ee26 Minor update to documentation index 2023-03-09 17:37:50 +01:00
MarkBaker 15044fd20d Formats for custom date properties 2023-03-09 01:47:06 +01:00
MarkBaker 68873e632d Update recipe docs for Worksheets 101, and setting the Active Worksheet. 2023-03-08 21:23:54 +01:00
MarkBaker b5b64ebe6e Update recipe docs for Spreadsheet Properties. 2023-03-08 20:07:07 +01:00
oleibman 73f880ff19 Correct Xlsx Parsing of quotePrefix="0" (#3438)
* Correct Xlsx Parsing of quotePrefix="0"

Fix #3435. Mis-parsed attribute is not normally generated by Excel or PhpSpreadsheet, but some 3rd-party software (correctly) generates it.

* Update Issue3435Test.php
2023-03-07 07:51:20 -08:00
Mark Baker cba1f07235 Merge pull request #3437 from PHPOffice/Issue-3436_EDATE-EOMONTH-Rounding-to-Date
Fix for Issue #3436 - Result from Excel's EDATE() and EOMONTH() should always be rounded to 0 decimal
2023-03-06 17:40:55 +01:00
MarkBaker 9006d2a3f4 Fix for Issue #3436 - Result from Excel's EDATE() and EOMONTH() should always be rounded to 0 decimal 2023-03-06 17:22:30 +01:00