com.aspose.words
Class OfficeMath

com.aspose.words.CompositeNode
    extended by com.aspose.words.OfficeMath

public class OfficeMath 
extends com.aspose.words.CompositeNode

Represents an Office Math object such as function, equation, matrix or alike. Can contain child elements including runs of mathematical text, bookmarks, comments, other OfficeMath instances and some other nodes.

In this version of Aspose.Words, OfficeMath nodes do not provide public methods and properties to create or modify a OfficeMath object. In this version you are not able to instantiate nodes or modify existing except deleting them.

OfficeMath can only be a child of Aspose.Words.Paragraph.


Property Getters/Setters Summary
Aspose.Words.NodeCollectiongetChildNodes()→ inherited from Aspose.Words.CompositeNode
           Gets all immediate child nodes of this node.
intgetCount()→ inherited from Aspose.Words.CompositeNode
           Gets the number of immediate children of this node.
intgetDisplayType()
voidsetDisplayType(int value)
           Gets/sets Office Math display format type which represents whether an equation is displayed inline with the text or displayed on its own line. The value of the property is OfficeMathDisplayType integer constant.
Aspose.Words.DocumentBasegetDocument()→ inherited from Aspose.Words.Node
           Gets the document to which this node belongs.
java.nio.charset.CharsetgetEquationXmlEncoding()
voidsetEquationXmlEncoding(java.nio.charset.Charset value)
           Gets/sets an encoding that was used to encode equation XML, if this office math object is read from equation XML. We use the encoding on saving a document to write in same encoding that it was read.
Aspose.Words.NodegetFirstChild()→ inherited from Aspose.Words.CompositeNode
           Gets the first child of the node.
booleanhasChildNodes()→ inherited from Aspose.Words.CompositeNode
           Returns true if this node has any child nodes.
booleanisComposite()→ inherited from Aspose.Words.CompositeNode
           Returns true as this node can have child nodes.
intgetJustification()
voidsetJustification(int value)
           Gets/sets Office Math justification. The value of the property is OfficeMathJustification integer constant.
Aspose.Words.NodegetLastChild()→ inherited from Aspose.Words.CompositeNode
           Gets the last child of the node.
intgetMathObjectType()
           Gets type MathObjectType of this Office Math object. The value of the property is MathObjectType integer constant.
Aspose.Words.NodegetNextSibling()→ inherited from Aspose.Words.Node
           Gets the node immediately following this node.
Aspose.Words.NodeTypegetNodeType()
           Returns NodeType.OfficeMath.
Aspose.Words.CompositeNodegetParentNode()→ inherited from Aspose.Words.Node
           Gets the immediate parent of this node.
Aspose.Words.ParagraphgetParentParagraph()
           Retrieves the parent Aspose.Words.Paragraph of this node.
Aspose.Words.NodegetPreviousSibling()→ inherited from Aspose.Words.Node
           Gets the node immediately preceding this node.
Aspose.Words.RangegetRange()→ inherited from Aspose.Words.Node
           Returns a Range object that represents the portion of a document that is contained in this node.
 
Method Summary
voidclearRunAttrs()
          Reserved for internal use.
voiddd()→ inherited from Aspose.Words.CompositeNode
          
Aspose.Words.NodedeepClone(boolean isCloneChildren)→ inherited from Aspose.Words.Node
           Creates a duplicate of the node.
java.lang.ObjectfetchInheritedRunAttr(int fontAttr)
          Reserved for internal use.
Aspose.Words.CompositeNodegetAncestor(java.lang.Class ancestorType)→ inherited from Aspose.Words.Node
           Gets the first ancestor of the specified object type.
Aspose.Words.CompositeNodegetContainer()→ inherited from Aspose.Words.CompositeNode
          Reserved for internal use.
aspose.obfuscated.typegetDeleteRevision()
          Reserved for internal use.
java.lang.ObjectgetDirectRunAttr(int fontAttr)
          Reserved for internal use.
intgetDirectRunAttrsCount()
          Reserved for internal use.
Aspose.Words.DocumentBasegetDocument_IInline()
          Reserved for internal use.
aspose.obfuscated.typegetExpandedRunPr_IInline(aspose.obfuscated.type flags)
          Reserved for internal use.
