Three issues on OfficeCLI v1.0.88. Each contradicts officecli help.
1. PPTX chart --prop autotitledeleted writes <c:autoTitleDeleted> in invalid schema position
CLI accepts on add, file fails officecli validate. Reproduces for both =true and =false.
set +H
FILE=/tmp/oc-1-autotitledeleted.pptx
rm -f "$FILE"
officecli create "$FILE" --json
officecli open "$FILE"
officecli add "$FILE" / --type slide --prop layout=blank --json
officecli add "$FILE" /slide[1] --type chart \
--prop chartType=bar --prop title="Test" \
--prop categories=A,B,C --prop data="Revenue:100,200,300" \
--prop autotitledeleted=true \
--prop x=2cm --prop y=2cm --prop width=16cm --prop height=9cm \
--json
officecli close "$FILE"
officecli validate "$FILE"
Actual:
Found 1 validation error(s):
[Schema] The element has unexpected child element 'http://schemas.openxmlformats.org/drawingml/2006/chart:autoTitleDeleted'.
Path: /c:chartSpace[1]/c:chart[1]
Part: /ppt/slides/charts/chart1.xml
XML element order in <c:chart> (line numbers after splitting on >):
4: <c:title>
21: </c:title>
22: <c:plotArea>
105: </c:plotArea>
106: <c:legend>
109: </c:legend>
110: <c:plotVisOnly val="1" />
111: <c:dispBlanksAs val="gap" />
112: <c:autoTitleDeleted val="1" />
Per ECMA-376, <c:autoTitleDeleted> must follow <c:title>; it is written at the end of <c:chart> instead. With autotitledeleted=false it emits <c:autoTitleDeleted val="0" /> at the same wrong position with the same validation error.
Same chart without the prop validates. Same chart with title="" validates and emits no <c:title> and no <c:autoTitleDeleted>.
2. PPTX group --prop shapes=/slide[N]/shape[@id=ID] rejected, despite help
officecli help pptx group:
shapes string [add]
description: comma-separated shape indices (1,2,3) or paths (/slide[N]/shape[M] or /slide[N]/shape[@id=ID]). Required.
example: --prop shapes=1,2
Positional shapes=1,2 works (exit=0). The @id=ID form is rejected, and the error message itself contradicts the help.
set +H
FILE=/tmp/oc-2-group-at-id.pptx
rm -f "$FILE"
officecli create "$FILE" --json
officecli open "$FILE"
officecli add "$FILE" / --type slide --prop layout=blank --json
officecli add "$FILE" /slide[1] --type shape --prop preset=rect --prop name=Box1 \
--prop x=2cm --prop y=2cm --prop width=4cm --prop height=2cm --json
officecli add "$FILE" /slide[1] --type shape --prop preset=rect --prop name=Box2 \
--prop x=8cm --prop y=2cm --prop width=4cm --prop height=2cm --json
# Shape ids returned above are 10000 and 10001.
officecli add "$FILE" /slide[1] --type group \
--prop "shapes=/slide[1]/shape[@id=10000],/slide[1]/shape[@id=10001]" --json
Actual:
{
"success": false,
"error": {
"error": "Invalid shape path: '/slide[1]/shape[@id=10000]'. Expected format: /slide[N]/shape[M]",
"code": "invalid_value"
}
}
3. DOCX style keepNext / keepLines / pageBreakBefore: add rejects, set accepts; help advertises [add/set/get]
officecli help docx style:
keepNext bool [add/set/get] aliases: keepnext
description: keep this paragraph on the same page as the next.
example: --prop keepNext=true
readback: true/false
keepLines bool [add/set/get] aliases: keeplines
description: keep all lines of this paragraph together on one page.
example: --prop keepLines=true
readback: true/false
pageBreakBefore bool [add/set/get] aliases: pagebreakbefore
description: force a page break before each paragraph using this style.
example: --prop pageBreakBefore=true
readback: true/false
add /styles --type style --prop keepNext=true ... (advertised as [add/...]):
{
"success": true,
"data": "Added style at /styles/MyStyle",
"warnings": [
{
"message": "WARNING: UNSUPPORTED props on /styles: keepNext (not supported), keepLines (not supported), pageBreakBefore (not supported)",
"code": "unsupported_property"
}
]
}
add exit=2 with UNSUPPORTED warning; props silently dropped from the style.
set /styles/MyStyle --prop keepNext=true --prop keepLines=true --prop pageBreakBefore=true on the same style (advertised as [.../set/...]):
{
"success": true,
"data": {
"success": true,
"data": "Updated /styles/MyStyle: keepNext=true, keepLines=true, pageBreakBefore=true"
}
}
set exit=0, props applied. So the same three help-advertised [add/set/get] props work via set but are rejected via add on the same path with the same value.
Full repro:
set +H
FILE=/tmp/oc-3-style-pagination.docx
rm -f "$FILE"
officecli create "$FILE" --json
officecli open "$FILE"
# add path — UNSUPPORTED, exit=2
officecli add "$FILE" /styles --type style \
--prop id=MyStyle --prop name="MyStyle" --prop type=paragraph \
--prop font=Calibri --prop size=12 \
--prop keepNext=true --prop keepLines=true --prop pageBreakBefore=true \
--json
# set path — same props, accepted
officecli set "$FILE" /styles/MyStyle \
--prop keepNext=true --prop keepLines=true --prop pageBreakBefore=true \
--json
officecli close "$FILE"
Three issues on OfficeCLI v1.0.88. Each contradicts
officecli help.1. PPTX
chart --prop autotitledeletedwrites<c:autoTitleDeleted>in invalid schema positionCLI accepts on add, file fails
officecli validate. Reproduces for both=trueand=false.Actual:
XML element order in
<c:chart>(line numbers after splitting on>):Per ECMA-376,
<c:autoTitleDeleted>must follow<c:title>; it is written at the end of<c:chart>instead. Withautotitledeleted=falseit emits<c:autoTitleDeleted val="0" />at the same wrong position with the same validation error.Same chart without the prop validates. Same chart with
title=""validates and emits no<c:title>and no<c:autoTitleDeleted>.2. PPTX
group --prop shapes=/slide[N]/shape[@id=ID]rejected, despite helpofficecli help pptx group:Positional
shapes=1,2works (exit=0). The@id=IDform is rejected, and the error message itself contradicts the help.Actual:
{ "success": false, "error": { "error": "Invalid shape path: '/slide[1]/shape[@id=10000]'. Expected format: /slide[N]/shape[M]", "code": "invalid_value" } }3. DOCX style
keepNext/keepLines/pageBreakBefore:addrejects,setaccepts; help advertises[add/set/get]officecli help docx style:add /styles --type style --prop keepNext=true ...(advertised as[add/...]):{ "success": true, "data": "Added style at /styles/MyStyle", "warnings": [ { "message": "WARNING: UNSUPPORTED props on /styles: keepNext (not supported), keepLines (not supported), pageBreakBefore (not supported)", "code": "unsupported_property" } ] }addexit=2 with UNSUPPORTED warning; props silently dropped from the style.set /styles/MyStyle --prop keepNext=true --prop keepLines=true --prop pageBreakBefore=trueon the same style (advertised as[.../set/...]):{ "success": true, "data": { "success": true, "data": "Updated /styles/MyStyle: keepNext=true, keepLines=true, pageBreakBefore=true" } }setexit=0, props applied. So the same three help-advertised[add/set/get]props work viasetbut are rejected viaaddon the same path with the same value.Full repro: