diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kformula/numberelement.cc | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kformula/numberelement.cc')
-rw-r--r-- | lib/kformula/numberelement.cc | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/kformula/numberelement.cc b/lib/kformula/numberelement.cc index 41ddc179..4532d259 100644 --- a/lib/kformula/numberelement.cc +++ b/lib/kformula/numberelement.cc @@ -31,13 +31,13 @@ KFORMULA_NAMESPACE_BEGIN -NumberElement::NumberElement( BasicElement* parent ) : TokenElement( parent ) {} +NumberElement::NumberElement( BasicElement* tqparent ) : TokenElement( tqparent ) {} /* * Token elements' content has to be of homogeneous type. Every token element * must (TODO: check this) appear inside a non-token sequence, and thus, if * the command asks for a different content, a new element has to be created in - * parent sequence. + * tqparent sequence. */ KCommand* NumberElement::buildCommand( Container* container, Request* request ) { @@ -56,21 +56,21 @@ KCommand* NumberElement::buildCommand( Container* container, Request* request ) } if ( countChildren() == 0 || cursor->getPos() == countChildren() ) { - // We are in the last position, so it's easy, call the parent to + // We are in the last position, so it's easy, call the tqparent to // create a new child - SequenceElement* parent = static_cast<SequenceElement*>( getParent() ); - if ( parent ) { - uint pos = parent->childPos( this ); - cursor->setTo( parent, pos + 1); - return parent->buildCommand( container, request ); + SequenceElement* tqparent = static_cast<SequenceElement*>( getParent() ); + if ( tqparent ) { + uint pos = tqparent->childPos( this ); + cursor->setTo( tqparent, pos + 1); + return tqparent->buildCommand( container, request ); } } if ( cursor->getPos() == 0 ) { - SequenceElement* parent = static_cast<SequenceElement*>( getParent() ); - if ( parent ) { - uint pos = parent->childPos( this ); - cursor->setTo( parent, pos ); - return parent->buildCommand( container, request ); + SequenceElement* tqparent = static_cast<SequenceElement*>( getParent() ); + if ( tqparent ) { + uint pos = tqparent->childPos( this ); + cursor->setTo( tqparent, pos ); + return tqparent->buildCommand( container, request ); } } @@ -78,7 +78,7 @@ KCommand* NumberElement::buildCommand( Container* container, Request* request ) // a) Cut from mark to the end // b) Create a new token and add an element from key pressed // c) Create a new token and add elements cut previously - // d) Move cursor to parent so that it command execution works fine + // d) Move cursor to tqparent so that it command execution works fine switch( *request ) { case req_addTextChar: { @@ -89,9 +89,9 @@ KCommand* NumberElement::buildCommand( Container* container, Request* request ) command->addCursor( cursor ); command->addToken( id ); command->addContent( id, text ); - SequenceElement* parent = static_cast< SequenceElement* >( getParent() ); - if ( parent ) { - cursor->setTo( parent, parent->childPos( this ) + 1 ); + SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() ); + if ( tqparent ) { + cursor->setTo( tqparent, tqparent->childPos( this ) + 1 ); } return command; } @@ -106,9 +106,9 @@ KCommand* NumberElement::buildCommand( Container* container, Request* request ) TextElement* text = creationStrategy->createTextElement( tr->text()[i] ); command->addContent( id, text ); } - SequenceElement* parent = static_cast< SequenceElement* >( getParent() ); - if ( parent ) { - cursor->setTo( parent, parent->childPos( this ) + 1 ); + SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() ); + if ( tqparent ) { + cursor->setTo( tqparent, tqparent->childPos( this ) + 1 ); } return command; } @@ -121,9 +121,9 @@ KCommand* NumberElement::buildCommand( Container* container, Request* request ) command->addCursor( cursor ); command->addToken( op ); command->addContent( op, text ); - SequenceElement* parent = static_cast< SequenceElement* >( getParent() ); - if ( parent ) { - cursor->setTo( parent, parent->childPos( this ) + 1 ); + SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() ); + if ( tqparent ) { + cursor->setTo( tqparent, tqparent->childPos( this ) + 1 ); } return command; } @@ -136,11 +136,11 @@ KCommand* NumberElement::buildCommand( Container* container, Request* request ) case req_addSymbol: case req_addOneByTwoMatrix: case req_addMatrix: { - SequenceElement* parent = static_cast<SequenceElement*>( getParent() ); - if ( parent ) { - uint pos = parent->childPos( this ); - cursor->setTo( parent, pos + 1); - return parent->buildCommand( container, request ); + SequenceElement* tqparent = static_cast<SequenceElement*>( getParent() ); + if ( tqparent ) { + uint pos = tqparent->childPos( this ); + cursor->setTo( tqparent, pos + 1); + return tqparent->buildCommand( container, request ); } } default: |