Repository navigation
Conversation
The core can now change a document, in the three ways the views will ask for, and no view asks yet. Each write is tested by mutating a corpus document and comparing everything else. `Element` gains a path of child indices to reach a node again without holding a reference into the tree, mutable access by that path, and attribute writes; `Document::name` spells a new name in the prefix the document declares for its namespace, so a document that writes `t:` for the text namespace is written its own way. `SheetDocument::set_cell` puts a value in a cell by sheet, row and column. A row or cell the document wrote once with a repeat count is split into the run before, the one, and the run after, with the counts fixed, so the one changes and its neighbours in the run keep what they had; a row or cell past what the document wrote is created, with one repeated empty run filling the gap. A cell under a neighbour's span or holding a formula is refused, and nothing moves. `Value::from_input` reads what a person typed the way a spreadsheet does, and the cached text is the value's shortest spelling, which a spreadsheet application reformats from the value when it next opens the file. `Presentation::set_geometry` writes a shape's four `svg:` attributes, each in the unit it was read in. A shape placed by `draw:transform` is refused rather than answered wrongly. `odox_core::edit` edits a paragraph through its flat text, built from the tree and not from the renderer's layout. Characters are deleted from the nodes that hold them, new text goes into the text node at the start of the range, every element that contributes no characters — a bookmark, a frame, a field, a note — stays where it was, and whitespace is then written the way ODF requires. Adjacent text nodes are joined, because the parser keeps an entity reference as a node of its own and two left side by side would not read back as themselves. A split carries a zero-length element at the split point to the first half. The test replaces six kinds of text across a grid of ranges in every paragraph of every corpus document and checks the result against string arithmetic, the marker count, and a re-parse. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Merged
Member
Author
|
Closed by a branch deletion during a stacked merge, not by a decision: its commits reached |
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.
The second slice of 0.4.0, on top of #11. The core can change a document in the three ways the views will ask for, and no view asks yet; each write is tested by mutating a corpus document and comparing everything else.
Elementgains a path of child indices, mutable access by that path, and attribute writes.Document::namespells a new name in the prefix the document declares for its namespace on the content root.SheetDocument::set_cellwrites a value by sheet, row and column, splitting a repeated row or cell run into before, the one, and after with the counts fixed, creating a row or cell past what the document wrote with one repeated empty run filling the gap, and refusing a covered cell or a formula.Presentation::set_geometrywrites a shape's foursvg:attributes in the unit each was read in.odox_core::editedits a paragraph through its flat text built from the tree: characters come out of the nodes that hold them, new text goes into the node at the range's start, every zero-length element stays, whitespace is written the way ODF requires, and a split and a join are there for slice 5.Checked: clippy with
-D warnings, fmt, the catalogue check, and the full test suite, which now includes a sweep replacing six kinds of text across a grid of ranges in every paragraph of every corpus document, compared against string arithmetic, the marker count, and a re-parse. The base is #11's branch; GitHub retargets this tomainwhen that one merges.🤖 Generated with Claude Code