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


ForgetLastTabAlignment Class

Ignore Width of Last Tab Stop When Aligning Paragraph If It Is Not Left Aligned.When the object is serialized out as xml, its qualified name is w:forgetLastTabAlignment.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.OnOffType
        DocumentFormat.OpenXml.Wordprocessing.ForgetLastTabAlignment

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

Syntax

'Declaration
Public Class ForgetLastTabAlignment _
    Inherits OnOffType
'Usage
Dim instance As ForgetLastTabAlignment
public class ForgetLastTabAlignment : OnOffType

Remarks

[ISO/IEC 29500-1 1st Edition]

9.7.3.21 forgetLastTabAlignment (Ignore Width of Last Tab Stop When Aligning Paragraph If It Is Not Left Aligned)

This element specifies how applications should handle the final tab stop on a line when aligning the contents of a paragraph as specified by the jc element (Part 1, §17.3.1.13) in the paragraph's properties.

Typically, aligning the contents of a paragraph involves the following:

  • Determining the layout of that line before the alignment (including all tab stops)

  • Aligning the resulting contents of the line

This is done to ensure that tab stops on a line do not change when the contents of the paragraph are aligned (i.e. the tab stops should not have to take into account the paragraph alignment).

This element, when present with a val attribute value of true (or equivalent), specifies that applications shall ignore the additional line width generated by the last tab stop (and only the last tab stop) when the alignment of the tab stop as defined by the val attribute on the tab element (Part 1, §17.3.1.37) is not left (or bar, which as defined by ISO/IEC 29500, is not a tab stop per se) when determining the width of the line. The resulting full line shall then be aligned at the position where the line would have been aligned without that tab stop.

[Example: Consider a WordprocessingML document with two center aligned paragraphs of text - the first also containing a centered tab stop positioned at 2":

<w:p>
<w:pPr>
<w:tabs>
<w:tab w:val="center" w:pos="2880" />
</w:tabs>
<w:jc w:val="center" />
</w:pPr>
<w:r>
<w:t>Text Before</w:t>
<w:tab/>
<w:t>Text After</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:jc w:val="center" />
</w:pPr>
<w:r>
<w:t>Text BeforeText After</w:t>
</w:r>
</w:p>

The default presentation would determine the full width of each line including the tab stops, finally aligning the resulting text to the center position as requested by the jc element:

DocumentFormat.OpenXml.Wordprocessing.ForgetLastTa

However, if this compatibility setting is turned on:

<w:compat>
<w:forgetLastTabAlignment />
</w:compat>

Then the width added to the line by the last tab is ignored when centering the paragraph because that tab is a center aligned tab stop, resulting in the following output:

DocumentFormat.OpenXml.Wordprocessing.ForgetLastTa

In the resulting output, the starting location of both lines is at the same place on the page, as the resulting width of both lines is identical when the tab stop is removed from the line width calculation. end example]

Parent Elements

compat (Part 1, §17.15.1.21)

This element’s content model is defined by the common boolean property definition in Part 1, §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

Reference

ForgetLastTabAlignment Members

DocumentFormat.OpenXml.Wordprocessing Namespace