Repository navigation
fix(odf): move hidden ODT sections to the invisible content layer - #4860
Conversation
Signed-off-by: Ankit Kumar <ankitkumar19473@gmail.com>
|
✅ DCO Check Passed Thanks @ankit2235, all your commits are properly signed off. 🎉 |
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
AI triage (advisory)Checked commit The ODT backend now moves the content of a section with Topic labels added: CI safety: no concern found. A maintainer must still approve CI. 3 related pull request(s) in the same code
The |
There was a problem hiding this comment.
AI first review (advisory): no blocker found
This review covers the full diff at 6045214ed8. It read the code and did not run it.
Checked that hidden ODT sections with text:display="none" and their nested elements assign to ContentLayer.INVISIBLE without affecting sibling elements.
A maintainer makes the merge decision. This review never approves the pull request.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
LibreOffice Writer can hide a section (Format > Sections > Hide). It saves the
section as
<text:section text:display="none">, and the section is not shownor printed. The ODT backend ignored this attribute, so the content of a hidden
section went to the body and appeared in every export.
This change moves the content of a hidden section to
ContentLayer.INVISIBLE.This is the same as for hidden ODS sheets, hidden PPTX slides (#4647), hidden
PPTX shapes (#4733) and hidden ODP slides (#4767). The content is still
available with
included_content_layers.Nested sections inside a hidden section also stay invisible. Sections that are
shown keep their current behavior.
Scope
text:display="none"is handled. A conditional section(
text:display="condition") needs evaluation of its formula, so it stays inthe body.
Tests
test_odt_hidden_section_goes_to_invisible_layer.uv run pytest tests/test_backend_opendocument.pypasses.