Class Index | File Index

Classes


Class ops.OpMergeParagraph


Defined in: OpMergeParagraph.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Merges two adjacent paragraphs together into the first paragraph.
Method Summary
Method Attributes Method Name and Description
 
execute(document)
<inner>  
Returns true if the supplied node is an ODF grouping element with no content
<inner>  
getParagraphAtStep(odtDocument, steps, stepIterator)
Fetch the paragraph at the specified step.
 
init(data)
<inner>  
Returns true if the specified node is insignificant whitespace
<inner>  
mergeParagraphs(destination, source)
Merges the source paragraph into the destination paragraph.
<inner>  
Remove all the text nodes within the supplied range.
 
spec()
<inner>  
trimLeadingInsignificantWhitespace(stepIterator, paragraphElement)
Discard insignificant whitespace between the start of the paragraph node and the first step in the paragraph
<inner>  
trimTrailingInsignificantWhitespace(stepIterator, paragraphElement)
Discard insignificant whitespace between the last step in the paragraph and the end of the paragraph node
Class Detail
ops.OpMergeParagraph()
Merges two adjacent paragraphs together into the first paragraph. The destination paragraph is expected to always be the first paragraph in DOM order. No content (other than editinfo elements) are removed as part of this operation. Once all child nodes have been shifted from the source paragraph, the source paragraph and any collapsible parents will be cleaned up.
Method Detail
{!boolean} execute(document)
Parameters:
{!ops.Document} document
Returns:
{!boolean}

<inner> {!number} filterEmptyGroupingElementToRemove(element)
Returns true if the supplied node is an ODF grouping element with no content
Parameters:
{!Node} element
Returns:
{!number}

<inner> {!Element} getParagraphAtStep(odtDocument, steps, stepIterator)
Fetch the paragraph at the specified step. In addition, if a stepIterator is provided, set the step iterator position to the exact DOM point of the requested step.
Parameters:
{!ops.OdtDocument} odtDocument
{!number} steps
{!core.StepIterator=} stepIterator
Returns:
{!Element}

init(data)
Parameters:
{!ops.OpMergeParagraph.InitSpec} data

<inner> {!boolean} isInsignificantWhitespace(node)
Returns true if the specified node is insignificant whitespace
Parameters:
{!Node} node
Returns:
{!boolean}

<inner> {undefined} mergeParagraphs(destination, source)
Merges the source paragraph into the destination paragraph.
Parameters:
{!Element} destination
Paragraph to merge content into
{!Element} source
Paragraph to merge content from
Returns:
{undefined}

<inner> {undefined} removeTextNodes(range)
Remove all the text nodes within the supplied range. These are expected to be insignificant whitespace only. Assertions will be thrown if this is not the case.
Parameters:
{!Range} range
Returns:
{undefined}

{!ops.OpMergeParagraph.Spec} spec()
Returns:
{!ops.OpMergeParagraph.Spec}

<inner> {undefined} trimLeadingInsignificantWhitespace(stepIterator, paragraphElement)
Discard insignificant whitespace between the start of the paragraph node and the first step in the paragraph
Parameters:
{!core.StepIterator} stepIterator
{!Element} paragraphElement
Returns:
{undefined}

<inner> {undefined} trimTrailingInsignificantWhitespace(stepIterator, paragraphElement)
Discard insignificant whitespace between the last step in the paragraph and the end of the paragraph node
Parameters:
{!core.StepIterator} stepIterator
{!Element} paragraphElement
Returns:
{undefined}

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Aug 06 2015 04:10:42 GMT+0200 (MESZ)