@@ -20,8 +20,7 @@ internal override void ProcessTable(Table table, RtfStringWriter sb)
2020 var tableProperties = new RtfStringWriter ( ) ;
2121
2222 // In RTF, table properties are usually specified for single rows.
23- // However, if spacing between cells is present, table row shading is not applied there,
24- // unlike table shading.
23+ // However, if spacing between cells is present, table row shading is not applied there, unlike table shading.
2524 // This is a limitation of RTF and also occurs when converting DOCX to RTF using Word.
2625 // So we just process table cell shading in ProcessTableCellProperties, since there is no difference
2726 // (it will retrieve table shading if cell shading is not specified).
@@ -649,38 +648,33 @@ internal void ProcessTableCellProperties(TableCell cell, RtfStringWriter sb, ref
649648 if ( direction . Val == TextDirectionValues . LefToRightTopToBottom ||
650649 direction . Val == TextDirectionValues . LeftToRightTopToBottom2010 )
651650 {
652- // Horizontal text, left to right, top to bottom (default)
653651 sb . Write ( @"\cltxlrtb" ) ;
654652 }
655- if ( direction . Val == TextDirectionValues . LefttoRightTopToBottomRotated ||
656- direction . Val == TextDirectionValues . LeftToRightTopToBottomRotated2010 )
657- {
658- // Vertical text, left to right, top to bottom (seems the same as the default, maybe depends on the font or context)
659- sb . Write ( @"\cltxlrtbv" ) ;
660- }
661653 if ( direction . Val == TextDirectionValues . TopToBottomRightToLeft ||
662654 direction . Val == TextDirectionValues . TopToBottomRightToLeft2010 )
663655 {
664- // Vertical text, top to bottom, right to left
665656 sb . Write ( @"\cltxtbrl" ) ;
666657 }
667- if ( direction . Val == TextDirectionValues . TopToBottomRightToLeftRotated ||
668- direction . Val == TextDirectionValues . TopToBottomRightToLeftRotated2010 )
669- {
670- // Vertical text, bottom to top, right to left (seems the same as the default, maybe depends on the font or context)
671- sb . Write ( @"\cltxtbrlv" ) ;
672- }
673658 if ( direction . Val == TextDirectionValues . BottomToTopLeftToRight ||
674659 direction . Val == TextDirectionValues . BottomToTopLeftToRight2010 )
675660 {
676- // Vertical text, bottom to top, left to right
677661 sb . Write ( @"\cltxbtlr" ) ;
678662 }
663+ if ( direction . Val == TextDirectionValues . LefttoRightTopToBottomRotated ||
664+ direction . Val == TextDirectionValues . LeftToRightTopToBottomRotated2010 )
665+ {
666+ sb . Write ( @"\cltxlrtbv" ) ;
667+ }
668+ if ( direction . Val == TextDirectionValues . TopToBottomRightToLeftRotated ||
669+ direction . Val == TextDirectionValues . TopToBottomRightToLeftRotated2010 )
670+ {
671+ sb . Write ( @"\cltxtbrlv" ) ;
672+ }
679673 if ( direction . Val == TextDirectionValues . TopToBottomLeftToRightRotated ||
680674 direction . Val == TextDirectionValues . TopToBottomLeftToRightRotated2010 )
681675 {
682- // Not supported in RTF, fallback to BottomToTopLeftToRight
683- sb . Write ( @"\cltxbtlr " ) ;
676+ // Not available in RTF, fallback to TopToBottomRightToLeftRotated.
677+ sb . Write ( @"\cltxtbrlv " ) ;
684678 }
685679 }
686680
0 commit comments