feat(ods): a column's default cell style reaches its cells - #558
Merged
Conversation
LibreOffice puts a column's format on the column, not on its cells: <table:table-column table:default-cell-style-name="ce1"/> where `ce1` names the data style. A date column's `yyyy-mm-dd` lives there and nowhere else — the cells themselves say `table:style-name="Default"`, a named style in `styles.xml` that this reader does not open. hucre read neither, so a LibreOffice document came back with its values and none of its formats. The column default is an *automatic* style in `content.xml`, which this reader does parse, so that half is reachable and is what this reads. A column naming a style from `styles.xml` still resolves to nothing — which is the right answer for the one LibreOffice actually writes there, `"Default"`, since that style is the absence of formatting. PARITY says so. A cell's own style still wins; the column only fills in for cells that named none. A covered cell advances the column count too, or every default after a merge would land one column to the left. This was the last open item in SPEC-COVERAGE.md — in the ODF grammar, in `libreoffice-basic.ods`, and nowhere in `src/`. Both halves of the report now read "Nothing" under *not yet looked at*, and no item is marked open. Output still validates against the OASIS grammar. pnpm test green — 10,583 tests, 234 files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LibreOffice puts a column's format on the column, not on its cells:
where
ce1names the data style. A date column'syyyy-mm-ddlives there and nowhere else — the cells themselves saytable:style-name="Default", a named style instyles.xmlthat this reader does not open.hucre read neither, so a LibreOffice document came back with its values and none of its formats.
What is reachable, and what is not
The column default is an automatic style in
content.xml, which this reader does parse — so that half is reachable, and is what this reads.A column naming a style from
styles.xmlstill resolves to nothing. That is the right answer for the one LibreOffice actually writes there —"Default", on the columns it did not format — since that style is the absence of formatting.PARITY.mdrecords both halves.Precedence and counting
This was the last open item
It was in the ODF grammar, in
libreoffice-basic.ods, and nowhere insrc/. Both halves ofSPEC-COVERAGE.mdnow read "Nothing" under not yet looked at, and no item is marked open.Output still validates against the OASIS grammar (
validate-odf.mjs: all parts valid).pnpm testgreen — 10,583 tests, 234 files.🤖 Generated with Claude Code