RightToLeftText Class

Defines the RightToLeftText Class.When the object is serialized out as xml, its qualified name is w:rtl.

Inheritance Hierarchy


Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)


Public Class RightToLeftText _
    Inherits OnOffType
Dim instance As RightToLeftText
public class RightToLeftText : OnOffType


[ISO/IEC 29500-1 1st Edition] rtl (Right To Left Text)

This element specifies whether the contents of this run shall have right-to-left characteristics. Specifically, the following behaviors are applied when this element’s val attribute is true (or an equivalent):

  • Formatting – When the contents of this run are displayed, all characters shall be treated as complex script characters. This means that the values of the bCs element (§ and the iCs element (§ shall be use to determine bold and italic formatting, that the cs/cstheme attributes on the rFonts element (§ shall be used to determine the font face, and the szCs element (§ shall be used to determine the font size.

  • Character Directionality Override – When the contents of this run are displayed, this property acts as a right-to-left override for characters which are classified as follows (using the Unicode Character Database):

Weak types except European Number, European Number Terminator, Common Number Separator, Arabic Number and (for Hebrew text) European Number Separator when constituting part of a number

Neutral types

  • [Rationale: This override allows applications to store and utilize higher-level information beyond that implicitly derived from the Unicode Bidirectional algorithm. For example, if the string “first second” appears in a right-to-left paragraph inside a document, the Unicode algorithm would always result in “first second” at display time (since the neutral character is surrounded by strongly classified characters). However, if the whitespace was entered using a right-to-left input method (e.g. a Hebrew keyboard), then that character could be classified as RTL using this property, allowing the display of “second first” in a right-to-left paragraph, since the user explicitly asked for the space in a right-to-left context. end rationale]

This element provides information used to resolve the (Unicode) classifications of individual characters as either L, R, AN or EN. Once this is determined, the line should be displayed subject to the recommendation of the Unicode BiDi algorithm in reordering resolved levels.

This property shall not be used with strongly left-to-right text. Any behavior under that condition is unspecified. . This property, when off, shall not be used with strong right-to-left text. Any behavior under that condition is unspecified.

If this element is not present, the default value is to leave the formatting applied at previous level in the style hierarchy. If this element is never applied in the style hierarchy, then right to left characteristics shall not be applied to the contents of this run.

[Example: Consider the following WordprocessingML visual content: “first second, أولى ثاني”. This content might appear as follows within its parent paragraph:

<w:t xml:space="preserve">first second, </w:t>
<w:t xml:space="preserve"> </w:t>

The presence of the rtl element on the second, third, and fourth runs specifies that:

  • The formatting on those runs is specified using the complex-script property variants.

  • The whitespace character is treated as right-to-left.

Note that the second, third and fourth runs could be joined as one run with the rtl element specified.

end example]

Parent Elements

rPr (§; rPr (§; rPr (§; rPr (§17.9.25); rPr (§; rPr (§; rPr (§; rPr (§; rPr (§; rPr (§

This element’s content model is defined by the common boolean property definition in §17.17.4.

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


RightToLeftText Members

DocumentFormat.OpenXml.Wordprocessing Namespace