Поделиться через


Break Class

Break.When the object is serialized out as xml, its qualified name is w:br.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.Break

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

Syntax

'Декларация
Public Class Break _
    Inherits OpenXmlLeafElement
'Применение
Dim instance As Break
public class Break : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 редакция 1]

17.3.3.1 br (Break)

This element specifies that a break shall be placed at the current location in the run content. A break is a special character which is used to override the normal line breaking that would be performed based on the normal layout of the document's contents. [Example: Normal breaking for English would occur only after a breaking space or optional hyphen character. end example]

The behavior of this break character (the location where text shall be restarted after this break) shall be determined by its type and clear attribute values, described below.

[Example: Consider the following sentence in a WordprocessingML document:

x

Normally, just as shown above, this sentence would be displayed on a single line as it is not long enough to require line breaking (given the width of the current page). However, if a text wrapping break character (a typical line break) were inserted after the word is, as follows:

<w:r>
<w:t>This is</w:t>
<w:br/>
<w:t xml:space="preserve"> a simple sentence.</w:t>
</w:r>

This would imply that this break must be treated as a simple line break, and break the line after that word:

This is
a simple sentence.

The break character forced the following text to be restarted on the next available line in the document. end example]

Parent Elements

r (§22.1.2.87); r (§17.3.2.25)

Attributes

Description

clear (Restart Location For Text Wrapping Break)

Specifies the location which shall be used as the next available line when the break's type attribute has a value of textWrapping. This property only affects the restart location when the current run is being displayed on a line which does not span the full text extents due to the presence of a floating object (see possible values for details).

If this break is not of style textWrapping, then this attribute shall be ignored. If this attribute is omitted, then its value shall be assumed to be none if needed.

[Example: Consider a text wrapping break character which should force the restart location to the next line which spans the full width of the text extents of the page (there are no floating objects which interrupt the line).

This line break is of style textWrapping, since it must only advance to the next line, but the clear value must specify that this restart location must ignore all lines which are not of the full line width by specifying a value of all, as follows:

<w:br w:type="textWrapping" w:clear="all" />

This break must therefore not use the next available line, but rather the next available line ignoring all lines which do not span the full text width. end example]

The possible values for this attribute are defined by the ST_BrClear simple type (§17.18.3).

type (Break Type)

Specifies the break type of the current break. The break type determines the next location where text shall be placed after this manual break is applied to the text contents (see possible values for details).

If this attribute is omitted, then it shall be assumed to be of style textWrapping.

[Example: Consider a manual break which must advance the text to the next text column in the document, rather than just the next available line. This break would therefore be specified as follows:

<w:br w:type="column"/>

The type attribute specifies a value of column, which means that the break must force the next character in the document to be restarted on the next line in a new text column in the document. end example]

The possible values for this attribute are defined by the ST_BrType simple type (§17.18.4).

[Note: The W3C XML Schema definition of this element's content model (CT_Br) is located in §A.1. end note]

© ISO/IEC29500: 2008. Приведенный выше текст переведен с английского языка на русский корпорацией Майкрософт (или ее подрядчиками) и 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.

See Also

Reference

Break Members

DocumentFormat.OpenXml.Wordprocessing Namespace