Skip to content

Conversation

oleibman
Copy link
Collaborator

@oleibman oleibman commented Jul 8, 2025

Fix #4528. Fix #2507. Ods Reader expects table:table-row to descend directly from table:table. But it turns out that it can be nested under table:table-header-rows, table:table-rows, or table:table-row-group. Similar considerations apply to table:table-column. Ods Reader is changed to process the nesting tags, and therefore the nested tags underneath them. This is a major change, but it doesn't seem to have broken any existing tests or samples.

No attempt is made to add any of the nesting tags in Ods Writer.

It should be noted that 4528 has an additional problem, which has been reported as issue #4530. It is not fixed by this PR.

This is:

  • a bugfix
  • a new feature
  • refactoring
  • additional unit tests

Checklist:

Fix PHPOffice#4528. Fix PHPOffice#2507. Ods Reader expects `table:table-row` to descend directly from `table:table`. But it turns out that it can be nested under `table:table-header-rows`, `table:table-rows`, or `table:table-row-group`. Similar considerations apply to `table:table-column`. Ods Reader is changed to process the nesting tags, and therefore the nested tags underneath them. This is a major change, but it doesn't seem to have broken any existing tests or samples.

No attempt is made to add any of the nesting tags in Ods Writer.

It should be noted that 4528 has an additional problem, which has been reported as issue PHPOffice#4530. It is not fixed by this PR.
@oleibman
Copy link
Collaborator Author

oleibman commented Jul 8, 2025

Isolating the table-row logic into its own subroutine predictably, and unavoidably, creates a new F-complexity function, and Scrutinizer doesn't like that. This is not a concern.

@oleibman oleibman enabled auto-merge July 15, 2025 06:23
@oleibman oleibman added this pull request to the merge queue Jul 15, 2025
Merged via the queue into PHPOffice:master with commit a106886 Jul 15, 2025
12 of 13 checks passed
@oleibman oleibman deleted the issue4528 branch July 15, 2025 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Ods Reader wrong cell value Reader/Ods.php - missed table-row-group

1 participant