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


ShapeLayoutLikeWord8 Class

Emulate Word 97 Text Wrapping Around Floating Objects.When the object is serialized out as xml, its qualified name is w:shapeLayoutLikeWW8.

Inheritance Hierarchy

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

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

Syntax

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

Remarks

[ISO/IEC 29500-1 1st Edition]

9.7.3.35 shapeLayoutLikeWW8 (Ignore Text Wrapping around Objects at Bottom of Page)

This element specifies that applications should ignore the line wrapping setting specified by a floating object, instead allowing text to be displayed beneath it under the specific set of conditions identified below.

Typically, text wrapping around a floating object is dictated by the presence of one of the following as a child element of the object’s anchor element (Part 1, §20.4.2.3):

  • wrapNone (Part 1, §20.4.2.15) element, which specifies no text wrapping

  • wrapSquare (Part 1, §20.4.2.17) element, which specifies square text wrapping

  • wrapThrough (Part 1, §20.4.2.18) element, which specifies through text wrapping

  • wrapTight (Part 1, §20.4.2.19) element, which specifies tight text wrapping

  • wrapTopAndBottom (Part 1, §20.4.2.19) element, which specifies top and bottom text wrapping

This element, when present with a val attribute value of true (or equivalent), specifies that applications shall allow text to wrap beneath a floating object, ignoring the object’s true wrapping setting, when the following conditions are met:

  • The floating object has any of the following elements present as a child of the object’s anchor element: wrapSquare, wrapTight, or wrapTopAndBottom.

  • The floating object has a positionV element (Part 1, §20.4.2.11) with a relativeFrom attribute value of line.

  • The floating object has a negative value for the child posOffset element (Part 1, §20.4.2.12) of the positionV element.

  • The paragraph containing the anchor element would appear directly after the previous paragraph if the wrapping settings were ignored.

  • The paragraph containing the anchor element would be pushed to the next page if the wrapping settings were respected.

[Example: Consider a WordprocessingML document containing a DrawingML object which meets the conditions outlined above:

<w:p>
  <w:r>
    <w:t>Sample text. Sample text. Sample text. Sample text. Sample text. Sample text.</w:t>
  </w:r>
  <w:r>
    <w:drawing>
      <wp:anchor … >
    <wp:positionV relativeFrom="line">
      <wp:posOffset>-428914</wp:posOffset>
    </wp:positionV>
    <wp:wrapTopAndBottom />
… 
      </wp:anchor>
</w:drawing>
  </w:r>
  <w:r>
    <w:t> Sample text. Sample text. Sample text. Sample text. Sample text. Sample text.</w:t>
  </w:r>
…
</w:p>

When the wrapping settings are respected, the shape and its paragraph do not fit on the page, so they are moved to the next page (the paragraph containing the anchor has been highlighted for illustrative purposes):

DocumentFormat.OpenXml.Wordprocessing.ShapeLayoutL

If this compatibility setting is turned on:

<w:compat>
<w:shapeLayoutLikeWW8 />
</w:compat>

Then applications should ignore the wrapping setting and allow text to wrap below the object. This behaviour results in the following (again, the paragraph containing the anchor has been highlighted for illustrative purposes):

DocumentFormat.OpenXml.Wordprocessing.ShapeLayoutL

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

ShapeLayoutLikeWord8 Members

DocumentFormat.OpenXml.Wordprocessing Namespace