aspose.obfuscated.typegetInsertRevision()
          Reserved for internal use.
OfficeMathRenderergetMathRenderer()
           Creates and returns an object that can be used to render this equation into an image.
aspose.obfuscated.typegetMoveFromRevision()
          Reserved for internal use.
aspose.obfuscated.typegetMoveToRevision()
          Reserved for internal use.
Aspose.Words.NodegetNextMatchingNode(aspose.obfuscated.type curNode)→ inherited from Aspose.Words.CompositeNode
          Reserved for internal use.
aspose.obfuscated.typegetParentParagraph_IInline()
          Reserved for internal use.
aspose.obfuscated.typegetRunPr_IInline()
          Reserved for internal use.
java.lang.StringgetText()→ inherited from Aspose.Words.CompositeNode
           Gets the text of this node and of all its children.
java.util.Iteratoriterator()→ inherited from Aspose.Words.CompositeNode
           Provides support for the for each style iteration over the child nodes of this node.
voidremove()→ inherited from Aspose.Words.Node
           Removes itself from the parent.
voidremoveAllChildren()→ inherited from Aspose.Words.CompositeNode
           Removes all the child nodes of the current node.
voidremoveRunAttr(int key)
          Reserved for internal use.
voidremoveSmartTags()→ inherited from Aspose.Words.CompositeNode
           Removes all SmartTag descendant nodes of the current node.
Aspose.Words.NodeListselectNodes(java.lang.String xpath)→ inherited from Aspose.Words.CompositeNode
           Selects a list of nodes matching the XPath expression.
Aspose.Words.NodeselectSingleNode(java.lang.String xpath)→ inherited from Aspose.Words.CompositeNode
           Selects the first Node that matches the XPath expression.
voidsetDeleteRevision(aspose.obfuscated.type value)
          Reserved for internal use.
voidsetInsertRevision(aspose.obfuscated.type value)
          Reserved for internal use.
voidsetMoveFromRevision(aspose.obfuscated.type value)
          Reserved for internal use.
voidsetMoveToRevision(aspose.obfuscated.type value)
          Reserved for internal use.
voidsetRunAttr(int fontAttr, java.lang.Object value)
          Reserved for internal use.
voidsetRunPr_IInline(aspose.obfuscated.type value)
          Reserved for internal use.
java.lang.StringtoString()
          
java.lang.StringtoString(SaveOptions saveOptions)→ inherited from Aspose.Words.Node
           Exports the content of the node into a string using the specified save options.
java.lang.StringtoTxt()→ inherited from Aspose.Words.Node
           Exports the content of the node into a string in plain text format.
 

Property Getters/Setters Detail

getChildNodes

→ inherited from Aspose.Words.CompositeNode
public Aspose.Words.NodeCollection getChildNodes()
Gets all immediate child nodes of this node.

Note, #Error Cref: P:Aspose.Words.CompositeNode.ChildNodes is equivalent to calling GetChildNodes(NodeType.Any, false) and creates and returns a new collection every time it is accessed.

If there are no child nodes, this property returns an empty collection.


getCount

→ inherited from Aspose.Words.CompositeNode
public int getCount()
Gets the number of immediate children of this node.

getDisplayType/setDisplayType

public int getDisplayType() / public void setDisplayType(int value)
Gets/sets Office Math display format type which represents whether an equation is displayed inline with the text or displayed on its own line. The value of the property is OfficeMathDisplayType integer constant.

Display format type has effect for top level Office Math only.

Returned display format type is always OfficeMathDisplayType.INLINE for nested Office Math.


getDocument

→ inherited from Aspose.Words.Node
public Aspose.Words.DocumentBase getDocument()
Gets the document to which this node belongs.

The node always belongs to a document even if it has just been created and not yet added to the tree, or if it has been removed from the tree.


getEquationXmlEncoding/setEquationXmlEncoding

public java.nio.charset.Charset getEquationXmlEncoding() / public void setEquationXmlEncoding(java.nio.charset.Charset value)
Gets/sets an encoding that was used to encode equation XML, if this office math object is read from equation XML. We use the encoding on saving a document to write in same encoding that it was read.

