@@ -299,13 +299,15 @@ function slideObjectToXml (slide: PresSlide | SlideLayout): string {
299299
300300 // B: Inherit some options from table when cell options dont exist
301301 // @see : http://officeopenxml.com/drwTableCellProperties-alignment.php
302- ; [ 'align' , 'bold' , 'border' , 'color' , 'fill' , 'fontFace' , 'fontSize' , 'margin' , 'underline' , 'valign' ] . forEach ( name => {
302+ ; [ 'align' , 'bold' , 'border' , 'color' , 'fill' , 'fontFace' , 'fontSize' , 'margin' , 'textDirection' , ' underline', 'valign' ] . forEach ( name => {
303303 if ( objTabOpts [ name ] && ! cellOpts [ name ] && cellOpts [ name ] !== 0 ) cellOpts [ name ] = objTabOpts [ name ]
304304 } )
305305
306306 const cellValign = cellOpts . valign
307307 ? ` anchor="${ cellOpts . valign . replace ( / ^ c $ / i, 'ctr' ) . replace ( / ^ m $ / i, 'ctr' ) . replace ( 'center' , 'ctr' ) . replace ( 'middle' , 'ctr' ) . replace ( 'top' , 't' ) . replace ( 'btm' , 'b' ) . replace ( 'bottom' , 'b' ) } "`
308308 : ''
309+ const cellTextDir = ( cellOpts . textDirection && cellOpts . textDirection !== 'horz' ) ? ` vert="${ cellOpts . textDirection } "` : ''
310+
309311 let fillColor =
310312 cell . _optImp ?. fill ?. color
311313 ? cell . _optImp . fill . color
@@ -335,7 +337,7 @@ function slideObjectToXml (slide: PresSlide | SlideLayout): string {
335337 // FUTURE: Cell NOWRAP property (textwrap: add to a:tcPr (horzOverflow="overflow" or whatever options exist)
336338
337339 // 4: Set CELL content and properties ==================================
338- strXml += `<a:tc${ cellSpanAttrStr } >${ genXmlTextBody ( cell ) } <a:tcPr${ cellMarginXml } ${ cellValign } >`
340+ strXml += `<a:tc${ cellSpanAttrStr } >${ genXmlTextBody ( cell ) } <a:tcPr${ cellMarginXml } ${ cellValign } ${ cellTextDir } >`
339341 // strXml += `<a:tc${cellColspan}${cellRowspan}>${genXmlTextBody(cell)}<a:tcPr${cellMarginXml}${cellValign}${cellTextDir}>`
340342 // FIXME: 20200525: ^^^
341343 // <a:tcPr marL="38100" marR="38100" marT="38100" marB="38100" vert="vert270">
0 commit comments