The PowerPoint2007 Writer writes a shape's Border as a:ln in p:spPr, from three places --
writeShapeText() (AbstractSlide.php:270), writeShapeLine() (:872) and writeShapePic()
(:1568), all through writeBorder(). The Reader never reads it back.
loadShapeRichText() and loadShapeDrawing() both open p:spPr and take the fill out of it
(Reader/PowerPoint2007.php:1020 and :1201), and stop there. So a shape loaded from a file always
wears the border it was born with -- LINE_NONE, from AbstractShape.php:145 -- whatever the file
says.
Measured on 63f09988a, a RichText given a black single 1px border, written, loaded and written
again:
<!-- written -->
<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr">
<a:solidFill><a:srgbClr val="000000"><a:alpha val="100000"/></a:srgbClr></a:solidFill>
<a:prstDash val="solid"/><a:round/>
<a:headEnd type="none" w="med" len="med"/><a:tailEnd type="none" w="med" len="med"/>
</a:ln>
<!-- loaded, then written again -->
<!-- nothing -->
The whole element is gone, and with it the width, the compound, the dash and the colour.
This is not a gap in the model or in the parsing code: loadStyleBorder()
(Reader/PowerPoint2007.php:1923) already reads exactly this element -- w through
emuToPixels(), cmpd into the line style, a:noFill into LINE_NONE, a:solidFill/a:srgbClr
into the colour and a:prstDash into the dash. It is only ever called for the six borders of a
table cell (:1330-:1350). Calling it for a shape is the fix, and a PR follows.
Same in the ODPresentation Reader: Border reaches the model only through
$oCell->setBorders() (Reader/ODPresentation.php:1169). That half is not in the PR.
Related but separate: Border cannot describe a gradient or a pattern line, because its colour is
a Color and not a Fill -- #943. A line written with a:gradFill therefore still comes back as
a colour, which is a limitation of the model this issue does not touch.
The PowerPoint2007 Writer writes a shape's
Borderasa:lninp:spPr, from three places --writeShapeText()(AbstractSlide.php:270),writeShapeLine()(:872) andwriteShapePic()(
:1568), all throughwriteBorder(). The Reader never reads it back.loadShapeRichText()andloadShapeDrawing()both openp:spPrand take the fill out of it(
Reader/PowerPoint2007.php:1020and:1201), and stop there. So a shape loaded from a file alwayswears the border it was born with --
LINE_NONE, fromAbstractShape.php:145-- whatever the filesays.
Measured on
63f09988a, aRichTextgiven a black single 1px border, written, loaded and writtenagain:
The whole element is gone, and with it the width, the compound, the dash and the colour.
This is not a gap in the model or in the parsing code:
loadStyleBorder()(
Reader/PowerPoint2007.php:1923) already reads exactly this element --wthroughemuToPixels(),cmpdinto the line style,a:noFillintoLINE_NONE,a:solidFill/a:srgbClrinto the colour and
a:prstDashinto the dash. It is only ever called for the six borders of atable cell (
:1330-:1350). Calling it for a shape is the fix, and a PR follows.Same in the ODPresentation Reader:
Borderreaches the model only through$oCell->setBorders()(Reader/ODPresentation.php:1169). That half is not in the PR.Related but separate:
Bordercannot describe a gradient or a pattern line, because its colour isa
Colorand not aFill-- #943. A line written witha:gradFilltherefore still comes back asa colour, which is a limitation of the model this issue does not touch.