Commit Graph

6216 Commits

Author SHA1 Message Date
oleibman 62628e0336 Additional Test 2026-02-18 10:29:49 -08:00
oleibman 5003a13bf6 Update Feature Cross-Reference 2026-02-18 09:18:19 -08:00
oleibman 3072ee7593 Coverage Tweak 2026-02-18 01:38:07 -08:00
oleibman 0c64e18cbd Ods Reader Style Support Part 2 - Alignment, Protection, Default Fill
Continuing the work of PR #4810.

Ods Reader changes still to come
- Default border, alignment, protection
- Font
    - subscript
    - superscript
- Borders (up next)
- Style applied to entire row
- Style applied to entire column
- Parent styles?

Ods Writer changes still to come
- Default border, alignment, protections
- Style applied to entire row
- Style applied to entire column
- Parent styles?
2026-02-18 00:56:28 -08:00
oleibman d9cd9acf9c Merge pull request #4810 from oleibman/odsstyles
Ods Reader Style Support Part 1 - Fonts and Solid Fill
2026-02-16 19:59:08 +00:00
oleibman 6ee98a89a8 Additional Test 2026-02-16 02:18:14 -08:00
oleibman 5f460e6ba7 Some Corrections
Sample 20_Read_Ods exposed some problems which are now corrected.
2026-02-16 01:19:26 -08:00
oleibman 14513b63b5 Doc Update 2026-02-15 01:09:37 -08:00
oleibman 97f63c801f Edge Case
If no `style:default-style` with `text-properties`, use style `Default` with `text-properties` for default.
2026-02-14 23:19:35 -08:00
oleibman 79cfd9cfc4 Correct Underline, Resurrect Test 2026-02-14 17:59:37 -08:00
oleibman 391462f10f Ods Reader Style Support Part 1 - Fonts and Solid Fill
Fix #2622. Fix #1191 (stale as of 2020 but just reopened). A long overdue addition. Ods Reader has till now not supported any styles (although PR #4806 added some support for number formats). This will be the first of several PRs to rectify this situation.

Ods Reader Changes
- Default font
- Font
    - autoColor
    - bold
    - color
    - italic
    - font-family (name)
    - size
    - underline
- Fill (type=Solid only)
    - startColor

Ods Writer Changes
- Default font
- Font
    - strikethrough (fix #4808)
    - size currently always writes to xml with one decimal point, will now eliminate `.0`

Ods Reader changes still to come
- Default fill, border, alignment, protection
- Font
    - subscript
    - superscript
- Fill
    - types other than Solid
- Alignment
- Borders
- Protection

Ods Writer changes still to come
- Default fill, border, alignment, protections
2026-02-14 16:59:11 -08:00
oleibman 91d7d1b100 Merge pull request #4806 from oleibman/odsnumberformat2
Ods Writer Support Some Number Formats
2026-02-12 16:02:38 +00:00
oleibman c1206fd3b1 Add NumberFormat Callback to Reader 2026-02-11 22:39:27 -08:00
oleibman 53a72cb18a Slight Improvements for Currencies 2026-02-11 17:15:52 -08:00
oleibman 178d34b9cc Coverage Tweak 2026-02-11 01:18:32 -08:00
oleibman fb55d1b6e4 Ods Writer Support Some Number Formats
Redo of PR #4799 due to failed attempt to resolve merge conflict.

Fix #4798. Partially address #3961. Ods Reader supports very little related to styling. Ods Writer supports many styling details, but has not heretofore supported Number Formatting. 3961 addresses both issues; I created 4798 specifically for the Writer side.

Writing number formats to Excel is pretty simple - you just supply a string and that is used directly in the Xml. Ods is much more complicated - it requires Xml nodes that give a complete description of the styling. For that reason, it is difficult and painstaking to convert from the string that Excel (and PhpSpreadsheet) uses to what Ods requires.

This PR provides code to support almost all the styles defined as constants in Style/NumberFormat. It also allows the user to add code to handle otherwise unhandled styles. New Sample55_DefinedStyles demonstrates the use of all the constant styles, plus the addition of a couple of custom styles. I may be amenable to adding some unsupported styles to the built-in list, but the custom style option will always be around in case I am being slow or unreasonable.

This PR does not fully support Ods Reader handling of styles. However, based on the new Writer output, it will often be able to guess the true type of numeric items and assign an appropriate style for that type. So, for example, if it can identify the field as a date, it will assign a date style. It will not always match the style in the sheet being read, but it is a big advance from just formatting the data as a generic number.
2026-02-10 23:48:49 -08:00
oleibman 8f5c11bc9f Merge pull request #4803 from QDenka/fix/ods-read-filter-repeated-columns
Fix ODS reader column misalignment with read filter and number-columns-repeated
2026-02-11 04:07:28 +00:00
oleibman 6252ff325e Merge branch 'master' into fix/ods-read-filter-repeated-columns 2026-02-10 20:03:51 -08:00
oleibman ee673e1f70 Update CHANGELOG.md 2026-02-10 20:02:57 -08:00
oleibman ff03307cce Merge pull request #4801 from IndrekHaav/css-size
Add support for image CSS size in millimetres
2026-02-11 03:51:37 +00:00
oleibman 81bcc19c75 Update CHANGELOG.md 2026-02-10 19:47:44 -08:00
oleibman f79394beb4 Merge pull request #4793 from oleibman/listpix
Option to Whitelist External Images
2026-02-11 03:36:17 +00:00
oleibman 856d15f8b0 Update CHANGELOG.md 2026-02-10 19:32:34 -08:00
QDenka b392854c9c Fix ODS reader column misalignment with read filter and number-columns-repeated
When using a read filter with the ODS reader, cells with
table:number-columns-repeated containing data were incorrectly handled.
The read filter was only checked for the first column of a repeated
group - if it didn't pass, the entire group was skipped, even if
other columns within the range should have passed the filter.

This caused column data misalignment where filtered columns would
either be missing or contain data from wrong positions.

The fix ensures that:
1. When the first column of a repeated group fails the filter, the
   reader checks if ANY column in the group passes before skipping
2. During data writing, each repeated column is individually checked
   against the read filter

Fixes PHPOffice/PhpSpreadsheet#4802
2026-02-08 13:54:04 +00:00
Indrek Haav eafca4a3a8 Add unit tests 2026-02-07 00:23:56 +02:00
Indrek Haav fc3279c594 Fix phpcs errors 2026-02-07 00:11:57 +02:00
Indrek Haav 9f98525f03 Fix Phpstan errors 2026-02-06 22:32:28 +02:00
Indrek Haav d52f556f2d Fix implicit conversion errors when CSS sizes contain or result in fractions 2026-02-06 12:42:33 +02:00
Indrek Haav 0461a2bcd4 Add support for CSS sizes in millimetres 2026-02-06 12:41:08 +02:00
oleibman 95b826a3c8 Merge pull request #4797 from oleibman/issue4061
Strange Behavior of CONCATENATE
2026-02-06 02:32:00 +00:00
oleibman 40d9a3070f Update CHANGELOG.md 2026-02-05 18:28:11 -08:00
oleibman ba99bd148e Add Test 2026-02-02 20:16:35 -08:00
oleibman d63e6b1584 Reorganize 2 Tests 2026-02-02 12:40:56 -08:00
oleibman 14686fb3d9 Reorganize 2 Tests 2026-02-02 12:39:31 -08:00
oleibman 70768bd5d2 Coverage Tweaks 2026-02-01 14:10:58 -08:00
oleibman 9bd828e25d Strange Behavior of CONCATENATE
Fix #4061. CONCATENATE, which has slightly different behavior than CONCAT, and which MS has deprecated for that reason, behaves in an unexpected way when a cell range is presented to it and the spreadsheet does not allow for array results. This would almost certainly occur only for Legacy spreadsheets, but such is what was presented in the issue. The code is changed so that when an array of cells is presented to CONCATENATE, and RETURN_ARRAY_AS_VALUE is in effect, the array will be treated as if it were wrapped in the SINGLE pseudo-function (which is what Excel does by somewhat mysteriously prefixing the cell range with `@`).

This is a niche case. This one stands out because of its deprecation and replacement function. It is possible that other functions exhibit this behavior. I have made no attempt to identify others. A similar approach can probably be applied if issues are raised for others.
2026-02-01 08:51:39 -08:00
oleibman 3e15179c53 Merge pull request #4796 from PHPOffice/dependabot/composer/phpstan/phpstan-phpunit-2.0.12
Bump phpstan/phpstan-phpunit from 2.0.11 to 2.0.12
2026-02-01 16:26:39 +00:00
oleibman daca2fc7ff Merge pull request #4795 from PHPOffice/dependabot/composer/friendsofphp/php-cs-fixer-3.93.1
Bump friendsofphp/php-cs-fixer from 3.92.3 to 3.93.1
2026-02-01 16:20:37 +00:00
oleibman 65b54ae336 Merge pull request #4794 from PHPOffice/dependabot/composer/phpstan/phpstan-2.1.38
Bump phpstan/phpstan from 2.1.33 to 2.1.38
2026-02-01 15:52:44 +00:00
dependabot[bot] 97e91caf30 Bump phpstan/phpstan-phpunit from 2.0.11 to 2.0.12
Bumps [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit) from 2.0.11 to 2.0.12.
- [Release notes](https://github.com/phpstan/phpstan-phpunit/releases)
- [Commits](https://github.com/phpstan/phpstan-phpunit/compare/2.0.11...2.0.12)

---
updated-dependencies:
- dependency-name: phpstan/phpstan-phpunit
  dependency-version: 2.0.12
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 11:01:15 +00:00
dependabot[bot] b4f503896a Bump friendsofphp/php-cs-fixer from 3.92.3 to 3.93.1
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.92.3 to 3.93.1.
- [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.92.3...v3.93.1)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-version: 3.93.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 11:01:09 +00:00
dependabot[bot] 4af74bc217 Bump phpstan/phpstan from 2.1.33 to 2.1.38
---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-version: 2.1.38
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 11:01:00 +00:00
oleibman c1eb8e90d7 Merge pull request #4789 from oleibman/pdfhdrtlr
Headers and Footers in Pdf
2026-01-31 20:16:22 +00:00
oleibman 6bbeb49026 Update CHANGELOG.md 2026-01-31 12:12:38 -08:00
oleibman 5b220b87db Minor Reorg 2026-01-31 09:25:36 -08:00
oleibman c9b01653e7 Coverage Tweak 2026-01-31 00:40:47 -08:00
oleibman 50a7552f12 Option to Whitelist External Images
Loading external images from a spreadsheet can subject the caller to security exploits. For those who think they need something between not loading any external images (the default and our strong recommendation) or loading them all unconditionally (the current alternative), a callback can now be provided to indicate whether a specific image is okay to load. We continue to urge caution in using this option.
2026-01-30 22:43:21 -08:00
oleibman 987489f508 Merge pull request #4792 from PHPOffice/dependabot/composer/symfony/process-6.4.33
Bump symfony/process from 6.4.26 to 6.4.33
2026-01-28 22:54:07 +00:00
dependabot[bot] 344899f50a Bump symfony/process from 6.4.26 to 6.4.33
Bumps [symfony/process](https://github.com/symfony/process) from 6.4.26 to 6.4.33.
- [Release notes](https://github.com/symfony/process/releases)
- [Changelog](https://github.com/symfony/process/blob/8.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/process/compare/v6.4.26...v6.4.33)

---
updated-dependencies:
- dependency-name: symfony/process
  dependency-version: 6.4.33
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-28 22:07:12 +00:00
oleibman 1bb962c76b Merge branch 'master' into pdfhdrtlr 2026-01-27 18:17:04 -08:00