LibreOffice Module xmerge (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
org.openoffice.xmerge.merger.diff.CharacterParser Class Reference

This is a parser to return a character array for difference purpose. More...

Collaboration diagram for org.openoffice.xmerge.merger.diff.CharacterParser:

Public Member Functions

 CharacterParser (Node node)
 Standard constructor. More...
List< TextNodeEntrygetNodeList ()
 Returns the. More...
char[] getCharArray ()
 Returns the character array representation of the text. More...

Private Member Functions

void parseNodes ()
void addNewNodeEntry (int textLen, Node node)
 Adds a new. More...

Private Attributes

final TextNodeIterator textNodes
int currentPosition = 0
final List< TextNodeEntrynodeList_
char[] charArray

Detailed Description

This is a parser to return a character array for difference purpose.

It will use depth first search to traverse all the characters inside the text

under a given

(most likely to be a paragraph


Note: Once the XML Tree is parsed, then the


will be a snapshot of that tree. That means even the tree is modified later, then the cached paragraph

list will not be updated accordingly. For this reason and for performance reasons this


does not support any operation methods such as insert, remove or replace. The main purpose of this


is to be used with difference, not with merge.

Definition at line 43 of file

Constructor & Destructor Documentation

org.openoffice.xmerge.merger.diff.CharacterParser.CharacterParser ( Node  node)

Standard constructor.

nodeThe initial root .

Definition at line 55 of file

References org.openoffice.xmerge.merger.diff.CharacterParser.parseNodes().

Member Function Documentation

void org.openoffice.xmerge.merger.diff.CharacterParser.addNewNodeEntry ( int  textLen,
Node  node 

Adds a new.


textLenThe text length.
nodeThe .

Definition at line 119 of file

Referenced by org.openoffice.xmerge.merger.diff.CharacterParser.parseNodes().

char [] org.openoffice.xmerge.merger.diff.CharacterParser.getCharArray ( )

Returns the character array representation of the text.

The character array representation of the text.

Definition at line 77 of file

References org.openoffice.xmerge.merger.diff.CharacterParser.charArray.

Referenced by org.openoffice.xmerge.merger.merge.CharacterBaseParagraphMerge.coreMerge(), and org.openoffice.xmerge.merger.merge.CharacterBaseParagraphMerge.merge().

List<TextNodeEntry> org.openoffice.xmerge.merger.diff.CharacterParser.getNodeList ( )

Returns the.

pointer with the given character position.

The pointer with the given character position.

Definition at line 67 of file

References org.openoffice.xmerge.merger.diff.CharacterParser.nodeList_.

Referenced by org.openoffice.xmerge.merger.merge.CharacterBaseParagraphMerge.applyDifference().

void org.openoffice.xmerge.merger.diff.CharacterParser.parseNodes ( )

Member Data Documentation

char [] org.openoffice.xmerge.merger.diff.CharacterParser.charArray
int org.openoffice.xmerge.merger.diff.CharacterParser.currentPosition = 0

Definition at line 46 of file

final List<TextNodeEntry> org.openoffice.xmerge.merger.diff.CharacterParser.nodeList_
final TextNodeIterator org.openoffice.xmerge.merger.diff.CharacterParser.textNodes

Definition at line 45 of file

The documentation for this class was generated from the following file: