Class TextContainingElement

All Implemented Interfaces:
Serializable, Cloneable, OdfStylePropertySet, Element, ElementTraversal, EventTarget, Node, NodeList, TypeInfo
Direct Known Subclasses:
TextParagraphElementBase

public abstract class TextContainingElement extends OdfStylableElement
DOM container to be used for all ODF elements containing "stylable text"

All text handling is capsulated into this class.

Author:
svante.schubertATgmail.com
See Also:
  • Constructor Details

    • TextContainingElement

      public TextContainingElement(OdfFileDom ownerDoc, OdfName elementName, OdfStyleFamily styleFamily, OdfName styleAttrName)
      Create the instance of TextParagraphElementBase
      Parameters:
      ownerDoc - The type is OdfFileDom
      elementName - name of the stylable element containing text
      styleFamily - the style family of the element
      styleAttrName - e.g. depends on the related @style:family for <text:p> it is @text:style-name
  • Method Details

    • getOdfName

      public OdfName getOdfName()
      Specified by:
      getOdfName in class OdfElement
    • appendTextSelection

      public OdfElement appendTextSelection(TextSelection outerSelection)
      Parameters:
      outerSelection - as the end position was prior just given for a merge the an outer selection will be added. Earlier added selection as similar positions are therefore called "inner" selections and do have a higher priority (as inner overwrites outer)
      Returns:
      the element that is being kept (sometimes the element of the given selection had to be dismissed, sometimes even the parent, when an empty element was deleted).
    • getTextSelections

      public Collection<TextSelection> getTextSelections()