fix: wire up measure-numbering read/write in mx::api - #322
Merged
Conversation
MeasureData::measureNumbering and Converter::convertMeasureNumbering already existed, but neither MeasureReader nor MeasureWriter ever called the converter, so a source's <measure-numbering> (inside a measure's <print>) was silently dropped on round-trip even though the api audits the element as fully supported. MeasureReader::parsePrint now reads it directly into MeasureData (it is measure-scoped, presence-based state, not carried forward like time/key). MeasureWriter gains writeMeasureNumbering(), which finds-or-creates the measure's <print> element the same way writePageInfo() already does, so it shares a single <print> with any system/page layout already written for that measure. Closes #279
Coverage reportCore-dev coverage
|
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 77.8% | 28513 / 36640 |
| Functions | 74.3% | 6352 / 8551 |
| Branches | 50.7% | 22678 / 44751 |
API coverage src/private/mx/{api,impl,utility}/
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 80.9% | 6424 / 7943 |
| Functions | 67.8% | 2221 / 3276 |
| Branches | 49.6% | 5504 / 11100 |
Core HTML report | API HTML report
Commit c13da0e68e642faefa920c623a5ce00a87d0c131.
gen-quality
|
This was referenced Jul 7, 2026
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.
Human Summary
This seems to be wiring up something that was already in the API but missing from the reader and writer. It appears to put the repo in a better state! Gonna merge.
Summary
MeasureData::measureNumberingandConverter::convertMeasureNumberingalready existed (abidirectional core/api enum mapping), but neither
MeasureReadernorMeasureWriterever calledthe converter. A source's
<measure-numbering>(nested inside a measure's<print>) was silentlydropped on round-trip, even though
data/api.features.xmlaudits the element as fully supported.MeasureReader::parsePrintnow reads<print>/<measure-numbering>'s value directly intoMeasureData::measureNumbering. This is measure-scoped, presence-based state (defaultunspecified), not carried forward across measures like time/key.MeasureWritergainswriteMeasureNumbering(), which finds-or-creates the measure's<print>element the same way
writePageInfo()already does, so<measure-numbering>shares a single<print>with any system/page layout already written for that measure instead of emitting asecond one.
Testing
measureNumberingRoundTrip/measureNumberingUnspecifiedOmitsElementtests(
MeasureDataTest.cpp)make test: all pass (4734 assertions in 382 test cases, plus the three examples)make test-api-roundtrip: 158 passed, 0 failed (of 158 pinned; 1 newly unlocked)make fmt/make check: cleanReferences