Read headEnd/tailEnd from an OOXML a:ln node (e.g. theme line style).
(ln: SafeXmlNode)
| 264 | |
| 265 | /** Read headEnd/tailEnd from an OOXML a:ln node (e.g. theme line style). */ |
| 266 | function getLineEndsFromLn(ln: SafeXmlNode): { headEnd?: LineEndInfo; tailEnd?: LineEndInfo } { |
| 267 | const out: { headEnd?: LineEndInfo; tailEnd?: LineEndInfo } = {} |
| 268 | const he = ln.child('headEnd') |
| 269 | if (he.exists()) { |
| 270 | const t = he.attr('type') |
| 271 | if (t && t !== 'none') out.headEnd = { type: t, w: he.attr('w'), len: he.attr('len') } |
| 272 | } |
| 273 | const te = ln.child('tailEnd') |
| 274 | if (te.exists()) { |
| 275 | const t = te.attr('type') |
| 276 | if (t && t !== 'none') out.tailEnd = { type: t, w: te.attr('w'), len: te.attr('len') } |
| 277 | } |
| 278 | return out |
| 279 | } |
| 280 | |
| 281 | // --------------------------------------------------------------------------- |
| 282 | // Shape Rendering |
no test coverage detected