LibreOffice Module xmerge (master) 1
|
This is a parser to return a character array for difference purpose. More...
Public Member Functions | |
CharacterParser (Node node) | |
Standard constructor. More... | |
List< TextNodeEntry > | getNodeList () |
Returns the Node pointer with the given character position. 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 Node entry. More... | |
Private Attributes | |
final TextNodeIterator | textNodes |
int | currentPosition = 0 |
final List< TextNodeEntry > | nodeList_ |
char[] | charArray |
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 Node
under a given Node
(most likely to be a paragraph Node
).
Note: Once the XML Tree is parsed, then the Iterator
will be a snapshot of that tree. That means even the tree is modified later, then the cached paragraph Node
list will not be updated accordingly. For this reason and for performance reasons this Iterator
does not support any operation methods such as insert, remove or replace. The main purpose of this Iterator
is to be used with difference, not with merge.
Definition at line 43 of file CharacterParser.java.
|
inline |
Standard constructor.
node | The initial root Node . |
Definition at line 55 of file CharacterParser.java.
References org.openoffice.xmerge.merger.diff.CharacterParser.nodeList_, org.openoffice.xmerge.merger.diff.CharacterParser.parseNodes(), and org.openoffice.xmerge.merger.diff.CharacterParser.textNodes.
|
inlineprivate |
Adds a new Node
entry.
textLen | The text length. |
node | The Node . |
Definition at line 119 of file CharacterParser.java.
References org.openoffice.xmerge.merger.diff.CharacterParser.currentPosition, and org.openoffice.xmerge.merger.diff.CharacterParser.nodeList_.
Referenced by org.openoffice.xmerge.merger.diff.CharacterParser.parseNodes().
|
inline |
Returns the character array representation of the text.
Definition at line 77 of file CharacterParser.java.
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().
|
inline |
Returns the Node
pointer with the given character position.
Node
pointer with the given character position. Definition at line 67 of file CharacterParser.java.
References org.openoffice.xmerge.merger.diff.CharacterParser.nodeList_.
Referenced by org.openoffice.xmerge.merger.merge.CharacterBaseParagraphMerge.applyDifference().
|
inlineprivate |
Definition at line 81 of file CharacterParser.java.
References org.openoffice.xmerge.merger.diff.CharacterParser.addNewNodeEntry(), org.openoffice.xmerge.merger.diff.CharacterParser.charArray, org.openoffice.xmerge.merger.diff.NodeIterator.next(), org.openoffice.xmerge.merger.diff.NodeIterator.start(), String, org.openoffice.xmerge.converter.xml.OfficeConstants.TAG_SPACE, org.openoffice.xmerge.converter.xml.OfficeConstants.TAG_TAB_STOP, and org.openoffice.xmerge.merger.diff.CharacterParser.textNodes.
Referenced by org.openoffice.xmerge.merger.diff.CharacterParser.CharacterParser().
|
private |
Definition at line 48 of file CharacterParser.java.
Referenced by org.openoffice.xmerge.merger.diff.CharacterParser.getCharArray(), and org.openoffice.xmerge.merger.diff.CharacterParser.parseNodes().
|
private |
Definition at line 46 of file CharacterParser.java.
Referenced by org.openoffice.xmerge.merger.diff.CharacterParser.addNewNodeEntry().
|
private |
|
private |
Definition at line 45 of file CharacterParser.java.
Referenced by org.openoffice.xmerge.merger.diff.CharacterParser.CharacterParser(), and org.openoffice.xmerge.merger.diff.CharacterParser.parseNodes().