getFirstChild

→ inherited from Aspose.Words.CompositeNode
public Aspose.Words.Node getFirstChild()
Gets the first child of the node. If there is no first child node, a null is returned.

hasChildNodes

→ inherited from Aspose.Words.CompositeNode
public boolean hasChildNodes()
Returns true if this node has any child nodes.

isComposite

→ inherited from Aspose.Words.CompositeNode
public boolean isComposite()
Returns true as this node can have child nodes.

getJustification/setJustification

public int getJustification() / public void setJustification(int value)
Gets/sets Office Math justification. The value of the property is OfficeMathJustification integer constant.

Justification cannot be set to the Office Math with display format type OfficeMathDisplayType.INLINE.

Inline justification cannot be set to the Office Math with display format type OfficeMathDisplayType.DISPLAY.

Corresponding DisplayType has to be set before setting Office Math justification.


getLastChild

→ inherited from Aspose.Words.CompositeNode
public Aspose.Words.Node getLastChild()
Gets the last child of the node. If there is no last child node, a null is returned.

getMathObjectType

public int getMathObjectType()
Gets type MathObjectType of this Office Math object. The value of the property is MathObjectType integer constant.

getNextSibling

→ inherited from Aspose.Words.Node
public Aspose.Words.Node getNextSibling()
Gets the node immediately following this node. If there is no next node, a null is returned.

getNodeType

public Aspose.Words.NodeType getNodeType()
Returns NodeType.OfficeMath.

getParentNode

→ inherited from Aspose.Words.Node
public Aspose.Words.CompositeNode getParentNode()
Gets the immediate parent of this node.

If a node has just been created and not yet added to the tree, or if it has been removed from the tree, the parent is null.


getParentParagraph

public Aspose.Words.Paragraph getParentParagraph()
Retrieves the parent Aspose.Words.Paragraph of this node.

getPreviousSibling

→ inherited from Aspose.Words.Node
public Aspose.Words.Node getPreviousSibling()
Gets the node immediately preceding this node. If there is no preceding node, a null is returned.

getRange

→ inherited from Aspose.Words.Node
public Aspose.Words.Range getRange()
Returns a Range object that represents the portion of a document that is contained in this node.

Method Detail

clearRunAttrs

public void clearRunAttrs()
Reserved for internal use.

dd

→ inherited from Aspose.Words.CompositeNode
public void dd()

deepClone

→ inherited from Aspose.Words.Node
public Aspose.Words.Node deepClone(boolean isCloneChildren)
Creates a duplicate of the node.

This method serves as a copy constructor for nodes. The cloned node has no parent, but belongs to the same document as the original node.

This method always performs a deep copy of the node. The isCloneChildren parameter specifies whether to perform copy all child nodes as well.

Parameters:
isCloneChildren - True to recursively clone the subtree under the specified node; false to clone only the node itself.
Returns:
The cloned node.

fetchInheritedRunAttr

public java.lang.Object fetchInheritedRunAttr(int fontAttr)
Reserved for internal use.

getAncestor

→ inherited from Aspose.Words.Node
public Aspose.Words.CompositeNode getAncestor(java.lang.Class ancestorType)
Gets the first ancestor of the specified object type.

The ancestor type matches if it is equal to ancestorType or derived from ancestorType.

Parameters:
ancestorType - The object type of the ancestor to retrieve.
Returns:
The ancestor of the specified type or null if no ancestor of this type was found.

getContainer

→ inherited from Aspose.Words.CompositeNode
public Aspose.Words.CompositeNode getContainer()
Reserved for internal use.

getDeleteRevision

public aspose.obfuscated.type getDeleteRevision()
Reserved for internal use.

getDirectRunAttr

public java.lang.Object getDirectRunAttr(int fontAttr)
Reserved for internal use.

getDirectRunAttrsCount

public int getDirectRunAttrsCount()
Reserved for internal use.

getDocument_IInline

public Aspose.Words.DocumentBase getDocument_IInline()
Reserved for internal use.

getExpandedRunPr_IInline

public aspose.obfuscated.type getExpandedRunPr_IInline(aspose.obfuscated.type flags)
Reserved for internal use.

getInsertRevision

