refactor(document): give internal::Document the read-only defaults nine engines pasted - #804
Merged
Merged
Conversation
…nine engines pasted `is_editable` → false, `is_savable` → false and the two throwing `save` overloads were written out verbatim in csv, iwork, markdown, rtf, the three `oldms` documents and the ooxml spreadsheet and presentation documents. Only odf and ooxml text have anything of their own to say, so the base class carries the read-only answer and the nine copies go. No behaviour change. Step 1 of #770. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018cMYRXLJdiCkH65Jm2W9B5
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.
🤖 Generated with Claude Code
Step 1 of #770, the order that issue suggests: the mechanical one, ten files, no behaviour change.
internal::Documentnow answers the read-only case itself:and the nine engines that had pasted exactly that — csv, iwork, markdown, rtf, the three
oldmsdocuments, and the ooxml spreadsheet and presentation documents — drop both the declarations and the definitions. odf and ooxml text keep their overrides, which are the only two with anything real to say.AGENTS.mdgains a clause under Adding / extending a document format so the next engine does not paste them back.Two
#include <odr/exceptions.hpp>became unused with the stubs gone and are dropped with them.No consumer-visible change, so no
CHANGELOG.mdentry.Verification
odrandodr_testbuild clean../odr_test --gtest_filter='Document*:*Save*:*Edit*:*edit*:*save*'— 56 tests, all pass.