fix(help): pptx shape spacing is documented in the wrong unit - #297
Open
lukiod wants to merge 1 commit into
Open
fix(help): pptx shape spacing is documented in the wrong unit#297lukiod wants to merge 1 commit into
lukiod wants to merge 1 commit into
Conversation
shape.json described spacing as 1/100 pt and gave spacing=200 as the example. The setter parses points and multiplies by 100, so the documented example writes spc="20000", which is 200pt of letter spacing. run.json already documents the same OOXML attribute correctly, so the two help files contradicted each other. Fixes iOfficeAI#291
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.
Fixes #291. Help text only, 3 lines, no code change.
schemas/help/pptx/shape.jsondescribedspacingas 1/100 pt and offered--prop spacing=200as the example. The setter parses points and multiplies by 100, so following the printed example writesspc="20000", which is 200pt of letter spacing.Validation: authoritative reference (CONTRIBUTING rule 2, option 3)
The code is the reference here, since the defect is that the docs disagree with it.
src/officecli/Handlers/Pptx/PowerPointHandler.ShapeProperties.cs:1502:Its own error message says
Expected a finite number in points (e.g. 2, -1, 0.5).schemas/help/pptx/run.jsonalready documents the same OOXML attribute correctly ("character spacing in points. Stored as 1/100 pt in OOXML"), so the two help files contradicted each other for one attribute. This alignsshape.jsonwith both the code andrun.json.The new examples are
spacing=2andspacing=-0.5, the latter because the setter accepts fractional points and negatives tighten.Not changed
"readback": "integer"on this property looks questionable too, since readback is described elsewhere as the point value and points can be fractional. I did not trace the readback path, so I left it rather than guess. Happy to open a separate issue if that is worth checking.