summaryrefslogtreecommitdiffstats
path: root/quanta/parts/kafka/kafkacommon.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
commit6c79d50fa9fbdff7f69ca57a8ab5fcc942375593 (patch)
treef47737d56c3239a0d8bc600674f0ca04b6e30d6e /quanta/parts/kafka/kafkacommon.cpp
parent36c36b53a129509d56fdaa0a7c9fcbcacd0c5826 (diff)
downloadtdewebdev-6c79d50fa9fbdff7f69ca57a8ab5fcc942375593.tar.gz
tdewebdev-6c79d50fa9fbdff7f69ca57a8ab5fcc942375593.zip
rename the following methods:
tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/parts/kafka/kafkacommon.cpp')
-rw-r--r--quanta/parts/kafka/kafkacommon.cpp276
1 files changed, 138 insertions, 138 deletions
diff --git a/quanta/parts/kafka/kafkacommon.cpp b/quanta/parts/kafka/kafkacommon.cpp
index 8ed413f4..9d0c7cdf 100644
--- a/quanta/parts/kafka/kafkacommon.cpp
+++ b/quanta/parts/kafka/kafkacommon.cpp
@@ -52,9 +52,9 @@ Node *kafkaCommon::getNextNode(Node *node, bool &goUp, Node *endNode)
}
else
{
- if(node->tqparent == endNode)
+ if(node->parent == endNode)
return 0L;
- return getNextNode(node->tqparent, goUp);
+ return getNextNode(node->parent, goUp);
}
}
else
@@ -74,9 +74,9 @@ Node *kafkaCommon::getNextNode(Node *node, bool &goUp, Node *endNode)
else
{
goUp = true;
- if(node->tqparent == endNode)
+ if(node->parent == endNode)
return 0L;
- return getNextNode(node->tqparent, goUp);
+ return getNextNode(node->parent, goUp);
}
}
}
@@ -119,7 +119,7 @@ Node* kafkaCommon::getPrevNode(Node *node, Node *endNode)
}
else
{
- n = n->tqparent;
+ n = n->parent;
if(n == endNode)
return 0L;
}
@@ -171,13 +171,13 @@ Node* kafkaCommon::DTDGetCommonParent(Node* startNode, Node* endNode,
if(commonParent && (commonParent->tag->type == Tag::Text || commonParent->tag->type == Tag::Empty))
{
Node* oldCommonParent = commonParent;
- commonParent = commonParent->tqparent;
+ commonParent = commonParent->parent;
commonParentStartChild = oldCommonParent;
commonParentEndChild = oldCommonParent;
}
//startNode or endNode can't be the commonParent.
else if(commonParent && (itStart == startNodeLocation.end() || itEnd == endNodeLocation.end()))
- commonParent = commonParent->tqparent;
+ commonParent = commonParent->parent;
commonParentStartChildLocation = getLocation(commonParentStartChild);
commonParentEndChildLocation = getLocation(commonParentEndChild);
@@ -222,18 +222,18 @@ Node* kafkaCommon::DTDGetNonInlineCommonParent(Node* startNode, Node* endNode,
commonParent->tag->type == Tag::Text || commonParent->tag->type == Tag::Empty))
{
Node* oldCommonParent = commonParent;
- commonParent = commonParent->tqparent;
+ commonParent = commonParent->parent;
while(commonParent && isInline(commonParent->tag->name))
{
oldCommonParent = commonParent;
- commonParent = commonParent->tqparent;
+ commonParent = commonParent->parent;
}
commonParentStartChild = oldCommonParent;
commonParentEndChild = oldCommonParent;
}
//startNode or endNode can't be the commonParent.
else if(commonParent && (itStart == startNodeLocation.end() || itEnd == endNodeLocation.end()))
- commonParent = commonParent->tqparent;
+ commonParent = commonParent->parent;
commonParentStartChildLocation = getLocation(commonParentStartChild);
commonParentEndChildLocation = getLocation(commonParentEndChild);
@@ -365,7 +365,7 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
kdDebug(25001)<< "kafkaCommon::applyIndentation()" << endl;
#endif
- Node *tqparent, *nextNE, *prevNE, *realPrevNE, *realNextNE, *realPrev, *realNext, *prev, *next;
+ Node *parent, *nextNE, *prevNE, *realPrevNE, *realNextNE, *realPrev, *realNext, *prev, *next;
int nonInlineDepth = 0, nonInlineDepth2 = 0, i;
bool b = false;
TQString indentation1, indentation2, text;
@@ -383,10 +383,10 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
realNext = node->next;
if(inlineNodeIndentation &&
- !node->prev && getNodeDisplay(node->tqparent, true) == kafkaCommon::blockDisplay)
+ !node->prev && getNodeDisplay(node->parent, true) == kafkaCommon::blockDisplay)
{
AreaStruct node_area = node->tag->area();
- AreaStruct parent_area = node->tqparent->tag->area();
+ AreaStruct parent_area = node->parent->tag->area();
if(node_area.bLine == parent_area.bLine)
{
@@ -400,30 +400,30 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
setTagString(node, removeUnnecessaryWhitespaces(node->tag->tagStr()), modifs);
//compute the "non-inline depth" of the Node and of the next NE (not Empty) Node
- // i.e. we count how many non-inline tqparent they have.
- tqparent = node->tqparent;
- while(tqparent)
+ // i.e. we count how many non-inline parent they have.
+ parent = node->parent;
+ while(parent)
{
- if(getNodeDisplay(tqparent, true) == kafkaCommon::blockDisplay)
+ if(getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
++nonInlineDepth;
- tqparent = tqparent->tqparent;
+ parent = parent->parent;
}
//compute the "non-inline depth" of the next non-empty Node.
if (nextNE)
- tqparent = nextNE->tqparent;
+ parent = nextNE->parent;
else
- tqparent = 0L;
- while(tqparent)
+ parent = 0L;
+ while(parent)
{
- if(getNodeDisplay(tqparent, true) == kafkaCommon::blockDisplay)
+ if(getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
++nonInlineDepth2;
- tqparent = tqparent->tqparent;
+ parent = parent->parent;
}
- tqparent = node->tqparent;
+ parent = node->parent;
- if(!tqparent || getNodeDisplay(tqparent, true) == kafkaCommon::blockDisplay)
+ if(!parent || getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
{
//prepare the indentation
indentation1 = "\n";
@@ -507,7 +507,7 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
}
else
{
- //The tqparent is inline, so no indentation.
+ //The parent is inline, so no indentation.
//Nothing to do.
}
node->tag->setIndentationDone(true);
@@ -519,7 +519,7 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
kdDebug(25001)<< "kafkaCommon::fitIndentationNodes()" << endl;
#endif
- Node *tqparent, *child, *node, *emptyNode = 0L, *emptyNode2 = 0L;
+ Node *parent, *child, *node, *emptyNode = 0L, *emptyNode2 = 0L;
int nbEmptyNodes = 0, n1Depth, n2Depth;
bool lastChild = false, firstChild = false;
@@ -534,16 +534,16 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
if(n1Depth > n2Depth)
{
child = n1;
- tqparent = n2;
+ parent = n2;
}
else
{
child = n2;
- tqparent = n1;
+ parent = n1;
}
- if(child->tqparent->firstChildNE() == child)
+ if(child->parent->firstChildNE() == child)
firstChild = true;
- if(child->tqparent->lastChildNE() == child)
+ if(child->parent->lastChildNE() == child)
lastChild = true;
//counting the Empty Nodes and deleting them to have only one empty node.
@@ -591,11 +591,11 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
//adding/deleting a empty node if necessary
if(firstChild)
{
- if(getNodeDisplay(tqparent, true) == kafkaCommon::blockDisplay)
+ if(getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
{
if(child->tag->type != Tag::Text && !emptyNode)
{
- createAndInsertNode("", "", Tag::Empty, n2->tag->write(), child->tqparent,
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), child->parent,
child, child, modifs);
}
}
@@ -610,11 +610,11 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
if(lastChild)
{
- if(getNodeDisplay(tqparent, true) == kafkaCommon::blockDisplay)
+ if(getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
{
if(child->tag->type != Tag::Text && !emptyNode2)
{
- createAndInsertNode("", "", Tag::Empty, n2->tag->write(), child->tqparent,
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), child->parent,
0L, 0L, modifs);
}
}
@@ -654,8 +654,8 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
}
//adding/deleting a empty node if necessary
- tqparent = n1->tqparent;
- if(!tqparent || getNodeDisplay(tqparent, true) == kafkaCommon::blockDisplay)
+ parent = n1->parent;
+ if(!parent || getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
{
if(getNodeDisplay(n1, true) == kafkaCommon::blockDisplay &&
n1->tag->type != Tag::Text)
@@ -672,7 +672,7 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
}
else
{
- createAndInsertNode("", "", Tag::Empty, n2->tag->write(), tqparent, n2, n2, modifs);
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), parent, n2, n2, modifs);
}
}
}
@@ -694,7 +694,7 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
}
else
{
- createAndInsertNode("", "", Tag::Empty, n2->tag->write(), tqparent, n2, n2, modifs);
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), parent, n2, n2, modifs);
}
}
}
@@ -1028,7 +1028,7 @@ Node* kafkaCommon::insertNode(Node *node, Node* parentNode, Node* nextSibling,
nodeIsFirstChild = true;
parentNode->child = node;
}
- node->tqparent = parentNode;
+ node->parent = parentNode;
if(nextSibling && nextSibling->prev)
{
@@ -1129,7 +1129,7 @@ Node* kafkaCommon::insertNode(Node *node, Node* parentNode, Node* nextSibling, N
nodeIsFirstChild = true;
parentNode->child = node;
}
- node->tqparent = parentNode;
+ node->parent = parentNode;
if(nextSibling && nextSibling->prev)
{
@@ -1186,7 +1186,7 @@ Node* kafkaCommon::insertNode(Node *node, Node* parentNode, Node* nextSibling, N
return node;
}
-Node *kafkaCommon::insertNode(Node *newNode, Node *tqparent, Node *nextSibling, Node *nextEndSibling,
+Node *kafkaCommon::insertNode(Node *newNode, Node *parent, Node *nextSibling, Node *nextEndSibling,
NodeModifsSet *modifs, bool merge)
{
#ifdef LIGHT_DEBUG
@@ -1199,7 +1199,7 @@ Node *kafkaCommon::insertNode(Node *newNode, Node *tqparent, Node *nextSibling,
return 0L;
//place the new Node.
- newNode = insertNode(newNode, tqparent, nextSibling, modifs, merge);
+ newNode = insertNode(newNode, parent, nextSibling, modifs, merge);
if(!newNode->tag->single && newNode->tag->type == Tag::XmlTag)
{
@@ -1208,7 +1208,7 @@ Node *kafkaCommon::insertNode(Node *newNode, Node *tqparent, Node *nextSibling,
nodeEnd->closesPrevious = true;
//place the new closing Node.
- nodeEnd = insertNode(nodeEnd, tqparent, nextEndSibling, modifs, merge);
+ nodeEnd = insertNode(nodeEnd, parent, nextEndSibling, modifs, merge);
}
//If nextSibling != nextEndSibling, move all Nodes between node and nodeEnd as child of node
@@ -1222,7 +1222,7 @@ Node *kafkaCommon::insertNode(Node *newNode, Node *tqparent, Node *nextSibling,
return newNode;
}
-Node* kafkaCommon::insertNode(Node *newNode, Node *tqparent, Node *startNodeToSurround,
+Node* kafkaCommon::insertNode(Node *newNode, Node *parent, Node *startNodeToSurround,
Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs)
{
#ifdef LIGHT_DEBUG
@@ -1246,7 +1246,7 @@ Node* kafkaCommon::insertNode(Node *newNode, Node *tqparent, Node *startNodeToSu
endNodeToSurround = endNodeToSurround->next;
//Then create and insert the new Node.
- return insertNode(newNode, tqparent, startNodeToSurround,
+ return insertNode(newNode, parent, startNodeToSurround,
endNodeToSurround, modifs);
}
@@ -1389,13 +1389,13 @@ Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selecti
{
*cursorNode = newNode;
cursorOffset = newNode->tag->tagStr().length();
- return insertNodeSubtree(newNode, startNode->tqparent, endNode, modifs);
+ return insertNodeSubtree(newNode, startNode->parent, endNode, modifs);
}
//Then we "split" the lastValidStartParent - startNode subtree into two : the first part is untouched
// and the second will be surrounded by the new Node. Same thing for endNode.
Node* node = startNode;
- Node* parentNode = startNode->tqparent;
+ Node* parentNode = startNode->parent;
Node* newParentNode = 0, *child = 0, *next = 0;
while(parentNode && commonParent && parentNode != commonParent)
{
@@ -1433,13 +1433,13 @@ Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selecti
}
//commonParentStartChild = parentNode;
node = parentNode;
- parentNode = parentNode->tqparent;
+ parentNode = parentNode->parent;
}
if(endNode)
{
node = endNode;
- parentNode = endNode->tqparent;
+ parentNode = endNode->parent;
while(parentNode && commonParent && parentNode != commonParent)
{
if(true/*node != parentNode->firstChild()*/)
@@ -1464,7 +1464,7 @@ Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selecti
commonParentStartChild = newParentNode;
node = parentNode;
Node* aux = parentNode;
- parentNode = parentNode->tqparent;
+ parentNode = parentNode->parent;
// Remove node subtree if empty
if(!aux->hasChildNodes())
extractAndDeleteNode(aux, modifs);
@@ -1527,8 +1527,8 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
return false;
}
- //Then search for the common tqparent of startNode and endNode (commonParent)
- //and for the childs of commonParent which are tqparent of startNode and endNode
+ //Then search for the common parent of startNode and endNode (commonParent)
+ //and for the childs of commonParent which are parent of startNode and endNode
//(commonParentStartChild && commonParentEndChild)
//CommonParent will be the limit (startNode -- commonNode) where Nodes can
//be splitted in order to insert the newNode.
@@ -1559,25 +1559,25 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
commonParent->tag->type == Tag::Text || commonParent->tag->type == Tag::Empty))
{
oldCommonParent = commonParent;
- commonParent = commonParent->tqparent;
+ commonParent = commonParent->parent;
while(commonParent && isInline(commonParent->tag->name))
{
oldCommonParent = commonParent;
- commonParent = commonParent->tqparent;
+ commonParent = commonParent->parent;
}
commonParentStartChild = oldCommonParent;
commonParentEndChild = oldCommonParent;
}
//startNode or endNode can't be the commonParent.
else if(commonParent && (itStart == startNodeLocation.end() || itEnd == endNodeLocation.end()))
- commonParent = commonParent->tqparent;
+ commonParent = commonParent->parent;
- //Now look if at least one of the tqparent Nodes between startNode and commonParent
+ //Now look if at least one of the parent Nodes between startNode and commonParent
//can have nodeName as child. If so for startNode and endNode, let's find the last
- //tqparent Nodes which can have nodeName as child.
- parentNode = startNode->tqparent;
+ //parent Nodes which can have nodeName as child.
+ parentNode = startNode->parent;
oldParentNode = startNode;
- while(parentNode && commonParent && parentNode != commonParent->tqparent)
+ while(parentNode && commonParent && parentNode != commonParent->parent)
{
parentNodeTQTag = QuantaCommon::tagFromDTD(parentNode);
if(parentNodeTQTag && parentNodeTQTag->isChild(newNode) &&
@@ -1588,11 +1588,11 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
//else if(!newNodeIsInline && isInline(parentNode)), we continue : BLOCK element can
//cut some inline tag in order to be inserted.
oldParentNode = parentNode;
- parentNode = parentNode->tqparent;
+ parentNode = parentNode->parent;
}
- parentNode = endNode->tqparent;
+ parentNode = endNode->parent;
oldParentNode = endNode;
- while(parentNode && commonParent && parentNode != commonParent->tqparent)
+ while(parentNode && commonParent && parentNode != commonParent->parent)
{
parentNodeTQTag = QuantaCommon::tagFromDTD(parentNode);
if(parentNodeTQTag && parentNodeTQTag->isChild(newNode) &&
@@ -1603,7 +1603,7 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
//else if(!newNodeIsInline && isInline(parentNode)), we continue : BLOCK element can
//cut some inline tag in order to be inserted.
oldParentNode = parentNode;
- parentNode = parentNode->tqparent;
+ parentNode = parentNode->parent;
}
/**if(!lastValidEndParent || !lastValidStartParent)
@@ -1662,7 +1662,7 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
node = startNode;
if (!startNode) //Andras: it can happen.
return false;
- parentNode = startNode->tqparent;
+ parentNode = startNode->parent;
while(lastValidStartParent && parentNode && parentNode != lastValidStartParent)
{
if(node != parentNode->firstChild())
@@ -1683,10 +1683,10 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
}
}
node = parentNode;
- parentNode = parentNode->tqparent;
+ parentNode = parentNode->parent;
}
node = endNode;
- parentNode = endNode->tqparent;
+ parentNode = endNode->parent;
while(lastValidEndParent && parentNode && parentNode != lastValidEndParent)
{
if(node != parentNode->lastChild())
@@ -1717,7 +1717,7 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
}
}
node = parentNode;
- parentNode = parentNode->tqparent;
+ parentNode = parentNode->parent;
}
//Now if startNode is after endNode, this means that a selectionless insertion is being done.
@@ -1732,7 +1732,7 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
else if((signed)startNode->tag->tagStr().length() == startOffset && startNode->tag->type == Tag::XmlTag)
parentNodeTQTag = QuantaCommon::tagFromDTD(startNode);
else if((signed)startNode->tag->tagStr().length() == startOffset && startNode->tag->type == Tag::XmlTagEnd)
- parentNodeTQTag = QuantaCommon::tagFromDTD(startNode->tqparent);
+ parentNodeTQTag = QuantaCommon::tagFromDTD(startNode->parent);
if(!parentNodeTQTag || (parentNodeTQTag && parentNodeTQTag->isChild(newNode)))
{
if(isAfter)
@@ -1740,7 +1740,7 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
else if((signed)startNode->tag->tagStr().length() == startOffset && startNode->tag->type == Tag::XmlTag)
insertNodeSubtree(newNode, startNode, 0L, modifs);
else if((signed)startNode->tag->tagStr().length() == startOffset && startNode->tag->type == Tag::XmlTagEnd)
- insertNodeSubtree(newNode, startNode->tqparent, startNode->next, modifs);
+ insertNodeSubtree(newNode, startNode->parent, startNode->next, modifs);
//<TEMPORARY>
(*cursorNode) = lastNewNode;
cursorOffset = 0;
@@ -1798,7 +1798,7 @@ bool kafkaCommon::DTDinsertRemoveNode(Node *newNode, Node *startNode, int startO
}
Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
- int nodeType, Document *doc, Node* tqparent, Node* nextSibling, NodeModifsSet *modifs,
+ int nodeType, Document *doc, Node* parent, Node* nextSibling, NodeModifsSet *modifs,
bool merge)
{
#ifdef LIGHT_DEBUG
@@ -1812,13 +1812,13 @@ Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString
node = createNode(nodeName, tagString, nodeType, doc);
//insert the new Node.
- insertNode(node, tqparent, nextSibling, modifs, merge);
+ insertNode(node, parent, nextSibling, modifs, merge);
return node;
}
Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
- int nodeType, Document *doc, Node *tqparent, Node *nextSibling, Node *nextEndSibling,
+ int nodeType, Document *doc, Node *parent, Node *nextSibling, Node *nextEndSibling,
NodeModifsSet *modifs)
{
#ifdef LIGHT_DEBUG
@@ -1832,13 +1832,13 @@ Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString
node = createNode(nodeName, tagString, nodeType, doc);
//insert the new Node.
- insertNode(node, tqparent, nextSibling, nextEndSibling, modifs);
+ insertNode(node, parent, nextSibling, nextEndSibling, modifs);
return node;
}
Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
- int nodeType, Document *doc, Node *tqparent, Node *startNodeToSurround,
+ int nodeType, Document *doc, Node *parent, Node *startNodeToSurround,
Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs)
{
#ifdef LIGHT_DEBUG
@@ -1855,7 +1855,7 @@ Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString
node = createNode(nodeName, tagString, nodeType, doc);
//insert the new Node.
- insertNode(node, tqparent, startNodeToSurround, endNodeToSurround, startOffset, endOffset,
+ insertNode(node, parent, startNodeToSurround, endNodeToSurround, startOffset, endOffset,
modifs);
return node;
@@ -1899,9 +1899,9 @@ bool kafkaCommon::addNodeRecursively(Node *newNode, Node *leafNode,
if(!leafNodeTQTag)
return false;
- if(currentNode && currentNode->tqparent)
+ if(currentNode && currentNode->parent)
{
- currentNodeParentTQTag = QuantaCommon::tagFromDTD(currentNode->tqparent);
+ currentNodeParentTQTag = QuantaCommon::tagFromDTD(currentNode->parent);
if(currentNodeParentTQTag && currentNodeParentTQTag->isChild(newNode))
validCurNodeParent = true;
}
@@ -2184,7 +2184,7 @@ Node *kafkaCommon::duplicateNodeSubtree(Node *node, bool childAndClosingTagOnly)
newPrev = 0L;
for(link = nodeLinkList.first(); link; link = nodeLinkList.next())
{
- if(link->m_n1 == currentNode->tqparent)
+ if(link->m_n1 == currentNode->parent)
newParent = link->m_n2;
else if(link->m_n1 == currentNode->next)
newNext = link->m_n2;
@@ -2217,7 +2217,7 @@ Node* kafkaCommon::extractNode(Node *node, NodeModifsSet *modifs, bool extractCh
{
NodeModif *modif = 0, *modifChild;
Node *lastChild, *curNode;
- Node *tqparent, *next, *child, *n;
+ Node *parent, *next, *child, *n;
//Node *prev;
bool isSingle;
int type;
@@ -2231,7 +2231,7 @@ Node* kafkaCommon::extractNode(Node *node, NodeModifsSet *modifs, bool extractCh
if(!node->child)
extractChildren = true;
- tqparent = node->tqparent;
+ parent = node->parent;
next = node->next;
//prev = node->prev; //Should this be used at all?
child = node->child;
@@ -2284,18 +2284,18 @@ Node* kafkaCommon::extractNode(Node *node, NodeModifsSet *modifs, bool extractCh
curNode = node->child;
while(curNode)
{
- curNode->tqparent = node->tqparent;
+ curNode->parent = node->parent;
curNode = curNode->next;
}
}
- if(node->tqparent && node->tqparent->child == node)
+ if(node->parent && node->parent->child == node)
{
if(extractChildren)
- node->tqparent->child = node->next;
+ node->parent->child = node->next;
else
- node->tqparent->child = node->child;
+ node->parent->child = node->child;
}
- node->tqparent = 0L;
+ node->parent = 0L;
if(node->prev)
{
if(extractChildren)
@@ -2671,7 +2671,7 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
if(startNode == endNode && startOffset == endOffset)
return kafkaCommon::extractionBadParameters;
- //Then, process startNode and endNode : look if a nodeName tqparent is one of
+ //Then, process startNode and endNode : look if a nodeName parent is one of
//startNode/endNode's inline parents and if it is the case, split the necessary Nodes.
//The comparaison is made in lowercase, even in xml : it could be strange, for an user, to have
//its nodes not removed because there are in the wrong case.
@@ -2681,7 +2681,7 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
{
if(node->tag->name.lower() == nodeName.lower())
lastNodeNameStartNode = node;
- node = node->tqparent;
+ node = node->parent;
}
node = endNode;
lastNodeNameEndNode = 0L;
@@ -2689,7 +2689,7 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
{
if(node->tag->name.lower() == nodeName.lower())
lastNodeNameEndNode = node;
- node = node->tqparent;
+ node = node->parent;
}
if(startNode->tag->type == Tag::Text)
@@ -2724,8 +2724,8 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
if(lastNodeNameStartNode)
{
node = startNode;
- parentNode = startNode->tqparent;
- while(parentNode && parentNode != lastNodeNameStartNode->tqparent)
+ parentNode = startNode->parent;
+ while(parentNode && parentNode != lastNodeNameStartNode->parent)
{
if(node != parentNode->firstChild())
{
@@ -2740,14 +2740,14 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
}
}
node = parentNode;
- parentNode = parentNode->tqparent;
+ parentNode = parentNode->parent;
}
}
if(lastNodeNameEndNode)
{
node = endNode;
- parentNode = endNode->tqparent;
- while(parentNode && parentNode != lastNodeNameEndNode->tqparent)
+ parentNode = endNode->parent;
+ while(parentNode && parentNode != lastNodeNameEndNode->parent)
{
if(node != parentNode->SLastChild())
{
@@ -2770,7 +2770,7 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
}
}
node = parentNode;
- parentNode = parentNode->tqparent;
+ parentNode = parentNode->parent;
}
}
@@ -2782,7 +2782,7 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
next = getNextNode(node, goUp);
if(node->tag->type == Tag::XmlTag && node->tag->name.lower() == nodeName.lower())
{
- parentTQTag = QuantaCommon::tagFromDTD(node->tqparent);
+ parentTQTag = QuantaCommon::tagFromDTD(node->parent);
if(parentTQTag)
{
child = node->firstChild();
@@ -2927,10 +2927,10 @@ bool kafkaCommon::splitNode(Node *n, int offset, NodeModifsSet *modifs)
if(n->tag->type == Tag::Text)
node = createAndInsertNode("#text", tagStr.right(tagStr.length() - offset), Tag::Text, n->tag->write(),
- n->tqparent, n->next, modifs, false);
+ n->parent, n->next, modifs, false);
else
node = createAndInsertNode("", tagStr.right(tagStr.length() - offset), Tag::Empty, n->tag->write(),
- n->tqparent, n->next, modifs, false);
+ n->parent, n->next, modifs, false);
//Node's string is a part of n's clean string
node->tag->setCleanStrBuilt(true);
@@ -2944,7 +2944,7 @@ void kafkaCommon::splitStartNodeSubtree(Node* startNode, Node* commonParent,
//Then we "split" the lastValidStartParent - startNode subtree into two : the first part is untouched
// and the second will be surrounded by the new Node. Same thing for endNode.
Node* node = startNode;
- Node* parentNode = startNode->tqparent;
+ Node* parentNode = startNode->parent;
Node* commonParentStartChild = 0;
while(parentNode && commonParent && parentNode != commonParent)
{
@@ -2962,7 +2962,7 @@ void kafkaCommon::splitStartNodeSubtree(Node* startNode, Node* commonParent,
}
commonParentStartChild = parentNode;
node = parentNode;
- parentNode = parentNode->tqparent;
+ parentNode = parentNode->parent;
}
if(commonParentStartChild)
@@ -2975,7 +2975,7 @@ void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent,
bool subTree, NodeModifsSet* modifs)
{
Node* node = endNode;
- Node* parentNode = endNode->tqparent;
+ Node* parentNode = endNode->parent;
Node* aux = 0;
if(subTree)
@@ -3009,7 +3009,7 @@ void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent,
}
}
node = parentNode;
- parentNode = parentNode->tqparent;
+ parentNode = parentNode->parent;
}
commonParentStartChildLocation = getLocation(commonParentStartChild);
commonParentEndChildLocation = getLocation(commonParentEndChild);
@@ -3029,11 +3029,11 @@ void kafkaCommon::splitStartAndEndNodeSubtree(Node*& startNode, int startOffset,
startNode = getCorrectStartNode(startNode, startOffset);
endNode = getCorrectEndNode(endNode, endOffset);
- // look for common tqparent
+ // look for common parent
if(!commonParent)
{
if(extractInlineParentNodes)
- // get the non inline common tqparent
+ // get the non inline common parent
commonParent =
DTDGetNonInlineCommonParent(startNode, endNode, commonParentStartChildLocation, commonParentEndChildLocation, subTree);
else
@@ -3075,7 +3075,7 @@ void kafkaCommon::splitStartAndEndNodeSubtree(Node*& startNode, int startOffset,
}
splitNode(endNode, endOffset, modifs);
- // split start and end nodes subtree in function of common tqparent
+ // split start and end nodes subtree in function of common parent
commonParentStartChildLocation = kafkaCommon::getLocation(commonParentStartChild);
splitStartNodeSubtree(startNode, commonParent, commonParentStartChildLocation, modifs);
@@ -3208,21 +3208,21 @@ bool kafkaCommon::mergeNodes(Node *n, Node *n2, NodeSelection& cursorHolder, Nod
void kafkaCommon::mergeInlineNode(Node *startNode, Node *endNode, Node **cursorNode,
long &cursorOffset, NodeModifsSet *modifs)
{
- Node *startNodeLastInlineParent, *tqparent, *node, *next;
+ Node *startNodeLastInlineParent, *parent, *node, *next;
bool goUp, success, isCursorNode, isEndNode;
int nodeLength;
if(!startNode || !endNode)
return;
- //first search for the last inline tqparent of startNode, and then its last prev neighbour
+ //first search for the last inline parent of startNode, and then its last prev neighbour
// which is also inline : the merge will start from this Node.
startNodeLastInlineParent = startNode;
- tqparent = startNode->tqparent;
- while(tqparent && isInline(tqparent->tag->name))
+ parent = startNode->parent;
+ while(parent && isInline(parent->tag->name))
{
- startNodeLastInlineParent = tqparent;
- tqparent = tqparent->tqparent;
+ startNodeLastInlineParent = parent;
+ parent = parent->parent;
}
if(startNodeLastInlineParent->prev)
{
@@ -3420,7 +3420,7 @@ TQValueList<int> kafkaCommon::getLocation(Node * node)
node = node->prev;
}
loc.prepend(i);
- node = node->tqparent;
+ node = node->parent;
}
return loc;
}
@@ -3634,11 +3634,11 @@ int kafkaCommon::nodeDepth(Node *node)
if(!node)
return -1;
- node = node->tqparent;
+ node = node->parent;
while(node)
{
depth++;
- node = node->tqparent;
+ node = node->parent;
}
return depth;
@@ -3646,12 +3646,12 @@ int kafkaCommon::nodeDepth(Node *node)
Node* kafkaCommon::hasParent(Node *node, const TQString &name)
{
- node = node->tqparent;
+ node = node->parent;
while(node)
{
if(node->tag->name.lower() == name.lower())
return node;
- node = node->tqparent;
+ node = node->parent;
}
return 0L;
@@ -3673,31 +3673,31 @@ Node* kafkaCommon::hasParent(Node* startNode, Node* endNode, const TQString &nam
{
if(node->tag->name.lower() == name.lower())
return node;
- node = node->tqparent;
+ node = node->parent;
}
return 0;
}
-bool kafkaCommon::insertDomNode(DOM::Node node, DOM::Node tqparent, DOM::Node nextSibling,
+bool kafkaCommon::insertDomNode(DOM::Node node, DOM::Node parent, DOM::Node nextSibling,
DOM::Node rootNode)
{
if(node.isNull())
return false;
- if(tqparent.isNull())
+ if(parent.isNull())
{
if(rootNode.isNull())
return false;
- tqparent = rootNode;
+ parent = rootNode;
}
//Andras: avoid exceptions
- if (!nextSibling.isNull() && nextSibling.parentNode() != tqparent)
+ if (!nextSibling.isNull() && nextSibling.parentNode() != parent)
{
kdDebug(25001)<< "kafkaCommon::insertDomNode() - invalid nextSibling!" << endl;
return false;
}
- if (node.ownerDocument() != tqparent.ownerDocument())
+ if (node.ownerDocument() != parent.ownerDocument())
{
kdDebug(25001)<< "kafkaCommon::insertDomNode() - ownerDocument is different!" << endl;
return false;
@@ -3705,7 +3705,7 @@ bool kafkaCommon::insertDomNode(DOM::Node node, DOM::Node tqparent, DOM::Node ne
try
{
- tqparent.insertBefore(node, nextSibling);
+ parent.insertBefore(node, nextSibling);
}
catch(DOM::DOMException e)
{
@@ -3716,12 +3716,12 @@ bool kafkaCommon::insertDomNode(DOM::Node node, DOM::Node tqparent, DOM::Node ne
bool kafkaCommon::removeDomNode(DOM::Node node)
{
- DOM::Node tqparent = node.parentNode();
+ DOM::Node parent = node.parentNode();
- if(tqparent.isNull())
+ if(parent.isNull())
return false;
- tqparent.removeChild(node);
+ parent.removeChild(node);
return true;
}
@@ -3908,16 +3908,16 @@ bool kafkaCommon::isInline(DOM::Node domNode)
return isInline(domNode.nodeName().string());
}
-bool kafkaCommon::parentSupports(DOM::Node tqparent, DOM::Node startNode, DOM::Node endNode,
+bool kafkaCommon::parentSupports(DOM::Node parent, DOM::Node startNode, DOM::Node endNode,
const DTDStruct* dtd)
{
TQTag *parentTQTag;
DOM::Node child;
- if(!dtd || tqparent.isNull())
+ if(!dtd || parent.isNull())
return false;
- parentTQTag = QuantaCommon::tagFromDTD(dtd, tqparent.nodeName().string());
+ parentTQTag = QuantaCommon::tagFromDTD(dtd, parent.nodeName().string());
if(!parentTQTag)
return false;
@@ -3984,7 +3984,7 @@ void kafkaCommon::coutDomTree(DOM::Node, int)
kdDebug(25001) << output <<" (" << node.nodeType() << ") "<<
node.handle() << endl;
kdDebug(25001)<< dots << " +++ prev " << node.previousSibling().handle() << " next " <<
- node.nextSibling().handle() << " tqparent " <<
+ node.nextSibling().handle() << " parent " <<
node.parentNode().handle() << " child " << node.firstChild().handle() << endl;
for(j = 0; j < (int)node.attributes().length(); ++j)
{
@@ -4026,8 +4026,8 @@ void kafkaCommon::coutTree(Node *node, int indent)
kdDebug(25001) << output <<" (" << node->tag->type << ", " << node->tag->cleanStrBuilt() << ", " <<
node->tag->indentationDone() << ") "<< node << " at pos " << bLine << ":" << bCol << " - " <<
eLine << ":" << eCol << endl;
- kdDebug(25001)<< dots << " +++ prev " << node->prev << " next " << node->next << " tqparent " <<
- node->tqparent << " child " << node->child << endl;
+ kdDebug(25001)<< dots << " +++ prev " << node->prev << " next " << node->next << " parent " <<
+ node->parent << " child " << node->child << endl;
for(j = 0; j < node->tag->attrCount(); ++j)
{
kdDebug(25001)<< dots << " *** attr" << j << " " <<
@@ -4069,13 +4069,13 @@ int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& t
tag_start = hasParent(start_node, tag_name);
if(tag_start)
- return 0; // only start_node has tag_name as tqparent
+ return 0; // only start_node has tag_name as parent
tag_start = hasParent(end_node, tag_name);
if(tag_start)
- return 0; // only end_node has tag_name as tqparent
+ return 0; // only end_node has tag_name as parent
- return -1; // neither the nodes have tag_name as tqparent
+ return -1; // neither the nodes have tag_name as parent
}
int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name,
@@ -4092,13 +4092,13 @@ int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& t
tag_start = hasParent(start_node, tag_name);
if(tag_start && tag_start->tag->hasAttribute(attribute_name) && tag_start->tag->attributeValue(attribute_name, true) == attribute_value)
- return 0; // only start_node has tag_name as tqparent
+ return 0; // only start_node has tag_name as parent
tag_start = hasParent(end_node, tag_name);
if(tag_start && tag_start->tag->hasAttribute(attribute_name) && tag_start->tag->attributeValue(attribute_name, true) == attribute_value)
- return 0; // only end_node has tag_name as tqparent
+ return 0; // only end_node has tag_name as parent
- return -1; // neither the nodes have tag_name as tqparent
+ return -1; // neither the nodes have tag_name as parent
}
bool kafkaCommon::isBetweenWords(Node* node, int offset)