public aspose.obfuscated.type getInsertRevision()
Reserved for internal use.

getMathRenderer

public OfficeMathRenderer getMathRenderer()
                                  throws java.lang.Exception
Creates and returns an object that can be used to render this equation into an image.

This method just invokes the OfficeMathRenderer constructor and passes this object as a parameter.

Returns:
The renderer object for this equation.

getMoveFromRevision

public aspose.obfuscated.type getMoveFromRevision()
Reserved for internal use.

getMoveToRevision

public aspose.obfuscated.type getMoveToRevision()
Reserved for internal use.

getNextMatchingNode

→ inherited from Aspose.Words.CompositeNode
public Aspose.Words.Node getNextMatchingNode(aspose.obfuscated.type curNode)
Reserved for internal use.

getParentParagraph_IInline

public aspose.obfuscated.type getParentParagraph_IInline()
Reserved for internal use.

getRunPr_IInline

public aspose.obfuscated.type getRunPr_IInline()
Reserved for internal use.

getText

→ inherited from Aspose.Words.CompositeNode
public java.lang.String getText()
Gets the text of this node and of all its children.

The returned string includes all control and special characters as described in Aspose.Words.ControlChar.


iterator

→ inherited from Aspose.Words.CompositeNode
public java.util.Iterator iterator()
Provides support for the for each style iteration over the child nodes of this node.

remove

→ inherited from Aspose.Words.Node
public void remove()
Removes itself from the parent.

removeAllChildren

→ inherited from Aspose.Words.CompositeNode
public void removeAllChildren()
Removes all the child nodes of the current node.

removeRunAttr

public void removeRunAttr(int key)
Reserved for internal use.

removeSmartTags

→ inherited from Aspose.Words.CompositeNode
public void removeSmartTags()
Removes all SmartTag descendant nodes of the current node. This method does not remove the content of the smart tags.

selectNodes

→ inherited from Aspose.Words.CompositeNode
public Aspose.Words.NodeList selectNodes(java.lang.String xpath)
Selects a list of nodes matching the XPath expression.

Only expressions with element names are supported at the moment. Expressions that use attribute names are not supported.

Parameters:
xpath - The XPath expression.
Returns:
A list of nodes matching the XPath query.

selectSingleNode

→ inherited from Aspose.Words.CompositeNode
public Aspose.Words.Node selectSingleNode(java.lang.String xpath)
Selects the first Node that matches the XPath expression.

Only expressions with element names are supported at the moment. Expressions that use attribute names are not supported.

Parameters:
xpath - The XPath expression.
Returns:
The first Node that matches the XPath query or null if no matching node is found.

setDeleteRevision

public void setDeleteRevision(aspose.obfuscated.type value)
Reserved for internal use.

setInsertRevision

public void setInsertRevision(aspose.obfuscated.type value)
Reserved for internal use.

setMoveFromRevision

public void setMoveFromRevision(aspose.obfuscated.type value)
Reserved for internal use.

setMoveToRevision

public void setMoveToRevision(aspose.obfuscated.type value)
Reserved for internal use.

setRunAttr

public void setRunAttr(int fontAttr, java.lang.Object value)
Reserved for internal use.

setRunPr_IInline

public void setRunPr_IInline(aspose.obfuscated.type value)
Reserved for internal use.

toString

public java.lang.String toString()

toString

→ inherited from Aspose.Words.Node
public java.lang.String toString(SaveOptions saveOptions)
               throws java.lang.Exception
Exports the content of the node into a string using the specified save options.
Parameters:
saveOptions - Specifies the options that control how the node is saved.
Returns:
The content of the node in the specified format.

toTxt

→ inherited from Aspose.Words.Node
public java.lang.String toTxt()
            throws java.lang.Exception
Exports the content of the node into a string in plain text format.

This method removes field codes and Microsoft Word control characters, uses CrLf (or any other) combination of characters to mark ends of paragraphs in the resulting string. It produces a different result from #Error Cref: M:Aspose.Words.Node.GetText which just gets the text from the node without removing field codes or special characters.

Returns:
The content of the node in plain text format.
See Also:
TxtSaveOptions.ParagraphBreak, TxtSaveOptions.ExportHeadersFooters

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.