RightToLeft Class
Defines the RightToLeft Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is a:rtl.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Drawing.RightToLeft
Namespace: DocumentFormat.OpenXml.Drawing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
声明
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
Public Class RightToLeft _
Inherits OpenXmlLeafElement
用法
Dim instance As RightToLeft
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
public class RightToLeft : OpenXmlLeafElement
Remarks
[ISO/IEC 29500-1 第 1 个版本]
21.1.2.2.8 rtl (Right to Left Run)
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 cs element (§21.1.2.3.1) shall be used to determine the font face.
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 Bidirectional Algorithm in reordering resolved levels.
This property shall not be used with strong left-to-right text. Any behavior under that condition is unspecified. This property, when off, should 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 DrawingML visual content: "first second, ???? ????". This content might appear as follows within its parent paragraph:
<a:p>
<a:r>
<a:t>first second, </w:t>
</a:r>
<a:r>
<a:rPr>
<a:rtl/>
</a:rPr>
<a:t>????</a:t>
</a:r>
<a:r>
<a:rPr>
<a:rtl/>
</a:rPr>
<a:t> </a:t>
</a:r>
<a:r>
<a:rPr>
<a:rtl/>
</a:rPr>
<a:t>????</a:t>
</a:r>
</a:p>
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 |
---|
defRPr (§21.1.2.3.2); endParaRPr (§21.1.2.2.3); rPr (§21.1.2.3.9) |
Attributes |
Description |
---|---|
val (On/Off Value) |
Specifies a boolean value for the property defined by the parent XML element. A value of 1 or true specifies that the property shall be explicitly applied. This is the default value for this attribute, and is implied when the parent element is present, but this attribute is omitted. A value of 0 or false specifies that the property shall be explicitly turned off. [Example: For example, consider the following on/off property:
The val attribute explicitly declares that the property is false. end example] The possible values for this attribute are defined by the ST_OnOff simple type (§22.9.2.7). |
[Note: The W3C XML Schema definition of this element's content model (CT_Boolean) is located in §A.4.1. end note]
© ISO/IEC29500: 2008. 以上摘要已经由 Microsoft(和/或其代理公司)从英语翻译为简体中文,ISO 对此翻译不承担任何责任。
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.