diff options
Diffstat (limited to 'part/commands_edit.cpp')
-rw-r--r-- | part/commands_edit.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/part/commands_edit.cpp b/part/commands_edit.cpp index ba298b0..d899479 100644 --- a/part/commands_edit.cpp +++ b/part/commands_edit.cpp @@ -22,7 +22,7 @@ /////////// Cutting element to clipboard ////////// ////////////////////////////////////////////////////////////////////////////////////////// -KXECutCommand::KXECutCommand(KXEDocument *pDocument, QDomNode &domNode) +KXECutCommand::KXECutCommand(KXEDocument *pDocument, TQDomNode &domNode) : KXEDeleteNodeCommand(pDocument, domNode) { } @@ -37,8 +37,8 @@ KXECutCommand::~KXECutCommand() KXEPasteToDocumentCommand::KXEPasteToDocumentCommand( KXEDocument *pDocument, - QDomDocument *pDomTargetDoc, - QDomElement &domSourceElement + TQDomDocument *pDomTargetDoc, + TQDomElement &domSourceElement ) : KXECommand(pDocument) { @@ -56,14 +56,14 @@ KXEPasteToDocumentCommand::~KXEPasteToDocumentCommand() void KXEPasteToDocumentCommand::execute() { // Insert root element - QDomNode newNode = m_pDomTargetDoc->importNode(m_domSourceElement, true); + TQDomNode newNode = m_pDomTargetDoc->importNode(m_domSourceElement, true); m_pDomTargetDoc->appendChild(newNode); m_pDocument->updateNodeCreated(newNode); } void KXEPasteToDocumentCommand::unexecute() { - QDomNode removedNode = m_pDomTargetDoc->removeChild( m_pDomTargetDoc->documentElement()); + TQDomNode removedNode = m_pDomTargetDoc->removeChild( m_pDomTargetDoc->documentElement()); if ( removedNode.isNull() ) kdError() << "KXEPasteToDocumentCommand::unexecute error removing node." << endl; @@ -79,8 +79,8 @@ void KXEPasteToDocumentCommand::unexecute() KXEPasteToElementCommand::KXEPasteToElementCommand( KXEDocument *pDocument, - QDomElement & domTargetElement, - QDomNode &domSourceNode + TQDomElement & domTargetElement, + TQDomNode &domSourceNode ) : KXECommand(pDocument) { @@ -117,8 +117,8 @@ void KXEPasteToElementCommand::unexecute() KXEPasteToProcInstrCommand::KXEPasteToProcInstrCommand( KXEDocument *pDocument, - QDomProcessingInstruction &domTargetProcInstr, - QDomProcessingInstruction &domSourceProcInstr + TQDomProcessingInstruction &domTargetProcInstr, + TQDomProcessingInstruction &domSourceProcInstr ) : KXECommand(pDocument) { @@ -158,8 +158,8 @@ void KXEPasteToProcInstrCommand::unexecute() KXEPasteToCharDataCommand::KXEPasteToCharDataCommand( KXEDocument *pDocument, - QDomCharacterData &domTargetCharData, - QDomCharacterData &domSourceCharData + TQDomCharacterData &domTargetCharData, + TQDomCharacterData &domSourceCharData ) : KXECommand(pDocument) { @@ -197,8 +197,8 @@ void KXEPasteToCharDataCommand::unexecute() KXEDragDropMoveCommand::KXEDragDropMoveCommand( KXEDocument *pDocument, - QDomElement & domTargetElement, - QDomNode &domSourceNode + TQDomElement & domTargetElement, + TQDomNode &domSourceNode ) : KXECommand(pDocument) { @@ -247,7 +247,7 @@ void KXEDragDropMoveCommand::unexecute() /////////// Deleting node ////////// ////////////////////////////////////////////////////////////////////////////////////////// -KXEDeleteNodeCommand::KXEDeleteNodeCommand(KXEDocument *pDocument, QDomNode &domNode) +KXEDeleteNodeCommand::KXEDeleteNodeCommand(KXEDocument *pDocument, TQDomNode &domNode) : KXECommand(pDocument) { m_domNode = domNode; @@ -288,8 +288,8 @@ void KXEDeleteNodeCommand::unexecute() KXEDeleteAttrCommand::KXEDeleteAttrCommand( KXEDocument *pDocument, - QDomElement &domOwnerElement, - QDomAttr &domAttr + TQDomElement &domOwnerElement, + TQDomAttr &domAttr ) : KXECommand(pDocument) { @@ -319,7 +319,7 @@ void KXEDeleteAttrCommand::unexecute() KXEDeleteAllAttribCommand::KXEDeleteAllAttribCommand( KXEDocument *pDocument, - QDomElement &domOwnerElement + TQDomElement &domOwnerElement ) : KXECommand(pDocument) { @@ -333,7 +333,7 @@ KXEDeleteAllAttribCommand::~KXEDeleteAllAttribCommand() void KXEDeleteAllAttribCommand::execute() { - QDomNamedNodeMap mapAttributes = m_domOwnerElement.attributes(); + TQDomNamedNodeMap mapAttributes = m_domOwnerElement.attributes(); uint nAttributes = mapAttributes.count(); if( nAttributes == 0 ) @@ -341,11 +341,11 @@ void KXEDeleteAllAttribCommand::execute() for( uint nRow = nAttributes; nRow > 0; nRow-- ) { - QDomNode node = mapAttributes.item(nRow-1); + TQDomNode node = mapAttributes.item(nRow-1); if ( node.isAttr() ) - { QDomAttr domAttr = node.toAttr(); + { TQDomAttr domAttr = node.toAttr(); - QDomAttr *pNodeCloned = new QDomAttr(domAttr.cloneNode(true).toAttr()); + TQDomAttr *pNodeCloned = new TQDomAttr(domAttr.cloneNode(true).toAttr()); m_listRemovedAttributes.append(pNodeCloned); m_domOwnerElement.removeAttributeNode(node.toAttr()); @@ -359,13 +359,13 @@ void KXEDeleteAllAttribCommand::execute() void KXEDeleteAllAttribCommand::unexecute() { - QDomNamedNodeMap mapAttributes = m_domOwnerElement.attributes(); + TQDomNamedNodeMap mapAttributes = m_domOwnerElement.attributes(); uint nAttributes = m_listRemovedAttributes.count(); if ( nAttributes == 0 ) return; - QDomAttr *pDomAttr; + TQDomAttr *pDomAttr; for ( pDomAttr = m_listRemovedAttributes.first(); pDomAttr; pDomAttr = m_listRemovedAttributes.next() ) { if(!pDomAttr->namespaceURI().isEmpty()) @@ -383,7 +383,7 @@ void KXEDeleteAllAttribCommand::unexecute() /////////// Moving node up ////////// ////////////////////////////////////////////////////////////////////////////////////////// -KXEUpCommand::KXEUpCommand(KXEDocument *pDocument, QDomNode &domNode) +KXEUpCommand::KXEUpCommand(KXEDocument *pDocument, TQDomNode &domNode) : KXECommand(pDocument) { m_domNode = domNode; @@ -399,14 +399,14 @@ KXEUpCommand::~KXEUpCommand() void KXEUpCommand::execute() { - QDomNode domPrevSibling = m_domNode.previousSibling(); + TQDomNode domPrevSibling = m_domNode.previousSibling(); if ( domPrevSibling.isNull() ) { kdError() << "KXEUpCommand::execute selected node doesn't seem to have a previous sibling." << endl; return; } - QDomNode domNode = m_domParentNode.removeChild( m_domNode ); + TQDomNode domNode = m_domParentNode.removeChild( m_domNode ); if ( domNode.isNull() ) kdError() << "KXEUpCommand::execute can't remove child node." << endl; else @@ -423,14 +423,14 @@ void KXEUpCommand::execute() void KXEUpCommand::unexecute() { - QDomNode domNextSibling = m_domNode.nextSibling(); + TQDomNode domNextSibling = m_domNode.nextSibling(); if ( domNextSibling.isNull() ) { kdError() << "KXEUpCommand::unexecute selected node doesn't seem to have a next sibling." << endl; return; } - QDomNode domNode = m_domParentNode.removeChild( m_domNode ); + TQDomNode domNode = m_domParentNode.removeChild( m_domNode ); if ( domNode.isNull() ) kdError() << "KXEUpCommand::unexecute can't remove child node." << endl; else @@ -449,7 +449,7 @@ void KXEUpCommand::unexecute() /////////// Moving node down ////////// ////////////////////////////////////////////////////////////////////////////////////////// -KXEDownCommand::KXEDownCommand(KXEDocument *pDocument, QDomNode &domNode) +KXEDownCommand::KXEDownCommand(KXEDocument *pDocument, TQDomNode &domNode) : KXECommand(pDocument) { m_domNode = domNode; @@ -465,14 +465,14 @@ KXEDownCommand::~KXEDownCommand() void KXEDownCommand::execute() { - QDomNode domNextSibling = m_domNode.nextSibling(); + TQDomNode domNextSibling = m_domNode.nextSibling(); if ( domNextSibling.isNull() ) { kdError() << "KXEDownCommand::execute selected node doesn't seem to have a next sibling." << endl; return; } - QDomNode domNode = m_domParentNode.removeChild( m_domNode ); + TQDomNode domNode = m_domParentNode.removeChild( m_domNode ); if ( domNode.isNull() ) kdError() << "KXEDownCommand::execute can't remove child node." << endl; else @@ -489,14 +489,14 @@ void KXEDownCommand::execute() void KXEDownCommand::unexecute() { - QDomNode domPrevSibling = m_domNode.previousSibling(); + TQDomNode domPrevSibling = m_domNode.previousSibling(); if ( domPrevSibling.isNull() ) { kdError() << "KXEDownCommand::unexecute selected node doesn't seem to have a previous sibling." << endl; return; } - QDomNode domNode = m_domParentNode.removeChild( m_domNode ); + TQDomNode domNode = m_domParentNode.removeChild( m_domNode ); if ( domNode.isNull() ) kdError() << "KXEDownCommand::unexecute can't remove child node." << endl; else @@ -517,8 +517,8 @@ void KXEDownCommand::unexecute() KXEEditCharDataCommand::KXEEditCharDataCommand( KXEDocument *pDocument, - QDomCharacterData &domCharacterData, - const QString strNewContents + TQDomCharacterData &domCharacterData, + const TQString strNewContents ) : KXECommand(pDocument) { @@ -549,8 +549,8 @@ void KXEEditCharDataCommand::unexecute() KXEEditProcInstrCommand::KXEEditProcInstrCommand( KXEDocument *pDocument, - QDomProcessingInstruction &domProcInstr, - const QString strNewData + TQDomProcessingInstruction &domProcInstr, + const TQString strNewData ) : KXECommand(pDocument) { @@ -581,9 +581,9 @@ void KXEEditProcInstrCommand::unexecute() KXEEditElementCommand::KXEEditElementCommand( KXEDocument *pDocument, - QDomElement &domElement, - const QString strNewPrefix, - const QString strNewName + TQDomElement &domElement, + const TQString strNewPrefix, + const TQString strNewName ) : KXECommand(pDocument) { @@ -627,8 +627,8 @@ void KXEEditElementCommand::unexecute() KXEEditAttrValueCommand::KXEEditAttrValueCommand( KXEDocument *pDocument, - const QDomAttr &domAttr, - const QString strNewValue + const TQDomAttr &domAttr, + const TQString strNewValue ) : KXECommand(pDocument) { @@ -662,8 +662,8 @@ void KXEEditAttrValueCommand::unexecute() KXEEditAttrNameCommand::KXEEditAttrNameCommand( KXEDocument *pDocument, - const QDomAttr &domOldAttr, - const QString strNewName + const TQDomAttr &domOldAttr, + const TQString strNewName ) : KXECommand(pDocument) { @@ -722,8 +722,8 @@ void KXEEditAttrNameCommand::unexecute() KXEEditRawXmlCommand::KXEEditRawXmlCommand( KXEDocument *pDocument, - QDomElement &domOldElement, - QDomElement &domNewElement + TQDomElement &domOldElement, + TQDomElement &domNewElement ) : KXECommand(pDocument) { |