diff options
Diffstat (limited to 'kspread/kspread_autofill.cc')
-rw-r--r-- | kspread/kspread_autofill.cc | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/kspread/kspread_autofill.cc b/kspread/kspread_autofill.cc index 8a84e904..38cca433 100644 --- a/kspread/kspread_autofill.cc +++ b/kspread/kspread_autofill.cc @@ -206,38 +206,38 @@ AutoFillSequenceItem::AutoFillSequenceItem( const TQString &_str ) other=new TQStringList(config->readListEntry("Other list")); } - if ( month->tqfind( _str ) != month->end() ) + if ( month->find( _str ) != month->end() ) { m_Type = MONTH; return; } - if ( shortMonth->tqfind( _str ) != shortMonth->end() ) + if ( shortMonth->find( _str ) != shortMonth->end() ) { m_Type = SHORTMONTH; return; } - if ( day->tqfind( _str ) != day->end() ) + if ( day->find( _str ) != day->end() ) { m_Type = DAY; return; } - if ( shortDay->tqfind( _str ) != shortDay->end() ) + if ( shortDay->find( _str ) != shortDay->end() ) { m_Type = SHORTDAY; return; } - if( other->tqfind(_str)!=other->end()) + if( other->find(_str)!=other->end()) { m_Type = OTHER; m_OtherBegin=0; m_OtherEnd=other->count(); - int index= other->tqfindIndex(_str); + int index= other->findIndex(_str); //find end and begin of qstringlist of other. - for ( TQStringList::Iterator it = other->tqfind(_str); it != other->end();++it ) + for ( TQStringList::Iterator it = other->find(_str); it != other->end();++it ) { if((*it)=="\\") { @@ -246,8 +246,8 @@ AutoFillSequenceItem::AutoFillSequenceItem( const TQString &_str ) } index++; } - index= other->tqfindIndex(_str); - for ( TQStringList::Iterator it = other->tqfind(_str); it != other->begin();--it ) + index= other->findIndex(_str); + for ( TQStringList::Iterator it = other->find(_str); it != other->begin();--it ) { if((*it)=="\\") { @@ -286,8 +286,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta ) return false; case MONTH: { - int i = month->tqfindIndex( m_String ); - int j = month->tqfindIndex( seq->getString() ); + int i = month->findIndex( m_String ); + int j = month->findIndex( seq->getString() ); int k = j; if ( j + 1 == i ) @@ -299,8 +299,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta ) case SHORTMONTH: { - int i = shortMonth->tqfindIndex( m_String ); - int j = shortMonth->tqfindIndex( seq->getString() ); + int i = shortMonth->findIndex( m_String ); + int j = shortMonth->findIndex( seq->getString() ); int k = j; if ( j + 1 == i ) @@ -312,8 +312,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta ) case DAY: { - int i = day->tqfindIndex( m_String ); - int j = day->tqfindIndex( seq->getString() ); + int i = day->findIndex( m_String ); + int j = day->findIndex( seq->getString() ); int k = j; if ( j + 1 == i ) @@ -326,8 +326,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta ) case SHORTDAY: { - int i = shortDay->tqfindIndex( m_String ); - int j = shortDay->tqfindIndex( seq->getString() ); + int i = shortDay->findIndex( m_String ); + int j = shortDay->findIndex( seq->getString() ); int k = j; if ( j + 1 == i ) @@ -340,8 +340,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta ) { if( m_OtherEnd!= seq->getIOtherEnd() || m_OtherBegin!= seq->getIOtherBegin()) return false; - int i = other->tqfindIndex( m_String ); - int j = other->tqfindIndex( seq->getString() ); + int i = other->findIndex( m_String ); + int j = other->findIndex( seq->getString() ); int k = j; if ( j < i ) k += (m_OtherEnd - m_OtherBegin - 1); @@ -373,7 +373,7 @@ TQString AutoFillSequenceItem::getSuccessor( int _no, double _delta ) break; case MONTH: { - int i = month->tqfindIndex( m_String ); + int i = month->findIndex( m_String ); int j = i + _no * (int) _delta; while (j < 0) j += month->count(); @@ -383,7 +383,7 @@ TQString AutoFillSequenceItem::getSuccessor( int _no, double _delta ) break; case SHORTMONTH: { - int i = shortMonth->tqfindIndex( m_String ); + int i = shortMonth->findIndex( m_String ); int j = i + _no * (int) _delta; while (j < 0) j += shortMonth->count(); @@ -393,7 +393,7 @@ TQString AutoFillSequenceItem::getSuccessor( int _no, double _delta ) break; case DAY: { - int i = day->tqfindIndex( m_String ); + int i = day->findIndex( m_String ); int j = i + _no * (int) _delta; while (j < 0) j += day->count(); @@ -403,7 +403,7 @@ TQString AutoFillSequenceItem::getSuccessor( int _no, double _delta ) break; case SHORTDAY: { - int i = shortDay->tqfindIndex( m_String ); + int i = shortDay->findIndex( m_String ); int j = i + _no * (int) _delta; while (j < 0) j += shortDay->count(); @@ -413,7 +413,7 @@ TQString AutoFillSequenceItem::getSuccessor( int _no, double _delta ) break; case OTHER: { - int i = other->tqfindIndex( m_String )-(m_OtherBegin+1); + int i = other->findIndex( m_String )-(m_OtherBegin+1); int j = i + _no * (int) _delta; int k = j % (m_OtherEnd - m_OtherBegin-1); erg = (*other->at( (k+m_OtherBegin+1) )); @@ -444,7 +444,7 @@ TQString AutoFillSequenceItem::getPredecessor( int _no, double _delta ) break; case MONTH: { - int i = month->tqfindIndex( m_String ); + int i = month->findIndex( m_String ); int j = i - _no * (int) _delta; while ( j < 0 ) j += month->count(); @@ -454,7 +454,7 @@ TQString AutoFillSequenceItem::getPredecessor( int _no, double _delta ) break; case SHORTMONTH: { - int i = shortMonth->tqfindIndex( m_String ); + int i = shortMonth->findIndex( m_String ); int j = i - _no * (int) _delta; while ( j < 0 ) j += shortMonth->count(); @@ -464,7 +464,7 @@ TQString AutoFillSequenceItem::getPredecessor( int _no, double _delta ) break; case DAY: { - int i = day->tqfindIndex( m_String ); + int i = day->findIndex( m_String ); int j = i - _no * (int) _delta; while ( j < 0 ) j += day->count(); @@ -474,7 +474,7 @@ TQString AutoFillSequenceItem::getPredecessor( int _no, double _delta ) break; case SHORTDAY: { - int i = shortDay->tqfindIndex( m_String ); + int i = shortDay->findIndex( m_String ); int j = i - _no * (int) _delta; while ( j < 0 ) j += shortDay->count(); @@ -484,7 +484,7 @@ TQString AutoFillSequenceItem::getPredecessor( int _no, double _delta ) break; case OTHER: { - int i = other->tqfindIndex( m_String ) - (m_OtherBegin + 1); + int i = other->findIndex( m_String ) - (m_OtherBegin + 1); int j = i - _no * (int) _delta; while ( j < 0 ) j += (m_OtherEnd - m_OtherBegin - 1); @@ -1130,7 +1130,7 @@ void Sheet::FillSequenceWithCopy(TQPtrList<Cell>& _srcList, { // FIXME this is a workaround to avoid those nasty one minute off // "dragging down" time is inaccurate overa large lists! - // This is the best approximation I could tqfind (raphael) + // This is the best approximation I could find (raphael) if (down) { // factor = 1.000002/24. + 0.000000001; @@ -1153,24 +1153,24 @@ void Sheet::FillSequenceWithCopy(TQPtrList<Cell>& _srcList, ++incr; } else if((AutoFillSequenceItem::month != 0L) - && AutoFillSequenceItem::month->tqfind( _srcList.at( s )->text()) != 0L - && AutoFillSequenceItem::month->tqfind( _srcList.at( s )->text()) != AutoFillSequenceItem::month->end() + && AutoFillSequenceItem::month->find( _srcList.at( s )->text()) != 0L + && AutoFillSequenceItem::month->find( _srcList.at( s )->text()) != AutoFillSequenceItem::month->end() && _srcList.count() == 1) { TQString strMonth=_srcList.at( s )->text(); - int i = AutoFillSequenceItem::month->tqfindIndex( strMonth )+incr; + int i = AutoFillSequenceItem::month->findIndex( strMonth )+incr; int k = (i) % AutoFillSequenceItem::month->count(); cell->setCellText((*AutoFillSequenceItem::month->at( k ))); incr++; } else if(AutoFillSequenceItem::day != 0L - && AutoFillSequenceItem::day->tqfind( _srcList.at( s )->text()) != 0L - && AutoFillSequenceItem::day->tqfind( _srcList.at( s )->text()) + && AutoFillSequenceItem::day->find( _srcList.at( s )->text()) != 0L + && AutoFillSequenceItem::day->find( _srcList.at( s )->text()) != AutoFillSequenceItem::day->end() && _srcList.count()==1) { TQString strDay=_srcList.at( s )->text(); - int i = AutoFillSequenceItem::day->tqfindIndex( strDay )+incr; + int i = AutoFillSequenceItem::day->findIndex( strDay )+incr; int k = (i) % AutoFillSequenceItem::day->count(); cell->setCellText((*AutoFillSequenceItem::day->at( k ))); incr++; @@ -1183,7 +1183,7 @@ void Sheet::FillSequenceWithCopy(TQPtrList<Cell>& _srcList, { TQString tmp=number.cap(1); int num=tmp.toInt()+incr; - cell->setCellText(_srcList.at( s )->text().tqreplace(number,TQString::number(num))); + cell->setCellText(_srcList.at( s )->text().replace(number,TQString::number(num))); ++incr; } else if ( !_srcList.at( s )->link().isEmpty() ) |