diff options
Diffstat (limited to 'lib/kotext')
35 files changed, 314 insertions, 314 deletions
diff --git a/lib/kotext/DateFormatWidget.cpp b/lib/kotext/DateFormatWidget.cpp index bff1f86c..0c1b3575 100644 --- a/lib/kotext/DateFormatWidget.cpp +++ b/lib/kotext/DateFormatWidget.cpp @@ -155,7 +155,7 @@ TQString DateFormatWidget::resultString() { const TQString lookup(combo1->currentText()); const TQStringList listTranslated( KoVariableDateFormat::staticTranslatedFormatPropsList() ); - const int index = listTranslated.tqfindIndex(lookup); + const int index = listTranslated.findIndex(lookup); if (index==-1) return (lookup); // Either costum or non-locale diff --git a/lib/kotext/KFontDialog_local.cpp b/lib/kotext/KFontDialog_local.cpp index bcbdde6b..6dbb498f 100644 --- a/lib/kotext/KFontDialog_local.cpp +++ b/lib/kotext/KFontDialog_local.cpp @@ -287,7 +287,7 @@ KFontChooser_local::KFontChooser_local(TQWidget *tqparent, const char *name, connect( sizeListBox, TQT_SIGNAL(highlighted(const TQString&)), TQT_SLOT(size_chosen_slot(const TQString&)) ); - sizeListBox->setSelected(sizeListBox->tqfindItem(TQString::number(10)), true); // default to 10pt. + sizeListBox->setSelected(sizeListBox->findItem(TQString::number(10)), true); // default to 10pt. row ++; @@ -478,13 +478,13 @@ void KFontChooser_local::family_chosen_slot(const TQString& family) currentStyles.clear(); for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { TQString style = *it; - int pos = style.tqfind("Plain"); - if(pos >=0) style = style.tqreplace(pos,5,i18n("Regular")); - pos = style.tqfind("Normal"); - if(pos >=0) style = style.tqreplace(pos,6,i18n("Regular")); - pos = style.tqfind("Oblique"); - if(pos >=0) style = style.tqreplace(pos,7,i18n("Italic")); - if(!styleListBox->tqfindItem(style)) { + int pos = style.find("Plain"); + if(pos >=0) style = style.replace(pos,5,i18n("Regular")); + pos = style.find("Normal"); + if(pos >=0) style = style.replace(pos,6,i18n("Regular")); + pos = style.find("Oblique"); + if(pos >=0) style = style.replace(pos,7,i18n("Italic")); + if(!styleListBox->findItem(style)) { styleListBox->insertItem(i18n(style.utf8())); currentStyles.insert(i18n(style.utf8()), *it); } @@ -495,9 +495,9 @@ void KFontChooser_local::family_chosen_slot(const TQString& family) } styleListBox->blockSignals(true); - TQListBoxItem *item = styleListBox->tqfindItem(selectedStyle); + TQListBoxItem *item = styleListBox->findItem(selectedStyle); if (item) - styleListBox->setSelected(styleListBox->tqfindItem(selectedStyle), true); + styleListBox->setSelected(styleListBox->findItem(selectedStyle), true); else styleListBox->setSelected(0, true); styleListBox->blockSignals(false); @@ -551,7 +551,7 @@ void KFontChooser_local::style_chosen_slot(const TQString& style) fillSizeList(); } sizeListBox->blockSignals(true); - sizeListBox->setSelected(sizeListBox->tqfindItem(TQString::number(selectedSize)), true); + sizeListBox->setSelected(sizeListBox->findItem(TQString::number(selectedSize)), true); sizeListBox->blockSignals(false); sizeListBox->ensureCurrentVisible(); @@ -598,9 +598,9 @@ void KFontChooser_local::setupDisplay() // 1st Fallback if ( (i == numEntries) ) { - if (family.tqcontains('[')) + if (family.contains('[')) { - family = family.left(family.tqfind('[')).stripWhiteSpace(); + family = family.left(family.find('[')).stripWhiteSpace(); for (i = 0; i < numEntries; i++) { if (family == familyListBox->text(i).lower()) { familyListBox->setCurrentItem(i); @@ -697,10 +697,10 @@ void KFontChooser_local::addFont( TQStringList &list, const char *xfont ) TQString font = TQString::tqfromLatin1(ptr + 1); int pos; - if ( ( pos = font.tqfind( '-' ) ) > 0 ) { + if ( ( pos = font.find( '-' ) ) > 0 ) { font.truncate( pos ); - if ( font.tqfind( TQString::tqfromLatin1("open look"), 0, false ) >= 0 ) + if ( font.find( TQString::tqfromLatin1("open look"), 0, false ) >= 0 ) return; TQStringList::Iterator it = list.begin(); diff --git a/lib/kotext/KoAutoFormat.cpp b/lib/kotext/KoAutoFormat.cpp index b6529b8f..dfe6c6df 100644 --- a/lib/kotext/KoAutoFormat.cpp +++ b/lib/kotext/KoAutoFormat.cpp @@ -75,8 +75,8 @@ void KoCompletionBox::setLastWord( TQString const &lastword) m_lastWord = lastword; } -KoAutoFormatEntry::KoAutoFormatEntry(const TQString& tqreplace) - : m_tqreplace( tqreplace ) +KoAutoFormatEntry::KoAutoFormatEntry(const TQString& replace) + : m_replace( replace ) { m_formatOptions= 0L; } @@ -296,11 +296,11 @@ void KoAutoFormat::readConfig(bool force) TQString beginDoubleQuote = config->readEntry( "TypographicQuotesBegin" ); TQString endDoubleQuote = config->readEntry( "TypographicQuotesEnd" ); - m_typographicDoubleQuotes.tqreplace = config->readBoolEntry( "TypographicQuotesEnabled", false ); + m_typographicDoubleQuotes.replace = config->readBoolEntry( "TypographicQuotesEnabled", false ); TQString begin = config->readEntry( "TypographicSimpleQuotesBegin" ); TQString end = config->readEntry( "TypographicSimpleQuotesEnd" ); - m_typographicSimpleQuotes.tqreplace = config->readBoolEntry( "TypographicSimpleQuotesEnabled", false ); + m_typographicSimpleQuotes.replace = config->readBoolEntry( "TypographicSimpleQuotesEnabled", false ); m_bAutoSuperScript = config->readBoolEntry( "AutoSuperScript", true ); @@ -352,7 +352,7 @@ void KoAutoFormat::readConfig(bool force) else m_typographicDoubleQuotes.end = endDoubleQuote[0]; - m_typographicDoubleQuotes.tqreplace = m_typographicDoubleQuotes.tqreplace + m_typographicDoubleQuotes.replace = m_typographicDoubleQuotes.replace && !m_typographicDoubleQuotes.begin.isNull() && !m_typographicDoubleQuotes.end.isNull(); @@ -377,7 +377,7 @@ void KoAutoFormat::readConfig(bool force) else m_typographicSimpleQuotes.end = end[0]; - m_typographicSimpleQuotes.tqreplace = m_typographicSimpleQuotes.tqreplace + m_typographicSimpleQuotes.replace = m_typographicSimpleQuotes.replace && !m_typographicSimpleQuotes.end.isNull() && !m_typographicSimpleQuotes.begin.isNull(); @@ -404,7 +404,7 @@ void KoAutoFormat::readAutoCorrectConfig() { if ( fname.isEmpty() && !kdelang.isEmpty() ) fname = locate( "data", "koffice/autocorrect/" + kdelang + ".xml", m_doc->instance() ); - if ( fname.isEmpty() && kdelang.tqcontains("_") ) + if ( fname.isEmpty() && kdelang.contains("_") ) { kdelang.remove( TQRegExp( "_.*" ) ); fname = locate( "data", "koffice/autocorrect/" + kdelang + ".xml", m_doc->instance() ); @@ -456,7 +456,7 @@ void KoAutoFormat::readAutoCorrectConfig() for(uint i = 0; i < nl.count() ; i++) { //bug in qmap we overwrite = false doesn't work //so we can't add multiple "othernb" - m_superScriptEntries.insert( nl.item(i).toElement().attribute("tqfind"), KoAutoFormatEntry(nl.item(i).toElement().attribute("super")),FALSE ); + m_superScriptEntries.insert( nl.item(i).toElement().attribute("find"), KoAutoFormatEntry(nl.item(i).toElement().attribute("super")),FALSE ); } } @@ -527,7 +527,7 @@ void KoAutoFormat::loadAutoCorrection( const TQDomElement & _de, bool _allLangua void KoAutoFormat::loadEntry( const TQDomElement &nl, bool _allLanguages) { - KoAutoFormatEntry *tmp =new KoAutoFormatEntry(nl.attribute("tqreplace")); + KoAutoFormatEntry *tmp =new KoAutoFormatEntry(nl.attribute("replace")); if ( nl.hasAttribute("FONT")) { tmp->createNewEntryContext(); @@ -607,9 +607,9 @@ void KoAutoFormat::loadEntry( const TQDomElement &nl, bool _allLanguages) tmp->formatEntryContext()->m_backGroundColor = col; } if ( !_allLanguages ) - m_entries.insert( nl.attribute("tqfind"), tmp ); + m_entries.insert( nl.attribute("find"), tmp ); else - m_allLanguages.insert( nl.attribute("tqfind"), tmp ); + m_allLanguages.insert( nl.attribute("find"), tmp ); } @@ -628,10 +628,10 @@ void KoAutoFormat::saveConfig() config->writeEntry( "TypographicQuotesBegin", TQString( m_typographicDoubleQuotes.begin ) ); config->writeEntry( "TypographicQuotesEnd", TQString( m_typographicDoubleQuotes.end ) ); - config->writeEntry( "TypographicQuotesEnabled", m_typographicDoubleQuotes.tqreplace ); + config->writeEntry( "TypographicQuotesEnabled", m_typographicDoubleQuotes.replace ); config->writeEntry( "TypographicSimpleQuotesBegin", TQString( m_typographicSimpleQuotes.begin ) ); config->writeEntry( "TypographicSimpleQuotesEnd", TQString( m_typographicSimpleQuotes.end ) ); - config->writeEntry( "TypographicSimpleQuotesEnabled", m_typographicSimpleQuotes.tqreplace ); + config->writeEntry( "TypographicSimpleQuotesEnabled", m_typographicSimpleQuotes.replace ); config->writeEntry( "AdvancedAutocorrect", m_advancedAutoCorrect ); config->writeEntry( "AutoCorrectionWithFormat", m_bAutoCorrectionWithFormat ); @@ -709,8 +709,8 @@ void KoAutoFormat::saveConfig() for ( ; it2 != m_superScriptEntries.end() ; ++it2 ) { data = doc.createElement("superscript"); - data.setAttribute("tqfind", it2.key()); - data.setAttribute("super", it2.data().tqreplace()); + data.setAttribute("find", it2.key()); + data.setAttribute("super", it2.data().replace()); super.appendChild(data); } begin.appendChild(super); @@ -751,8 +751,8 @@ TQDomElement KoAutoFormat::saveEntry( TQDictIterator<KoAutoFormatEntry> _entry, { TQDomElement data; data = doc.createElement("item"); - data.setAttribute("tqfind", _entry.currentKey()); - data.setAttribute("tqreplace", _entry.current()->tqreplace()); + data.setAttribute("find", _entry.currentKey()); + data.setAttribute("replace", _entry.current()->replace()); if ( _entry.current()->formatEntryContext() ) { KoSearchContext *tmp = _entry.current()->formatEntryContext(); @@ -847,16 +847,16 @@ TQDomElement KoAutoFormat::saveEntry( TQDictIterator<KoAutoFormatEntry> _entry, return data; } -void KoAutoFormat::addAutoFormatEntry( const TQString &key, const TQString &tqreplace ) +void KoAutoFormat::addAutoFormatEntry( const TQString &key, const TQString &replace ) { - KoAutoFormatEntry *findEntry = m_entries.tqfind( key); + KoAutoFormatEntry *findEntry = m_entries.find( key); if ( findEntry ) { - if ( findEntry->tqreplace().lower() == tqreplace.lower() ) + if ( findEntry->replace().lower() == replace.lower() ) return; } - KoAutoFormatEntry *tmp = new KoAutoFormatEntry( tqreplace ); + KoAutoFormatEntry *tmp = new KoAutoFormatEntry( replace ); m_entries.insert( key, tmp ); saveConfig(); buildMaxLen(); @@ -932,7 +932,7 @@ bool KoAutoFormat::doCompletion( KoTextCursor* textEditCursor, KoTextParag *para uint maxlength = 0; for ( TQStringList::ConstIterator it = wordlist.begin(); it != wordlist.end(); ++it ) // several completion words were found { - if ( (*it).tqstartsWith( lastWord, false ) && new_wordlist.tqfind(*it) == new_wordlist.end() ) //the completion words that begin with lastWord + if ( (*it).tqstartsWith( lastWord, false ) && new_wordlist.find(*it) == new_wordlist.end() ) //the completion words that begin with lastWord { if ( (*it).length() > maxlength ) maxlength = (*it).length(); @@ -1092,8 +1092,8 @@ void KoAutoFormat::autoFormatIsActive() m_autoReplaceNumber || m_autoChangeFormat || m_completion || - m_typographicDoubleQuotes.tqreplace || - m_typographicSimpleQuotes.tqreplace || + m_typographicDoubleQuotes.replace || + m_typographicSimpleQuotes.replace || m_entries.count()!=0 || m_allLanguages.count()!=0; } @@ -1323,13 +1323,13 @@ void KoAutoFormat::doAutoFormat( KoTextCursor* textEditCursor, KoTextParag *para } else { - if ( ch == '"' && m_typographicDoubleQuotes.tqreplace ) + if ( ch == '"' && m_typographicDoubleQuotes.replace ) { KCommand *cmd = doTypographicQuotes( textEditCursor, parag, index, txtObj, true /*double quote*/ ); if ( cmd ) txtObj->emitNewCommand( cmd ); } - else if ( ch == '\'' && m_typographicDoubleQuotes.tqreplace ) + else if ( ch == '\'' && m_typographicDoubleQuotes.replace ) { KCommand *cmd = doTypographicQuotes( textEditCursor, parag, index, txtObj, false /* simple quote*/ ); if ( cmd ) @@ -1400,10 +1400,10 @@ KCommand *KoAutoFormat::autoFormatWord( KoTextCursor* textEditCursor, KoTextPara cursor.setIndex( start + length ); textdoc->setSelectionEnd( KoTextDocument::HighlightSelection, &cursor ); KCommand *cmd = 0L; - kdDebug()<<"it->tqreplace() :"<<it->tqreplace()<<endl; + kdDebug()<<"it->replace() :"<<it->replace()<<endl; if (!it->formatEntryContext() || !m_bAutoCorrectionWithFormat) { - cmd = txtObj->replaceSelectionCommand( textEditCursor, it->tqreplace(), + cmd = txtObj->replaceSelectionCommand( textEditCursor, it->replace(), i18n("Autocorrect Word"), KoTextDocument::HighlightSelection ); } @@ -1414,7 +1414,7 @@ KCommand *KoAutoFormat::autoFormatWord( KoTextCursor* textEditCursor, KoTextPara KoTextFormat * newFormat = new KoTextFormat(*lastFormat); changeTextFormat(it->formatEntryContext(), newFormat, flags ); KMacroCommand *macro = new KMacroCommand( i18n("Autocorrect Word with Format")); - KCommand *cmd2=txtObj->replaceSelectionCommand( textEditCursor, it->tqreplace(), + KCommand *cmd2=txtObj->replaceSelectionCommand( textEditCursor, it->replace(), i18n("Autocorrect Word"), KoTextDocument::HighlightSelection ); if ( cmd2 ) @@ -1423,13 +1423,13 @@ KCommand *KoAutoFormat::autoFormatWord( KoTextCursor* textEditCursor, KoTextPara cursor.setParag( parag ); cursor.setIndex( start ); textdoc->setSelectionStart( KoTextDocument::HighlightSelection, &cursor ); - cursor.setIndex( start + it->tqreplace().length()/*+ length + 1*/ ); + cursor.setIndex( start + it->replace().length()/*+ length + 1*/ ); textdoc->setSelectionEnd( KoTextDocument::HighlightSelection, &cursor ); cmd2 =txtObj->setFormatCommand( textEditCursor, &lastFormat, newFormat, flags, false, KoTextDocument::HighlightSelection ); macro->addCommand( cmd2); - index = index - length + it->tqreplace().length(); + index = index - length + it->replace().length(); textEditCursor->setIndex(index+1); cmd2 =txtObj->setFormatCommand( textEditCursor, &newFormat, lastFormat, 0 ); macro->addCommand( cmd2); @@ -1448,7 +1448,7 @@ KCommand *KoAutoFormat::autoFormatWord( KoTextCursor* textEditCursor, KoTextPara txtObj->emitHideCursor(); textEditCursor->gotoRight(); txtObj->emitShowCursor(); - index = index - length + it->tqreplace().length(); + index = index - length + it->replace().length(); return cmd; } } @@ -1557,7 +1557,7 @@ KCommand * KoAutoFormat::doUpperCase( KoTextCursor *textEditCursor, KoTextParag // Go back over any space/tab/CR while ( backCursor.index() > 0 || backCursor.parag()->prev() ) { - beginningOfSentence = false; // we could go back -> false unless we'll tqfind '.' + beginningOfSentence = false; // we could go back -> false unless we'll find '.' backCursor.gotoLeft(); if ( !backCursor.parag()->at( backCursor.index() )->c.isSpace() ) break; @@ -1578,7 +1578,7 @@ KCommand * KoAutoFormat::doUpperCase( KoTextCursor *textEditCursor, KoTextParag + punct; kdDebug() << "text: " << text << endl; // text has the word at the end of the 'sentence', including the termination. Example: "Mr." - beginningOfSentence = (m_upperCaseExceptions.tqfindIndex(text)==-1); // Ok if we can't find it + beginningOfSentence = (m_upperCaseExceptions.findIndex(text)==-1); // Ok if we can't find it } if ( beginningOfSentence ) @@ -1605,7 +1605,7 @@ KCommand * KoAutoFormat::doUpperCase( KoTextCursor *textEditCursor, KoTextParag // Check next letter - we still want to be able to write fully uppercase words... backCursor.setIndex( backCursor.index() + 1 ); TQChar thirdChar = backCursor.parag()->at( backCursor.index() )->c; - if ( isLower( thirdChar ) && (m_twoUpperLetterException.tqfindIndex(word)==-1)) + if ( isLower( thirdChar ) && (m_twoUpperLetterException.findIndex(word)==-1)) { // Ok, convert KoTextCursor cursor( parag->document() ); @@ -1681,13 +1681,13 @@ void KoAutoFormat::detectStartOfLink(KoTextParag * parag, int const index, bool word.append( s->at( i ).c ); } - if (word.tqfind("http")!=-1 || word.tqfind("https")!=-1 || word.tqfind("mailto")!=-1 || word.tqfind("ftp")!=-1 || word.tqfind("file")!=-1 - || word.tqfind("news")!=-1 || word.tqfind('@')!=-1) + if (word.find("http")!=-1 || word.find("https")!=-1 || word.find("mailto")!=-1 || word.find("ftp")!=-1 || word.find("file")!=-1 + || word.find("news")!=-1 || word.find('@')!=-1) m_ignoreUpperCase=true; else { - int const tmp_pos=word.tqfind("www."); - if (tmp_pos!=-1 && (word.tqfind('.',tmp_pos+4)!=-1 || insertedDot) ) + int const tmp_pos=word.find("www."); + if (tmp_pos!=-1 && (word.find('.',tmp_pos+4)!=-1 || insertedDot) ) m_ignoreUpperCase=true; } } @@ -1696,35 +1696,35 @@ void KoAutoFormat::doAutoDetectUrl( KoTextCursor *textEditCursor, KoTextParag *p { kdDebug() << "link:" << word << endl; char link_type = 0; - int pos = word.tqfind("http://"); - int tmp_pos = word.tqfind("https://"); + int pos = word.find("http://"); + int tmp_pos = word.find("https://"); if(tmp_pos<pos && tmp_pos!=-1) pos = tmp_pos; - tmp_pos = word.tqfind("mailto:/"); + tmp_pos = word.find("mailto:/"); if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1) pos = tmp_pos; - tmp_pos = word.tqfind("ftp://"); + tmp_pos = word.find("ftp://"); if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1) pos = tmp_pos; - tmp_pos = word.tqfind("ftp."); + tmp_pos = word.find("ftp."); if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1) { pos = tmp_pos; link_type = 3; } - tmp_pos = word.tqfind("file:/"); + tmp_pos = word.find("file:/"); if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1) pos = tmp_pos; - tmp_pos = word.tqfind("news:"); + tmp_pos = word.find("news:"); if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1) pos = tmp_pos; - tmp_pos = word.tqfind("www."); - if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1 && word.tqfind('.',tmp_pos+4)!=-1 ) + tmp_pos = word.find("www."); + if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1 && word.find('.',tmp_pos+4)!=-1 ) { pos = tmp_pos; link_type = 2; } - tmp_pos = word.tqfind('@'); + tmp_pos = word.find('@'); if ( pos == -1 && tmp_pos != -1 ) { pos = tmp_pos-1; @@ -1821,7 +1821,7 @@ void KoAutoFormat::doAutoIncludeUpperUpper(KoTextCursor* /*textEditCursor*/, KoT } if( word.length() > 2 && word.left(2)==word.left(2).upper() && word.tqat(3)!=word.tqat(3).upper() ) { - if ( m_twoUpperLetterException.tqfindIndex(word )==-1) + if ( m_twoUpperLetterException.findIndex(word )==-1) m_twoUpperLetterException.append( word); } i+=word.length(); @@ -1858,7 +1858,7 @@ void KoAutoFormat::doAutoIncludeAbbreviation(KoTextCursor* /*textEditCursor*/, K } if( word.length()>1 && !wordAfter.isEmpty() && wordAfter.tqat(0)==wordAfter.tqat(0).lower()) { - if ( m_upperCaseExceptions.tqfindIndex(word )==-1) + if ( m_upperCaseExceptions.findIndex(word )==-1) m_upperCaseExceptions.append( word ); } } @@ -2151,7 +2151,7 @@ KCommand *KoAutoFormat::doCapitalizeNameOfDays( KoTextCursor* textEditCursor, Ko { //m_cacheNameOfDays //todo - int pos = m_cacheNameOfDays.tqfindIndex( word.lower() ); + int pos = m_cacheNameOfDays.findIndex( word.lower() ); if ( pos == -1 ) return 0L; KoTextDocument * textdoc = parag->textDocument(); @@ -2183,19 +2183,19 @@ KCommand *KoAutoFormat::doAutoSuperScript( KoTextCursor* textEditCursor, KoTextP { KoAutoFormatEntryMap::Iterator it = m_superScriptEntries.begin(); bool found = false; - TQString tqreplace; + TQString replace; for ( ; it != m_superScriptEntries.end() ; ++it ) { if( it.key()==word) { - tqreplace = it.data().tqreplace(); + replace = it.data().replace(); found = true; break; } else if ( it.key()=="othernb") { - TQString tmp = it.data().tqreplace(); - int pos = word.tqfind( tmp ); + TQString tmp = it.data().replace(); + int pos = word.find( tmp ); if( pos != -1) { if( pos + tmp.length() == word.length()) @@ -2204,7 +2204,7 @@ KCommand *KoAutoFormat::doAutoSuperScript( KoTextCursor* textEditCursor, KoTextP word.left( pos ).toInt( &ok); if( ok ) { - tqreplace = tmp; + replace = tmp; found = true; break; } @@ -2216,7 +2216,7 @@ KCommand *KoAutoFormat::doAutoSuperScript( KoTextCursor* textEditCursor, KoTextP { KoTextDocument * textdoc = parag->textDocument(); - int start = index - tqreplace.length(); + int start = index - replace.length(); KoTextFormat * lastFormat = parag->at( start )->format(); KoTextFormat * newFormat = new KoTextFormat(*lastFormat); KoTextCursor cursor( parag->document() ); diff --git a/lib/kotext/KoAutoFormat.h b/lib/kotext/KoAutoFormat.h index 4f59fbaa..8f4199a2 100644 --- a/lib/kotext/KoAutoFormat.h +++ b/lib/kotext/KoAutoFormat.h @@ -72,11 +72,11 @@ class KoAutoFormatEntry { public: // The text to find is actually the key in KWAutoFormat's map. - // What we replace it with is tqreplace(). - KoAutoFormatEntry(const TQString& tqreplace = TQString()); + // What we replace it with is replace(). + KoAutoFormatEntry(const TQString& replace = TQString()); ~KoAutoFormatEntry(); - TQString tqreplace() const { return m_tqreplace; } - void changeReplace(const TQString & rep){ m_tqreplace = rep; } + TQString replace() const { return m_replace; } + void changeReplace(const TQString & rep){ m_replace = rep; } KoSearchContext *formatEntryContext()const; void createNewEntryContext(); @@ -84,7 +84,7 @@ public: void clearFormatEntryContext( ); protected: - TQString m_tqreplace; + TQString m_replace; // For formatting in the replacement - not implemented yet KoSearchContext *m_formatOptions; }; @@ -145,7 +145,7 @@ public: struct TypographicQuotes { TQChar begin, end; - bool tqreplace; // aka enabled + bool replace; // aka enabled }; // Configuration (on/off/settings). Called by the dialog. @@ -289,7 +289,7 @@ public: buildMaxLen(); } - void addAutoFormatEntry( const TQString &key, const TQString &tqreplace ); + void addAutoFormatEntry( const TQString &key, const TQString &replace ); void removeAutoFormatEntry( const TQString &key ) { diff --git a/lib/kotext/KoAutoFormatDia.cpp b/lib/kotext/KoAutoFormatDia.cpp index 6a602c92..90b1a97d 100644 --- a/lib/kotext/KoAutoFormatDia.cpp +++ b/lib/kotext/KoAutoFormatDia.cpp @@ -114,7 +114,7 @@ void KoAutoFormatExceptionWidget::slotAddException() { if(text.at(text.length()-1)!='.' && m_bAbbreviation) text=text+"."; - if( m_listException.tqfindIndex( text )==-1) + if( m_listException.findIndex( text )==-1) { m_listException<<text; @@ -468,13 +468,13 @@ void KoAutoFormatDia::setupTab2() void KoAutoFormatDia::initTab2() { - bool state=m_autoFormat.getConfigTypographicDoubleQuotes().tqreplace; + bool state=m_autoFormat.getConfigTypographicDoubleQuotes().replace; cbTypographicDoubleQuotes->setChecked( state ); pbDoubleQuote1->setText( oDoubleBegin ); pbDoubleQuote2->setText(oDoubleEnd ); slotChangeStateDouble(state); - state=m_autoFormat.getConfigTypographicSimpleQuotes().tqreplace; + state=m_autoFormat.getConfigTypographicSimpleQuotes().replace; cbTypographicSimpleQuotes->setChecked( state ); pbSimpleQuote1->setText( oSimpleBegin ); pbSimpleQuote2->setText(oSimpleEnd ); @@ -510,7 +510,7 @@ void KoAutoFormatDia::setupTab3() tmp =dir.entryList (TQDir::Files); for ( TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it ) { - if ( !(*it).tqcontains("autocorrect")) + if ( !(*it).contains("autocorrect")) { TQString readableName = KGlobal::locale()->twoAlphaToCountryName((*it).left((*it).length()-4)); TQString tmp; @@ -542,14 +542,14 @@ void KoAutoFormatDia::setupTab3() lblFind = new TQLabel( i18n( "&Find:" ), tab3 ); grid->addWidget( lblFind, 3, 0 ); - m_tqfind = new KoAutoFormatLineEdit( tab3 ); - grid->addWidget( m_tqfind, 3, 1 ); + m_find = new KoAutoFormatLineEdit( tab3 ); + grid->addWidget( m_find, 3, 1 ); - lblFind->setBuddy( m_tqfind ); + lblFind->setBuddy( m_find ); - connect( m_tqfind, TQT_SIGNAL( textChanged( const TQString & ) ), - TQT_SLOT( slottqfind( const TQString & ) ) ); - connect( m_tqfind, TQT_SIGNAL( keyReturnPressed() ), + connect( m_find, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( slotfind( const TQString & ) ) ); + connect( m_find, TQT_SIGNAL( keyReturnPressed() ), TQT_SLOT( slotAddEntry())); pbSpecialChar1 = new TQPushButton( "...", tab3 ); @@ -562,14 +562,14 @@ void KoAutoFormatDia::setupTab3() lblReplace = new TQLabel( i18n( "&Replace:" ), tab3 ); grid->addWidget( lblReplace, 3, 3 ); - m_tqreplace = new KoAutoFormatLineEdit( tab3 ); - grid->addWidget( m_tqreplace, 3, 4 ); + m_replace = new KoAutoFormatLineEdit( tab3 ); + grid->addWidget( m_replace, 3, 4 ); - lblReplace->setBuddy( m_tqreplace ); + lblReplace->setBuddy( m_replace ); - connect( m_tqreplace, TQT_SIGNAL( textChanged( const TQString & ) ), - TQT_SLOT( slottqfind2( const TQString & ) ) ); - connect( m_tqreplace, TQT_SIGNAL( keyReturnPressed() ), + connect( m_replace, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( slotfind2( const TQString & ) ) ); + connect( m_replace, TQT_SIGNAL( keyReturnPressed() ), TQT_SLOT( slotAddEntry())); pbSpecialChar2 = new TQPushButton( "...", tab3 ); @@ -655,7 +655,7 @@ void KoAutoFormatDia::initTab3() TQDictIterator<KoAutoFormatEntry> it( m_docAutoFormat->getAutoFormatEntries()); for( ; it.current(); ++it ) { - ( void )new TQListViewItem( m_pListView, it.currentKey(), it.current()->tqreplace() ); + ( void )new TQListViewItem( m_pListView, it.currentKey(), it.current()->replace() ); } } @@ -665,12 +665,12 @@ void KoAutoFormatDia::slotChangeAdvancedAutoCorrection() cbAutoCorrectionWithFormat->setEnabled( state ); pbSpecialChar2->setEnabled( state ); pbSpecialChar1->setEnabled( state ); - m_tqreplace->setEnabled( state); - m_tqfind->setEnabled( state); + m_replace->setEnabled( state); + m_find->setEnabled( state); m_pListView->setEnabled( state); - state = state && !m_tqreplace->text().isEmpty() && !m_tqfind->text().isEmpty(); - KoAutoFormatEntry * entry=m_docAutoFormat->findFormatEntry(m_tqfind->text()); + state = state && !m_replace->text().isEmpty() && !m_find->text().isEmpty(); + KoAutoFormatEntry * entry=m_docAutoFormat->findFormatEntry(m_find->text()); pbRemove->setEnabled(state && entry); pbChangeFormat->setEnabled(state && entry); pbClearFormat->setEnabled(state && entry); @@ -684,7 +684,7 @@ void KoAutoFormatDia::changeAutoformatLanguage(const TQString & text) m_docAutoFormat->configAutoFormatLanguage( TQString()); else { - m_docAutoFormat->configAutoFormatLanguage( exceptionLanguageName.tqfind(text).data()); + m_docAutoFormat->configAutoFormatLanguage( exceptionLanguageName.find(text).data()); } if ( !noSignal ) { @@ -765,10 +765,10 @@ void KoAutoFormatDia::slotChangeTextFormatEntry() KoAutoFormatEntry *entry = 0L; if ( addNewEntry ) { - if ( m_tqreplace->text().isEmpty() ) + if ( m_replace->text().isEmpty() ) return; if ( !newEntry ) - newEntry = new KoAutoFormatEntry( m_tqreplace->text()); + newEntry = new KoAutoFormatEntry( m_replace->text()); entry =newEntry; } else @@ -813,28 +813,28 @@ void KoAutoFormatDia::slotRemoveEntry() } -void KoAutoFormatDia::slottqfind( const TQString & ) +void KoAutoFormatDia::slotfind( const TQString & ) { - KoAutoFormatEntry *entry = m_docAutoFormat->findFormatEntry(m_tqfind->text()); + KoAutoFormatEntry *entry = m_docAutoFormat->findFormatEntry(m_find->text()); if ( entry ) { - m_tqreplace->setText(entry->tqreplace().latin1()); + m_replace->setText(entry->replace().latin1()); pbAdd->setText(i18n("&Modify")); - m_pListView->setCurrentItem(m_pListView->tqfindItem(m_tqfind->text(),0)); + m_pListView->setCurrentItem(m_pListView->findItem(m_find->text(),0)); } else { - m_tqreplace->clear(); + m_replace->clear(); pbAdd->setText(i18n("&Add")); m_pListView->setCurrentItem(0L); } - slottqfind2(""); + slotfind2(""); } -void KoAutoFormatDia::slottqfind2( const TQString & ) +void KoAutoFormatDia::slotfind2( const TQString & ) { - bool state = !m_tqreplace->text().isEmpty() && !m_tqfind->text().isEmpty(); - KoAutoFormatEntry * entry=m_docAutoFormat->findFormatEntry(m_tqfind->text()); + bool state = !m_replace->text().isEmpty() && !m_find->text().isEmpty(); + KoAutoFormatEntry * entry=m_docAutoFormat->findFormatEntry(m_find->text()); pbRemove->setEnabled(state && entry); if ( state && entry ) { @@ -853,10 +853,10 @@ void KoAutoFormatDia::refreshEntryList() TQDictIterator<KoAutoFormatEntry> it( m_docAutoFormat->getAutoFormatEntries()); for( ; it.current(); ++it ) { - ( void )new TQListViewItem( m_pListView, it.currentKey(), it.current()->tqreplace() ); + ( void )new TQListViewItem( m_pListView, it.currentKey(), it.current()->replace() ); } m_pListView->setCurrentItem(m_pListView->firstChild ()); - bool state = !(m_tqreplace->text().isEmpty()) && !(m_tqfind->text().isEmpty()); + bool state = !(m_replace->text().isEmpty()) && !(m_find->text().isEmpty()); //we can delete item, as we search now in listbox and not in m_find lineedit pbRemove->setEnabled(m_pListView->currentItem() && m_pListView->selectedItem()!=0 ); pbChangeFormat->setEnabled(state && m_pListView->currentItem() && m_pListView->selectedItem()!=0 ); @@ -886,14 +886,14 @@ void KoAutoFormatDia::slotAddEntry() { if(!pbAdd->isEnabled()) return; - TQString repl = m_tqreplace->text(); - TQString tqfind = m_tqfind->text(); - if(repl.isEmpty() || tqfind.isEmpty()) + TQString repl = m_replace->text(); + TQString find = m_find->text(); + if(repl.isEmpty() || find.isEmpty()) { KMessageBox::sorry( 0L, i18n( "An area is empty" ) ); return; } - if(repl==tqfind) + if(repl==find) { KMessageBox::sorry( 0L, i18n( "Find string is the same as replace string!" ) ); return; @@ -904,18 +904,18 @@ void KoAutoFormatDia::slotAddEntry() { if ( newEntry ) { - newEntry->changeReplace( m_tqreplace->text()); - addEntryList(tqfind, newEntry); + newEntry->changeReplace( m_replace->text()); + addEntryList(find, newEntry); delete tmp; newEntry = 0L; } else - addEntryList(tqfind, tmp); + addEntryList(find, tmp); } else - editEntryList(tqfind, tqfind, tmp); - m_tqreplace->clear(); - m_tqfind->clear(); + editEntryList(find, find, tmp); + m_replace->clear(); + m_find->clear(); refreshEntryList(); autocorrectionEntryChanged= true; @@ -926,15 +926,15 @@ void KoAutoFormatDia::chooseSpecialChar1() { TQString f = font().family(); TQChar c = ' '; - bool const focus = m_tqfind->hasFocus(); + bool const focus = m_find->hasFocus(); if ( KoCharSelectDia::selectChar( f, c, false ) ) { - int const cursorpos = m_tqfind->cursorPosition(); + int const cursorpos = m_find->cursorPosition(); if (focus) - m_tqfind->setText( m_tqfind->text().insert( cursorpos, c ) ); + m_find->setText( m_find->text().insert( cursorpos, c ) ); else - m_tqfind->setText( m_tqfind->text().append(c) ); - m_tqfind->setCursorPosition( cursorpos+1 ); + m_find->setText( m_find->text().append(c) ); + m_find->setCursorPosition( cursorpos+1 ); } } @@ -943,15 +943,15 @@ void KoAutoFormatDia::chooseSpecialChar2() { TQString f = font().family(); TQChar c = ' '; - bool const focus = m_tqreplace->hasFocus(); + bool const focus = m_replace->hasFocus(); if ( KoCharSelectDia::selectChar( f, c, false ) ) { - int const cursorpos = m_tqreplace->cursorPosition(); + int const cursorpos = m_replace->cursorPosition(); if (focus) - m_tqreplace->setText( m_tqreplace->text().insert(m_tqreplace->cursorPosition(), c ) ); + m_replace->setText( m_replace->text().insert(m_replace->cursorPosition(), c ) ); else - m_tqreplace->setText( m_tqreplace->text().append(c) ); - m_tqreplace->setCursorPosition( cursorpos+1 ); + m_replace->setText( m_replace->text().append(c) ); + m_replace->setCursorPosition( cursorpos+1 ); } } @@ -969,9 +969,9 @@ void KoAutoFormatDia::slotEditEntry() return; delete newEntry; newEntry=0L; - m_tqfind->setText(m_pListView->currentItem()->text(0)); - m_tqreplace->setText(m_pListView->currentItem()->text(1)); - bool state = !m_tqreplace->text().isEmpty() && !m_tqfind->text().isEmpty(); + m_find->setText(m_pListView->currentItem()->text(0)); + m_replace->setText(m_pListView->currentItem()->text(1)); + bool state = !m_replace->text().isEmpty() && !m_find->text().isEmpty(); pbRemove->setEnabled(state); pbChangeFormat->setEnabled( state ); pbClearFormat->setEnabled(state); @@ -983,13 +983,13 @@ bool KoAutoFormatDia::applyConfig() { // First tab KoAutoFormat::TypographicQuotes tq = m_autoFormat.getConfigTypographicSimpleQuotes(); - tq.tqreplace = cbTypographicSimpleQuotes->isChecked(); + tq.replace = cbTypographicSimpleQuotes->isChecked(); tq.begin = pbSimpleQuote1->text()[ 0 ]; tq.end = pbSimpleQuote2->text()[ 0 ]; m_docAutoFormat->configTypographicSimpleQuotes( tq ); tq = m_autoFormat.getConfigTypographicDoubleQuotes(); - tq.tqreplace = cbTypographicDoubleQuotes->isChecked(); + tq.replace = cbTypographicDoubleQuotes->isChecked(); tq.begin = pbDoubleQuote1->text()[ 0 ]; tq.end = pbDoubleQuote2->text()[ 0 ]; m_docAutoFormat->configTypographicDoubleQuotes( tq ); @@ -1024,7 +1024,7 @@ bool KoAutoFormatDia::applyConfig() m_docAutoFormat->configIncludeTwoUpperUpperLetterException( twoUpperLetter->autoInclude()); m_docAutoFormat->configIncludeAbbreviation( abbreviation->autoInclude()); - TQString lang = exceptionLanguageName.tqfind(autoFormatLanguage->currentText()).data(); + TQString lang = exceptionLanguageName.find(autoFormatLanguage->currentText()).data(); if ( lang == i18n("Default") ) m_docAutoFormat->configAutoFormatLanguage(TQString()); else diff --git a/lib/kotext/KoAutoFormatDia.h b/lib/kotext/KoAutoFormatDia.h index 38a9ecb3..3e8020e7 100644 --- a/lib/kotext/KoAutoFormatDia.h +++ b/lib/kotext/KoAutoFormatDia.h @@ -121,7 +121,7 @@ protected: TQPushButton *pbSimpleQuote1, *pbSimpleQuote2, *pbSimpleDefault; TQPushButton *pbChangeFormat, *pbClearFormat; KCharSelect *charselect; - KoAutoFormatLineEdit *m_tqfind, *m_tqreplace; + KoAutoFormatLineEdit *m_find, *m_replace; KListView *m_pListView; TQChar oSimpleBegin, oSimpleEnd; @@ -149,8 +149,8 @@ protected slots: void slotItemRenamed(TQListViewItem * item, const TQString & newText, int column); void slotRemoveEntry(); void slotEditEntry(); - void slottqfind( const TQString & ); - void slottqfind2( const TQString & ); + void slotfind( const TQString & ); + void slotfind2( const TQString & ); void chooseSpecialChar1(); void chooseSpecialChar2(); void chooseDoubleQuote1(); diff --git a/lib/kotext/KoCompletionDia.cpp b/lib/kotext/KoCompletionDia.cpp index f2860cf1..6289675d 100644 --- a/lib/kotext/KoCompletionDia.cpp +++ b/lib/kotext/KoCompletionDia.cpp @@ -130,7 +130,7 @@ void KoCompletion::slotAddCompletionEntry() { TQString const newWord = KInputDialog::getText( i18n("Add Completion Entry"), i18n("Enter entry:"), TQString(), &ok, this ).lower(); if ( ok ) { - if ( !m_listCompletion.tqcontains( newWord )) + if ( !m_listCompletion.contains( newWord )) { m_listCompletion.append( newWord ); m_lbListCompletion->insertItem( newWord ); diff --git a/lib/kotext/KoComplexText.cpp b/lib/kotext/KoComplexText.cpp index e3196085..4239bf47 100644 --- a/lib/kotext/KoComplexText.cpp +++ b/lib/kotext/KoComplexText.cpp @@ -120,7 +120,7 @@ static inline const TQChar *prevChar( const TQString &str, int pos ) pos--; ch--; } - return &TQChar::tqreplacement; + return &TQChar::replacement; } static inline const TQChar *nextChar( const TQString &str, int pos) @@ -136,7 +136,7 @@ static inline const TQChar *nextChar( const TQString &str, int pos) pos++; ch++; } - return &TQChar::tqreplacement; + return &TQChar::replacement; } static inline bool prevVisualCharJoins( const TQString &str, int pos) diff --git a/lib/kotext/KoCreateStyleDia.cpp b/lib/kotext/KoCreateStyleDia.cpp index cf9130af..648dc252 100644 --- a/lib/kotext/KoCreateStyleDia.cpp +++ b/lib/kotext/KoCreateStyleDia.cpp @@ -42,7 +42,7 @@ KoCreateStyleDia::KoCreateStyleDia( const TQStringList & _list, TQWidget *tqpare void KoCreateStyleDia::slotOk() { - if ( styleList.tqfindIndex(m_styleName->text() ) != -1 ) + if ( styleList.findIndex(m_styleName->text() ) != -1 ) { KMessageBox::error(this, i18n("Name already exists! Please choose another name")); m_styleName->clear(); diff --git a/lib/kotext/KoCustomVariablesDia.cpp b/lib/kotext/KoCustomVariablesDia.cpp index af709678..fd28bfe6 100644 --- a/lib/kotext/KoCustomVariablesDia.cpp +++ b/lib/kotext/KoCustomVariablesDia.cpp @@ -218,7 +218,7 @@ KoCustomVariablesDia::KoCustomVariablesDia( TQWidget *tqparent, const TQPtrList< KoVariable *var = it.current(); if ( var->type() == VT_CUSTOM ) { KoCustomVariable *v = (KoCustomVariable*)var; - if ( !lst.tqcontains( v->name() ) ) { + if ( !lst.contains( v->name() ) ) { lst.append( v->name() ); KoCustomVariablesListItem *item = new KoCustomVariablesListItem( list ); item->setVariable( v ); diff --git a/lib/kotext/KoLanguageTab.cpp b/lib/kotext/KoLanguageTab.cpp index 47fb045e..2ec9fede 100644 --- a/lib/kotext/KoLanguageTab.cpp +++ b/lib/kotext/KoLanguageTab.cpp @@ -42,7 +42,7 @@ KoLanguageTab::KoLanguageTab( KSpell2::Broker::Ptr broker, TQWidget* tqparent, c TQStringList::ConstIterator itTag = langTags.begin(); for ( ; itName != langNames.end() && itTag != langTags.end(); ++itName, ++itTag ) { - if ( spellCheckLanguages.tqfind( *itTag ) != spellCheckLanguages.end() ) + if ( spellCheckLanguages.find( *itTag ) != spellCheckLanguages.end() ) languageKComboBox->insertItem( SmallIcon( "spellcheck" ), *itName ); else languageKComboBox->insertItem( *itName ); diff --git a/lib/kotext/KoParagDia.cpp b/lib/kotext/KoParagDia.cpp index 65cc1f2e..3ee02617 100644 --- a/lib/kotext/KoParagDia.cpp +++ b/lib/kotext/KoParagDia.cpp @@ -1454,7 +1454,7 @@ void KoParagDecorationWidget::slotPressEvent(TQMouseEvent *_ev) TQRect r = wPreview->contentsRect(); TQRect rect(r.x() + OFFSETX, r.y() + OFFSETY, r.width() - OFFSETX, r.y() + OFFSETY + Ko_SPACE); - if(rect.tqcontains(TQPoint(_ev->x(),_ev->y()))) + if(rect.contains(TQPoint(_ev->x(),_ev->y()))) { clickedBorderPreview( m_topBorder, KoBorder::TopBorder, wDeco->bBorderTop ); @@ -1462,7 +1462,7 @@ void KoParagDecorationWidget::slotPressEvent(TQMouseEvent *_ev) rect.setCoords(r.x() + OFFSETX, r.height() - OFFSETY - Ko_SPACE, r.width() - OFFSETX, r.height() - OFFSETY); - if(rect.tqcontains(TQPoint(_ev->x(),_ev->y()))) + if(rect.contains(TQPoint(_ev->x(),_ev->y()))) { clickedBorderPreview( m_bottomBorder, KoBorder::BottomBorder, wDeco->bBorderBottom ); @@ -1470,7 +1470,7 @@ void KoParagDecorationWidget::slotPressEvent(TQMouseEvent *_ev) rect.setCoords(r.x() + OFFSETX, r.y() + OFFSETY, r.x() + Ko_SPACE + OFFSETX, r.height() - OFFSETY); - if(rect.tqcontains(TQPoint(_ev->x(),_ev->y()))) + if(rect.contains(TQPoint(_ev->x(),_ev->y()))) { clickedBorderPreview( m_leftBorder, KoBorder::LeftBorder, wDeco->bBorderLeft ); @@ -1478,7 +1478,7 @@ void KoParagDecorationWidget::slotPressEvent(TQMouseEvent *_ev) rect.setCoords(r.width() - OFFSETX - Ko_SPACE, r.y() + OFFSETY, r.width() - OFFSETX, r.height() - OFFSETY); - if(rect.tqcontains(TQPoint(_ev->x(),_ev->y()))) + if(rect.contains(TQPoint(_ev->x(),_ev->y()))) { clickedBorderPreview( m_rightBorder, KoBorder::RightBorder, wDeco->bBorderRight ); @@ -1960,7 +1960,7 @@ void KoParagTabulatorsWidget::newClicked() { newTab.ptWidth=m_tabList[selected].ptWidth; m_tabList.insert(m_tabList.at(selected), newTab); lstTabs->insertItem( tabToString(newTab), selected); - lstTabs->setCurrentItem(lstTabs->tqfindItem(tabToString(newTab))); + lstTabs->setCurrentItem(lstTabs->findItem(tabToString(newTab))); sortLists(); } } @@ -2113,7 +2113,7 @@ void KoParagTabulatorsWidget::sortLists() { for ( ; it != m_tabList.end(); ++it ) lstTabs->insertItem( KoUnit::toUserStringValue( (*it).ptPos, m_unit ) ); - lstTabs->setCurrentItem(lstTabs->tqfindItem(curValue)); + lstTabs->setCurrentItem(lstTabs->findItem(curValue)); noSignals=false; } diff --git a/lib/kotext/KoParagLayout.cpp b/lib/kotext/KoParagLayout.cpp index 129c4d4a..fd1a9453 100644 --- a/lib/kotext/KoParagLayout.cpp +++ b/lib/kotext/KoParagLayout.cpp @@ -488,7 +488,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex tqlayout.lineSpacingType = KoParagLayout::LS_ONEANDHALF; else if( value=="200%") tqlayout.lineSpacingType = KoParagLayout::LS_DOUBLE; - else if ( value.tqfind('%') > -1 ) + else if ( value.find('%') > -1 ) { value = value.remove( '%' ); double percent = value.toDouble(); diff --git a/lib/kotext/KoParagStyle.cpp b/lib/kotext/KoParagStyle.cpp index f44bcd59..96209cba 100644 --- a/lib/kotext/KoParagStyle.cpp +++ b/lib/kotext/KoParagStyle.cpp @@ -220,7 +220,7 @@ TQString KoParagStyle::saveStyle( KoGenStyles& genStyles, int styleType, const T // try to preserve existing internal name, if it looks adequate (no spaces) // ## TODO: check XML-Schemacs NCName conformity - bool nameIsConform = !m_name.isEmpty() && m_name.tqfind( ' ' ) == -1; + bool nameIsConform = !m_name.isEmpty() && m_name.find( ' ' ) == -1; TQString newName; if ( nameIsConform ) newName = genStyles.lookup( gs, m_name, KoGenStyles::DontForceNumbering ); diff --git a/lib/kotext/KoRichText.cpp b/lib/kotext/KoRichText.cpp index 157f79a8..5df4c93d 100644 --- a/lib/kotext/KoRichText.cpp +++ b/lib/kotext/KoRichText.cpp @@ -381,10 +381,10 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko TQString s( str ); #if defined(TQ_WS_WIN) if ( checkNewLine ) - s = s.tqreplace( TQRegExp( "\\r" ), "" ); + s = s.replace( TQRegExp( "\\r" ), "" ); #endif if ( checkNewLine ) - justInsert = s.tqfind( '\n' ) == -1; + justInsert = s.find( '\n' ) == -1; if ( justInsert ) { string->insert( idx, s ); if ( formatting ) { @@ -1635,7 +1635,7 @@ void KoTextParag::insertLineStart( int index, KoTextParagLineStart *ls ) // we could loop forever (e.g. if one char is wider than the page...) #ifndef NDEBUG TQMap<int, KoTextParagLineStart*>::Iterator it; - if ( ( it = lineStarts.tqfind( index ) ) == lineStarts.end() ) { + if ( ( it = lineStarts.find( index ) ) == lineStarts.end() ) { lineStarts.insert( index, ls ); } else { kdWarning(32500) << "insertLineStart: there's already a line for char index=" << index << endl; @@ -1742,10 +1742,10 @@ void KoTextFlow::unregisterFloatingItem( KoTextCustomItem* item ) void KoTextFlow::registerFloatingItem( KoTextCustomItem* item ) { if ( item->placement() == KoTextCustomItem::PlaceRight ) { - if ( !rightItems.tqcontains( item ) ) + if ( !rightItems.contains( item ) ) rightItems.append( item ); } else if ( item->placement() == KoTextCustomItem::PlaceLeft && - !leftItems.tqcontains( item ) ) { + !leftItems.contains( item ) ) { leftItems.append( item ); } } diff --git a/lib/kotext/KoSearchDia.cpp b/lib/kotext/KoSearchDia.cpp index 915ef4f7..0acd88cc 100644 --- a/lib/kotext/KoSearchDia.cpp +++ b/lib/kotext/KoSearchDia.cpp @@ -100,11 +100,11 @@ void KoSearchContextUI::setCtxHistory( const TQStringList & history ) m_ctx->m_strings = history; } -KoSearchDia::KoSearchDia( TQWidget * tqparent,const char *name, KoSearchContext *tqfind, bool hasSelection, bool hasCursor ) - : KFindDialog( tqparent, name, tqfind->m_options, tqfind->m_strings ) +KoSearchDia::KoSearchDia( TQWidget * tqparent,const char *name, KoSearchContext *find, bool hasSelection, bool hasCursor ) + : KFindDialog( tqparent, name, find->m_options, find->m_strings ) { // The dialog extension. - m_findUI = new KoSearchContextUI( tqfind, findExtension() ); + m_findUI = new KoSearchContextUI( find, findExtension() ); setHasSelection(hasSelection); setHasCursor(hasCursor); } @@ -119,12 +119,12 @@ void KoSearchDia::slotOk() m_findUI->setCtxHistory( findHistory() ); } -KoReplaceDia::KoReplaceDia( TQWidget *tqparent, const char *name, KoSearchContext *tqfind, KoSearchContext *tqreplace, bool hasSelection, bool hasCursor ) - : KReplaceDialog( tqparent, name, tqfind->m_options, tqfind->m_strings, tqreplace->m_strings ) +KoReplaceDia::KoReplaceDia( TQWidget *tqparent, const char *name, KoSearchContext *find, KoSearchContext *replace, bool hasSelection, bool hasCursor ) + : KReplaceDialog( tqparent, name, find->m_options, find->m_strings, replace->m_strings ) { // The dialog extension. - m_findUI = new KoSearchContextUI( tqfind, findExtension() ); - m_replaceUI = new KoSearchContextUI( tqreplace, replaceExtension() ); + m_findUI = new KoSearchContextUI( find, findExtension() ); + m_replaceUI = new KoSearchContextUI( replace, replaceExtension() ); // Look whether we have a selection, and/or a cursor setHasSelection(hasSelection); setHasCursor(hasCursor); @@ -147,8 +147,8 @@ void KoReplaceDia::slotOk() KoFindReplace::KoFindReplace( TQWidget * tqparent, KoSearchDia * dialog, const TQValueList<KoTextObject *> & lstObject, KoTextView* textView ) - : m_tqfind( new KoTextFind( dialog->pattern(), dialog->options(), this, tqparent ) ), - m_tqreplace( 0L ), + : m_find( new KoTextFind( dialog->pattern(), dialog->options(), this, tqparent ) ), + m_replace( 0L ), m_searchContext( *dialog->searchContext() ), m_replaceContext(), m_searchContextEnabled( dialog->optionSelected() ), @@ -158,12 +158,12 @@ KoFindReplace::KoFindReplace( TQWidget * tqparent, KoSearchDia * dialog, const T m_textIterator( lstObject, textView, dialog->options() ), m_lastTextObjectHighlighted( 0 ) { - connectFind( m_tqfind ); + connectFind( m_find ); } KoFindReplace::KoFindReplace( TQWidget * tqparent, KoReplaceDia * dialog, const TQValueList<KoTextObject *> & lstObject, KoTextView* textView ) - : m_tqfind( 0L ), - m_tqreplace( new KoTextReplace( dialog->pattern(), dialog->replacement(), dialog->options(), this, tqparent ) ), + : m_find( 0L ), + m_replace( new KoTextReplace( dialog->pattern(), dialog->replacement(), dialog->options(), this, tqparent ) ), m_searchContext( *dialog->searchContext() ), m_replaceContext( *dialog->replaceContext() ), m_searchContextEnabled( dialog->optionFindSelected() ), @@ -173,23 +173,23 @@ KoFindReplace::KoFindReplace( TQWidget * tqparent, KoReplaceDia * dialog, const m_textIterator( lstObject, textView, dialog->options() ), m_lastTextObjectHighlighted( 0 ) { - connectFind( m_tqreplace ); - connect( m_tqreplace, TQT_SIGNAL( tqreplace( const TQString &, int , int, int ) ), - this, TQT_SLOT( tqreplace( const TQString &, int , int,int ) ) ); + connectFind( m_replace ); + connect( m_replace, TQT_SIGNAL( replace( const TQString &, int , int, int ) ), + this, TQT_SLOT( replace( const TQString &, int , int,int ) ) ); } -void KoFindReplace::connectFind( KFind* tqfind ) +void KoFindReplace::connectFind( KFind* find ) { - connect( tqfind, TQT_SIGNAL( optionsChanged() ), + connect( find, TQT_SIGNAL( optionsChanged() ), this, TQT_SLOT( optionsChanged() ) ); - connect( tqfind, TQT_SIGNAL( dialogClosed() ), + connect( find, TQT_SIGNAL( dialogClosed() ), this, TQT_SLOT( dialogClosed() ) ); // Connect highlight signal to code which handles highlighting // of found text. - connect( tqfind, TQT_SIGNAL( highlight( const TQString &, int, int ) ), + connect( find, TQT_SIGNAL( highlight( const TQString &, int, int ) ), this, TQT_SLOT( highlight( const TQString &, int, int ) ) ); // Connect findNext signal - called when pressing the button in the dialog - connect( tqfind, TQT_SIGNAL( findNext() ), + connect( find, TQT_SIGNAL( findNext() ), this, TQT_SLOT( slotFindNext() ) ); m_bInit = true; m_currentParagraphModified = false; @@ -204,8 +204,8 @@ KoFindReplace::~KoFindReplace() { removeHighlight(); //kdDebug(32500) << "KoFindReplace::~KoFindReplace" << endl; - delete m_tqfind; - delete m_tqreplace; + delete m_find; + delete m_replace; } void KoFindReplace::optionsChanged() @@ -270,11 +270,11 @@ bool KoFindReplace::findNext() m_currentParagraphModified = false; } - if ( m_tqfind ) + if ( m_find ) // Let KFind inspect the text fragment, and display a dialog if a match is found - res = m_tqfind->find(); + res = m_find->find(); else - res = m_tqreplace->replace(); + res = m_replace->replace(); } //kdDebug(32500) << k_funcinfo << "we're done. res=" << res << endl; @@ -286,17 +286,17 @@ bool KoFindReplace::findNext() m_textIterator.setOptions( m_textIterator.options() & ~KFindDialog::FromCursor ); m_textIterator.restart(); m_bInit = true; - if ( m_tqfind ) - m_tqfind->resetCounts(); + if ( m_find ) + m_find->resetCounts(); else - m_tqreplace->resetCounts(); + m_replace->resetCounts(); return findNext(); } else { // done, close the 'find next' dialog - if ( m_tqfind ) - m_tqfind->closeFindNextDialog(); + if ( m_find ) + m_find->closeFindNextDialog(); else - m_tqreplace->closeReplaceNextDialog(); + m_replace->closeReplaceNextDialog(); } return false; } @@ -327,15 +327,15 @@ bool KoFindReplace::findPrevious() long KoFindReplace::options() const { - return m_tqfind ? m_tqfind->options() : m_tqreplace->options(); + return m_find ? m_find->options() : m_replace->options(); } void KoFindReplace::setOptions(long opt) { - if ( m_tqfind ) - m_tqfind->setOptions(opt); + if ( m_find ) + m_find->setOptions(opt); else - m_tqreplace->setOptions(opt); + m_replace->setOptions(opt); m_textIterator.setOptions( opt ); } @@ -354,19 +354,19 @@ void KoFindReplace::highlight( const TQString &, int matchingIndex, int matching m_lastTextObjectHighlighted->removeHighlight(true); m_lastTextObjectHighlighted = m_textIterator.currentTextObject(); //kdDebug(32500) << "KoFindReplace::highlight " << matchingIndex << "," << matchingLength << endl; - KDialogBase* dialog = m_tqfind ? m_tqfind->findNextDialog() : m_tqreplace->replaceNextDialog(); + KDialogBase* dialog = m_find ? m_find->findNextDialog() : m_replace->replaceNextDialog(); highlightPortion(m_textIterator.currentParag(), m_offset + matchingIndex, matchingLength, m_lastTextObjectHighlighted->textDocument(), dialog ); } -// slot connected to the 'tqreplace' signal -void KoFindReplace::tqreplace( const TQString &text, int matchingIndex, +// slot connected to the 'replace' signal +void KoFindReplace::replace( const TQString &text, int matchingIndex, int replacementLength, int matchedLength ) { //kdDebug(32500) << "KoFindReplace::replace m_offset=" << m_offset << " matchingIndex=" << matchingIndex << " matchedLength=" << matchedLength << " options=" << options() << endl; m_matchingIndex = matchingIndex; int index = m_offset + matchingIndex; - // highlight might not have happened (if 'prompt on tqreplace' is off) + // highlight might not have happened (if 'prompt on replace' is off) if ( (options() & KReplaceDialog::PromptOnReplace) == 0 ) highlight( text, matchingIndex, matchedLength ); @@ -493,19 +493,19 @@ KMacroCommand* KoFindReplace::macroCommand() void KoFindReplace::setActiveWindow() { - KDialogBase* dialog = m_tqfind ? m_tqfind->findNextDialog() : m_tqreplace->replaceNextDialog(); + KDialogBase* dialog = m_find ? m_find->findNextDialog() : m_replace->replaceNextDialog(); if ( dialog ) dialog->setActiveWindow(); } /*int KoFindReplace::numMatches() const { - return m_tqfind->numMatches(); + return m_find->numMatches(); } int KoFindReplace::numReplacements() const { - return m_tqreplace->numReplacements(); + return m_replace->numReplacements(); }*/ //// @@ -921,10 +921,10 @@ bool KoFindReplace::validateMatch( const TQString & /*text*/, int index, int mat bool KoFindReplace::shouldRestart() { - if ( m_tqfind ) - return m_tqfind->shouldRestart( true /*since text is editable*/, m_doCounting ); + if ( m_find ) + return m_find->shouldRestart( true /*since text is editable*/, m_doCounting ); else - return m_tqreplace->shouldRestart( true /*since text is editable*/, m_doCounting ); + return m_replace->shouldRestart( true /*since text is editable*/, m_doCounting ); } #include "KoSearchDia.moc" diff --git a/lib/kotext/KoSearchDia.h b/lib/kotext/KoSearchDia.h index 56570f4d..49eb75d1 100644 --- a/lib/kotext/KoSearchDia.h +++ b/lib/kotext/KoSearchDia.h @@ -128,7 +128,7 @@ class KOTEXT_EXPORT KoSearchDia: TQ_OBJECT public: - KoSearchDia( TQWidget *tqparent, const char *name, KoSearchContext *tqfind, bool hasSelection, bool hasCursor ); + KoSearchDia( TQWidget *tqparent, const char *name, KoSearchContext *find, bool hasSelection, bool hasCursor ); KoSearchContext * searchContext() { return m_findUI->context(); } @@ -152,7 +152,7 @@ class KOTEXT_EXPORT KoReplaceDia: public: - KoReplaceDia( TQWidget *tqparent, const char *name, KoSearchContext *tqfind, KoSearchContext *tqreplace, bool hasSelection, bool hasCursor ); + KoReplaceDia( TQWidget *tqparent, const char *name, KoSearchContext *find, KoSearchContext *replace, bool hasSelection, bool hasCursor ); KoSearchContext * searchContext() { return m_findUI->context(); } @@ -201,8 +201,8 @@ private: }; /** - * This class implements the 'tqfind' functionality ( the "search next, prompt" loop ) - * and the 'tqreplace' functionality. Same class, to allow centralizing the findNext() code. + * This class implements the 'find' functionality ( the "search next, prompt" loop ) + * and the 'replace' functionality. Same class, to allow centralizing the findNext() code. */ class KOTEXT_EXPORT KoFindReplace : public TQObject { @@ -217,7 +217,7 @@ public: return m_textIterator.currentParag(); } - bool isReplace() const { return m_tqreplace != 0L; } + bool isReplace() const { return m_replace != 0L; } bool shouldRestart(); @@ -252,10 +252,10 @@ protected: long options() const; void setOptions(long opt); void removeHighlight(); - bool needData() const { return m_tqfind ? m_tqfind->needData() : m_tqreplace->needData(); } + bool needData() const { return m_find ? m_find->needData() : m_replace->needData(); } void setData( const TQString& data, int startPos = -1 ) { - if ( m_tqfind ) m_tqfind->setData( data, startPos ); - else m_tqreplace->setData( data, startPos ); + if ( m_find ) m_find->setData( data, startPos ); + else m_replace->setData( data, startPos ); } protected slots: @@ -263,15 +263,15 @@ protected slots: void optionsChanged(); void dialogClosed(); void highlight( const TQString &text, int matchingIndex, int matchingLength ); - void tqreplace( const TQString &text, int replacementIndex, int replacedLength, int searchLength ); + void replace( const TQString &text, int replacementIndex, int replacedLength, int searchLength ); void slotCurrentParagraphModified( int, int, int ); private: - void connectFind( KFind* tqfind ); + void connectFind( KFind* find ); // Only one of those two will be set - KoTextFind * m_tqfind; - KoTextReplace * m_tqreplace; + KoTextFind * m_find; + KoTextReplace * m_replace; KoSearchContext m_searchContext; KoSearchContext m_replaceContext; @@ -282,7 +282,7 @@ private: KMacroCommand *m_macroCmd; int m_offset; - int m_matchingIndex; // can be removed once we use kde-3.2 (for ktqfind::index()) + int m_matchingIndex; // can be removed once we use kde-3.2 (for kfind::index()) KoTextIterator m_textIterator; diff --git a/lib/kotext/KoStyleManager.cpp b/lib/kotext/KoStyleManager.cpp index ef925289..e921ff1e 100644 --- a/lib/kotext/KoStyleManager.cpp +++ b/lib/kotext/KoStyleManager.cpp @@ -98,7 +98,7 @@ KoStyleManager::KoStyleManager( TQWidget *_parent, KoUnit::Unit unit, newTab->setWidget( new KoParagTabulatorsWidget( unit, -1, newTab ) ); addTab( newTab ); - TQListBoxItem * item = m_stylesList->tqfindItem( activeStyleName ); + TQListBoxItem * item = m_stylesList->findItem( activeStyleName ); m_stylesList->setCurrentItem( item ? m_stylesList->index(item) : 0 ); noSignals=false; @@ -475,7 +475,7 @@ void KoStyleManager::deleteStyle() { m_stylesList->removeItem(curItem); m_styleCombo->removeItem(curItem); - m_inheritCombo->listBox()->removeItem( m_inheritCombo->listBox()->index(m_inheritCombo->listBox()->tqfindItem(name ))); + m_inheritCombo->listBox()->removeItem( m_inheritCombo->listBox()->index(m_inheritCombo->listBox()->findItem(name ))); numStyles--; m_stylesList->setSelected( m_stylesList->currentItem(), true ); @@ -488,7 +488,7 @@ void KoStyleManager::moveUpStyle() save(); const TQString currentStyleName = m_currentStyle->name(); const TQString currentStyleDisplayName = m_stylesList->currentText(); - int pos2 = m_styleOrder.tqfindIndex( currentStyleName ); + int pos2 = m_styleOrder.findIndex( currentStyleName ); if ( pos2 != -1 ) { m_styleOrder.remove( m_styleOrder.at(pos2)); @@ -516,7 +516,7 @@ void KoStyleManager::moveDownStyle() save(); const TQString currentStyleName = m_currentStyle->name(); const TQString currentStyleDisplayName = m_stylesList->currentText(); - int pos2 = m_styleOrder.tqfindIndex( currentStyleName ); + int pos2 = m_styleOrder.findIndex( currentStyleName ); if ( pos2 != -1 ) { m_styleOrder.remove( m_styleOrder.at(pos2)); diff --git a/lib/kotext/KoTextCustomItem.cpp b/lib/kotext/KoTextCustomItem.cpp index f6eaf7de..4b567e0b 100644 --- a/lib/kotext/KoTextCustomItem.cpp +++ b/lib/kotext/KoTextCustomItem.cpp @@ -125,7 +125,7 @@ void CustomItemsMap::insertItems( const KoTextCursor & startCursor, int size ) KoTextCursor cursor( startCursor ); for ( int i = 0; i < size; ++i ) { - CustomItemsMap::Iterator it = tqfind( i ); + CustomItemsMap::Iterator it = find( i ); if ( it != end() ) { kdDebug(32500) << "CustomItemsMap::insertItems setting custom item " << it.data() << endl; diff --git a/lib/kotext/KoTextDocument.cpp b/lib/kotext/KoTextDocument.cpp index b5de2a73..de81299c 100644 --- a/lib/kotext/KoTextDocument.cpp +++ b/lib/kotext/KoTextDocument.cpp @@ -191,7 +191,7 @@ void KoTextDocument::setPlainText( const TQString &text ) //oText = text; int lastNl = 0; - int nl = text.tqfind( '\n' ); + int nl = text.find( '\n' ); if ( nl == -1 ) { lParag = createParag( this, lParag, 0 ); if ( !fParag ) @@ -216,7 +216,7 @@ void KoTextDocument::setPlainText( const TQString &text ) if ( nl == 0xffffff ) break; lastNl = nl + 1; - nl = text.tqfind( '\n', nl + 1 ); + nl = text.find( '\n', nl + 1 ); if ( nl == -1 ) nl = 0xffffff; } @@ -283,7 +283,7 @@ void KoTextDocument::informParagraphDeleted( KoTextParag* parag ) void KoTextDocument::selectionStart( int id, int ¶gId, int &index ) { - TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id ); + TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return; KoTextDocumentSelection &sel = *it; @@ -293,7 +293,7 @@ void KoTextDocument::selectionStart( int id, int ¶gId, int &index ) KoTextCursor KoTextDocument::selectionStartCursor( int id) { - TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id ); + TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return KoTextCursor( this ); KoTextDocumentSelection &sel = *it; @@ -304,7 +304,7 @@ KoTextCursor KoTextDocument::selectionStartCursor( int id) KoTextCursor KoTextDocument::selectionEndCursor( int id) { - TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id ); + TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return KoTextCursor( this ); KoTextDocumentSelection &sel = *it; @@ -315,7 +315,7 @@ KoTextCursor KoTextDocument::selectionEndCursor( int id) void KoTextDocument::selectionEnd( int id, int ¶gId, int &index ) { - TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id ); + TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return; KoTextDocumentSelection &sel = *it; @@ -325,7 +325,7 @@ void KoTextDocument::selectionEnd( int id, int ¶gId, int &index ) bool KoTextDocument::isSelectionSwapped( int id ) { - TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id ); + TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return false; KoTextDocumentSelection &sel = *it; @@ -334,7 +334,7 @@ bool KoTextDocument::isSelectionSwapped( int id ) KoTextParag *KoTextDocument::selectionStart( int id ) { - TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id ); + TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return 0; KoTextDocumentSelection &sel = *it; @@ -345,7 +345,7 @@ KoTextParag *KoTextDocument::selectionStart( int id ) KoTextParag *KoTextDocument::selectionEnd( int id ) { - TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id ); + TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return 0; KoTextDocumentSelection &sel = *it; @@ -385,7 +385,7 @@ static void setSelectionEndHelper( int id, KoTextDocumentSelection &sel, KoTextC bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor ) { - TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id ); + TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return FALSE; KoTextDocumentSelection &sel = *it; @@ -532,7 +532,7 @@ void KoTextDocument::selectAll( int id ) bool KoTextDocument::removeSelection( int id ) { - TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id ); + TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return FALSE; @@ -584,7 +584,7 @@ bool KoTextDocument::removeSelection( int id ) TQString KoTextDocument::selectedText( int id, bool withCustom ) const { // ######## TODO: look at textFormat() and return rich text or plain text (like the text() method!) - TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.tqfind( id ); + TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.find( id ); if ( it == selections.end() ) return TQString(); @@ -696,7 +696,7 @@ TQString KoTextDocument::copySelection( KoXmlWriter& writer, KoSavingContext& co void KoTextDocument::setFormat( int id, const KoTextFormat *f, int flags ) { - TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.tqfind( id ); + TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.find( id ); if ( it == selections.end() ) return; @@ -735,7 +735,7 @@ void KoTextDocument::setFormat( int id, const KoTextFormat *f, int flags ) void KoTextDocument::removeSelectedText( int id, KoTextCursor *cursor ) { - TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id ); + TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return; @@ -813,7 +813,7 @@ KoTextCursor *KoTextDocument::redo( KoTextCursor *c ) return commandHistory->redo( c ); } -bool KoTextDocument::tqfind( const TQString &expr, bool cs, bool wo, bool forward, +bool KoTextDocument::find( const TQString &expr, bool cs, bool wo, bool forward, int *parag, int *index, KoTextCursor *cursor ) { KoTextParag *p = forward ? fParag : lParag; @@ -842,7 +842,7 @@ bool KoTextDocument::tqfind( const TQString &expr, bool cs, bool wo, bool forwar first = FALSE; for ( ;; ) { - int res = forward ? s.tqfind( expr, start, cs ) : s.tqfindRev( expr, start, cs ); + int res = forward ? s.find( expr, start, cs ) : s.findRev( expr, start, cs ); if ( res == -1 ) break; @@ -883,7 +883,7 @@ bool KoTextDocument::tqfind( const TQString &expr, bool cs, bool wo, bool forwar bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const { - TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.tqfind( selId ); + TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.find( selId ); if ( it == selections.end() ) return FALSE; @@ -900,7 +900,7 @@ bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const KoTextParag *p = startParag; while ( p ) { - if ( p->rect().tqcontains( pos ) ) { + if ( p->rect().contains( pos ) ) { bool inSel = FALSE; int selStart = p->selectionStart( selId ); int selEnd = p->selectionEnd( selId ); @@ -912,8 +912,8 @@ bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const if ( i == selEnd ) break; if ( p->at( i )->lineStart ) { - y = (*p->lineStarts.tqfind( i ))->y; - h = (*p->lineStarts.tqfind( i ))->h; + y = (*p->lineStarts.find( i ))->y; + h = (*p->lineStarts.find( i ))->h; } if ( pos.y() - p->rect().y() >= y && pos.y() - p->rect().y() <= y + h ) { if ( inSel && pos.x() >= p->at( i )->x && @@ -989,7 +989,7 @@ bool KoTextDocument::visitSelection( int selectionId, KoParagVisitor* visitor, b bool KoTextDocument::hasSelection( int id, bool visible ) const { - return ( selections.tqfind( id ) != selections.end() && + return ( selections.find( id ) != selections.end() && ( !visible || ( (KoTextDocument*)this )->selectionStartCursor( id ) != ( (KoTextDocument*)this )->selectionEndCursor( id ) ) ); diff --git a/lib/kotext/KoTextDocument.h b/lib/kotext/KoTextDocument.h index 44bb0001..1f7739aa 100644 --- a/lib/kotext/KoTextDocument.h +++ b/lib/kotext/KoTextDocument.h @@ -55,7 +55,7 @@ public: enum SelectionId { Standard = 0, InputMethodPreedit = 1, - HighlightSelection = 2, // used to highlight during search/tqreplace + HighlightSelection = 2, // used to highlight during search/replace Temp = 32000 // This selection must not be drawn, it's used e.g. by undo/redo to // remove multiple lines with removeSelectedText() }; @@ -135,7 +135,7 @@ public: KoTextFormatCollection *formatCollection() const; - bool tqfind( const TQString &expr, bool cs, bool wo, bool forward, int *parag, int *index, KoTextCursor *cursor ); + bool find( const TQString &expr, bool cs, bool wo, bool forward, int *parag, int *index, KoTextCursor *cursor ); //void setTextFormat( TQt::TextFormat f ); //TQt::TextFormat textFormat() const; diff --git a/lib/kotext/KoTextFormat.cpp b/lib/kotext/KoTextFormat.cpp index 5a1570ac..27556ed6 100644 --- a/lib/kotext/KoTextFormat.cpp +++ b/lib/kotext/KoTextFormat.cpp @@ -189,7 +189,7 @@ KoTextFormat::~KoTextFormat() // It should have been removed from the collection before being deleted. #ifndef NDEBUG if ( tqparent() && tqparent()->defaultFormat() ) // not when destroying the collection - assert( ! ( tqparent()->dict().tqfind( key() ) == this ) ); + assert( ! ( tqparent()->dict().find( key() ) == this ) ); // (has to be the same pointer, not only the same key) #endif delete d; @@ -645,7 +645,7 @@ void KoTextFormat::save( KoGenStyle& gs, KoSavingContext& context, KoTextFormat { TQString lang = m_language; TQString country; - const int pos = lang.tqfind( '_' ); + const int pos = lang.find( '_' ); if ( pos != -1 ) { country = lang.mid( pos + 1 ); lang = lang.left( pos ); @@ -1737,7 +1737,7 @@ KoTextFormat *KoTextFormatCollection::format( const KoTextFormat *f ) } #endif - KoTextFormat *fm = cKey.tqfind( f->key() ); + KoTextFormat *fm = cKey.find( f->key() ); if ( fm ) { #ifdef DEBUG_COLLECTION kdDebug(32500) << " format(f) need '" << f->key() << "', normal case!" << endl; @@ -1783,7 +1783,7 @@ KoTextFormat *KoTextFormatCollection::format( const KoTextFormat *of, const KoTe #endif cres->copyFormat( *nf, flags ); - KoTextFormat *fm = cKey.tqfind( cres->key() ); + KoTextFormat *fm = cKey.find( cres->key() ); if ( !fm ) { #ifdef DEBUG_COLLECTION kdDebug(32500) << " format(of,nf,flags) mix of '" << of->key() << "' and '" << nf->key() << ", worst case!" << endl; @@ -1814,7 +1814,7 @@ KoTextFormat *KoTextFormatCollection::format( const TQFont &f, const TQColor &c, } TQString key = KoTextFormat::getKey( f, c, FALSE, KoTextFormat::AlignNormal ); - cachedFormat = cKey.tqfind( key ); + cachedFormat = cKey.find( key ); cfont = f; ccol = c; diff --git a/lib/kotext/KoTextIterator.cpp b/lib/kotext/KoTextIterator.cpp index ed320ed1..73468f7e 100644 --- a/lib/kotext/KoTextIterator.cpp +++ b/lib/kotext/KoTextIterator.cpp @@ -89,7 +89,7 @@ void KoTextIterator::init( const TQValueList<KoTextObject *> & lstObjects, KoTex m_lstObjects.pop_front(); m_lstObjects.push_back( textobj ); if ( m_lstObjects.first() == initialFirst ) { // safety - kdWarning(32500) << "Didn't manage to tqfind " << textView->textObject() << " in the list of textobjects!!!" << endl; + kdWarning(32500) << "Didn't manage to find " << textView->textObject() << " in the list of textobjects!!!" << endl; break; } } @@ -99,7 +99,7 @@ void KoTextIterator::init( const TQValueList<KoTextObject *> & lstObjects, KoTex m_lstObjects.pop_back(); m_lstObjects.push_front( textobj ); if ( m_lstObjects.first() == initialFirst ) { // safety - kdWarning(32500) << "Didn't manage to tqfind " << textView->textObject() << " in the list of textobjects!!!" << endl; + kdWarning(32500) << "Didn't manage to find " << textView->textObject() << " in the list of textobjects!!!" << endl; break; } } diff --git a/lib/kotext/KoTextObject.cpp b/lib/kotext/KoTextObject.cpp index 6289482b..d9a2f054 100644 --- a/lib/kotext/KoTextObject.cpp +++ b/lib/kotext/KoTextObject.cpp @@ -508,7 +508,7 @@ void KoTextObject::doKeyboardAction( KoTextCursor * cursor, KoTextFormat * & /*c if ( cursor->parag() ) { TQString last_line = cursor->parag()->toString(); - last_line.remove(0,last_line.tqfind(' ')+1); + last_line.remove(0,last_line.find(' ')+1); if( last_line.isEmpty() && cursor->parag()->counter() && cursor->parag()->counter()->numbering() == KoParagCounter::NUM_LIST ) //if the previous line the in paragraph is empty { @@ -635,7 +635,7 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, clearUndoRedoInfo(); checkUndoRedoInfo( cursor, UndoRedoInfo::Insert ); if ( !undoRedoInfo.valid() ) { - if ( !commandName.isNull() ) // see tqreplace-selection + if ( !commandName.isNull() ) // see replace-selection newPlaceHolderCommand( commandName ); undoRedoInfo.id = cursor->parag()->paragId(); undoRedoInfo.index = cursor->index(); @@ -726,7 +726,7 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, selectionChangedNotify(); // does the tqrepaint } if ( !customItemsMap.isEmpty() - && !commandName.isNull() /* see tqreplace-selection; #139890 */ ) { + && !commandName.isNull() /* see replace-selection; #139890 */ ) { clearUndoRedoInfo(); } @@ -749,7 +749,7 @@ void KoTextObject::pasteText( KoTextCursor * cursor, const TQString & text, KoTe TQString t = text; // Need to convert CRLF to NL TQRegExp crlf( TQString::tqfromLatin1("\r\n") ); - t.tqreplace( crlf, TQChar('\n') ); + t.replace( crlf, TQChar('\n') ); // Convert non-printable chars for ( int i=0; (uint) i<t.length(); i++ ) { if ( t[ i ] < ' ' && t[ i ] != '\n' && t[ i ] != '\t' ) @@ -949,7 +949,7 @@ void KoTextObject::applyStyleChange( KoStyleChangeDefMap changed ) KoTextParag *p = textdoc->firstParag(); while ( p ) { - KoStyleChangeDefMap::Iterator it = changed.tqfind( p->style() ); + KoStyleChangeDefMap::Iterator it = changed.find( p->style() ); if ( it != changed.end() ) { if ( (*it).paragLayoutChanged == -1 || (*it).formatChanged == -1 ) // Style has been deleted @@ -1592,7 +1592,7 @@ KCommand* KoTextObject::replaceSelectionCommand( KoTextCursor * cursor, const TQ if ( protectContent() ) return 0L; Q_ASSERT( ( insertFlags & DoNotRemoveSelected ) == 0 ); // nonsensical - const bool tqrepaint = ( insertFlags & DoNotRepaint ) == 0; // DoNotRepaint is set during search/tqreplace + const bool tqrepaint = ( insertFlags & DoNotRepaint ) == 0; // DoNotRepaint is set during search/replace if ( tqrepaint ) emit hideCursor(); // This could be improved to use a macro command only when there's a selection to remove. @@ -1699,7 +1699,7 @@ void KoTextObject::selectionChangedNotify( bool enableActions /* = true */) void KoTextObject::setViewArea( TQWidget* w, int maxY ) { - m_mapViewAreas.tqreplace( w, maxY ); + m_mapViewAreas.replace( w, maxY ); } void KoTextObject::setLastFormattedParag( KoTextParag *parag ) @@ -2045,9 +2045,9 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty { TQChar prev = text.tqat(TQMAX(i-1,0)); if(i==0 || prev == ' ' || prev == '\n' || prev == '\t') - text=text.tqreplace(i, 1, text.tqat(i).upper() ); + text=text.replace(i, 1, text.tqat(i).upper() ); else - text=text.tqreplace(i, 1, text.tqat(i).lower() ); + text=text.replace(i, 1, text.tqat(i).lower() ); } } break; @@ -2059,7 +2059,7 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty repl=repl.upper(); else if(text.tqat(i).lower()!=text.tqat(i)) repl=repl.lower(); - text=text.tqreplace(i, 1, repl ); + text=text.replace(i, 1, repl ); } break; case KoChangeCaseDia::SentenceCase: @@ -2069,7 +2069,7 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty { TQChar prev = text.at(TQMAX(i-1,0)); if(i==0 || prev == '\n' ||prev.isPunct()) - text=text.tqreplace(i, 1, text.tqat(i).upper() ); + text=text.replace(i, 1, text.tqat(i).upper() ); } } break; @@ -2343,21 +2343,21 @@ bool KoTextObject::statistics( TQProgressDialog *progress, ulong & charsWithSpac TQStringList syls = TQStringList::split(re, word); int word_syllables = 0; for ( TQStringList::Iterator it = subs_syl.begin(); it != subs_syl.end(); ++it ) { - if( word.tqfind(*it, 0, false) != -1 ) + if( word.find(*it, 0, false) != -1 ) word_syllables--; } for ( TQStringList::Iterator it = subs_syl_regexp.begin(); it != subs_syl_regexp.end(); ++it ) { re.setPattern(*it); - if( word.tqfind(re) != -1 ) + if( word.find(re) != -1 ) word_syllables--; } for ( TQStringList::Iterator it = add_syl.begin(); it != add_syl.end(); ++it ) { - if( word.tqfind(*it, 0, false) != -1 ) + if( word.find(*it, 0, false) != -1 ) word_syllables++; } for ( TQStringList::Iterator it = add_syl_regexp.begin(); it != add_syl_regexp.end(); ++it ) { re.setPattern(*it); - if( word.tqfind(re) != -1 ) + if( word.find(re) != -1 ) word_syllables++; } word_syllables += syls.count(); @@ -2375,11 +2375,11 @@ bool KoTextObject::statistics( TQProgressDialog *progress, ulong & charsWithSpac s = s + "."; } re.setPattern("[.?!]+"); // count "..." as only one "." - s.tqreplace(re, "."); + s.replace(re, "."); re.setPattern("\\d\\.\\d"); // don't count floating point numbers as sentences - s.tqreplace(re, "0,0"); + s.replace(re, "0,0"); re.setPattern("[A-Z]\\.+"); // don't count "U.S.A." as three sentences - s.tqreplace(re, "*"); + s.replace(re, "*"); for ( uint i = 0 ; i < s.length() ; ++i ) { TQChar ch = s[i]; diff --git a/lib/kotext/KoTextObject.h b/lib/kotext/KoTextObject.h index e1519ff4..a463d0fc 100644 --- a/lib/kotext/KoTextObject.h +++ b/lib/kotext/KoTextObject.h @@ -305,7 +305,7 @@ public: bool removeSelected ); void selectAll( bool select ); - /** Highlighting support (for search/tqreplace, spellchecking etc.). + /** Highlighting support (for search/replace, spellchecking etc.). * Don't forget to ensure the paragraph is visible. */ void highlightPortion( KoTextParag * parag, int index, int length, bool tqrepaint ); diff --git a/lib/kotext/KoTextParag.cpp b/lib/kotext/KoTextParag.cpp index f516b7ca..633bdb58 100644 --- a/lib/kotext/KoTextParag.cpp +++ b/lib/kotext/KoTextParag.cpp @@ -510,7 +510,7 @@ KoTextStringChar *KoTextParag::lineStartOfChar( int i, int *index, int *line ) c --l; } - kdWarning(32500) << "KoTextParag::lineStartOfChar: couldn't tqfind " << i << endl; + kdWarning(32500) << "KoTextParag::lineStartOfChar: couldn't find " << i << endl; return 0; } @@ -537,7 +537,7 @@ KoTextStringChar *KoTextParag::lineStartOfLine( int line, int *index ) const return &str->at( i ); } - kdWarning(32500) << "KoTextParag::lineStartOfLine: couldn't tqfind " << line << endl; + kdWarning(32500) << "KoTextParag::lineStartOfLine: couldn't find " << line << endl; return 0; } @@ -705,7 +705,7 @@ TQChar::Direction KoTextParag::direction() const void KoTextParag::setSelection( int id, int start, int end ) { - TQMap<int, KoTextParagSelection>::ConstIterator it = selections().tqfind( id ); + TQMap<int, KoTextParagSelection>::ConstIterator it = selections().find( id ); if ( it != mSelections->end() ) { if ( start == ( *it ).start && end == ( *it ).end ) return; @@ -731,7 +731,7 @@ int KoTextParag::selectionStart( int id ) const { if ( !mSelections ) return -1; - TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->tqfind( id ); + TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id ); if ( it == mSelections->end() ) return -1; return ( *it ).start; @@ -741,7 +741,7 @@ int KoTextParag::selectionEnd( int id ) const { if ( !mSelections ) return -1; - TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->tqfind( id ); + TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id ); if ( it == mSelections->end() ) return -1; return ( *it ).end; @@ -751,7 +751,7 @@ bool KoTextParag::hasSelection( int id ) const { if ( !mSelections ) return FALSE; - TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->tqfind( id ); + TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id ); if ( it == mSelections->end() ) return FALSE; return ( *it ).start != ( *it ).end || length() == 1; @@ -761,7 +761,7 @@ bool KoTextParag::fullSelected( int id ) const { if ( !mSelections ) return FALSE; - TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->tqfind( id ); + TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id ); if ( it == mSelections->end() ) return FALSE; return ( *it ).start == 0 && ( *it ).end == str->length() - 1; @@ -1509,7 +1509,7 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText int xstart, xend = 0; TQString qstr = str->toString(); - qstr.tqreplace( TQChar(0x00a0U), ' ' ); // Not all fonts have non-breakable-space glyph + qstr.replace( TQChar(0x00a0U), ' ' ); // Not all fonts have non-breakable-space glyph const int nSels = doc ? doc->numSelections() : 1; TQMemArray<int> selectionStarts( nSels ); @@ -1927,7 +1927,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s painter.drawText( startX, posY, str, start, len, dir ); } } - if ( str[ start ] == '\t' && m_tabCache.tqcontains( start ) ) { + if ( str[ start ] == '\t' && m_tabCache.contains( start ) ) { painter.save(); KoTextZoomHandler * zh = textDocument()->paintingZoomHandler(); const KoTabulator& tab = m_layout.tabList()[ m_tabCache[ start ] ]; @@ -2381,7 +2381,7 @@ void KoTextParag::printRTDebug( int info ) static const char * const tabtype[] = { "T_LEFT", "T_CENTER", "T_RIGHT", "T_DEC_PNT", "error!!!" }; KoTabulatorList tabList = m_layout.tabList(); if ( tabList.isEmpty() ) { - if ( str->toString().tqfind( '\t' ) != -1 ) + if ( str->toString().find( '\t' ) != -1 ) kdDebug(32500) << "Tab width: " << textDocument()->tabStopWidth() << endl; } else { KoTabulatorList::Iterator it = tabList.begin(); diff --git a/lib/kotext/KoTextView.cpp b/lib/kotext/KoTextView.cpp index cea0fae1..32e82b73 100644 --- a/lib/kotext/KoTextView.cpp +++ b/lib/kotext/KoTextView.cpp @@ -1095,7 +1095,7 @@ TQPtrList<KAction> KoTextView::dataToolActionList(KInstance * instance, const TQ if ( textObject()->hasSelection() ) { text = textObject()->selectedText(); - if ( text.tqfind(' ') == -1 && text.tqfind('\t') == -1 && text.tqfind(KoTextObject::customItemChar()) == -1 ) + if ( text.find(' ') == -1 && text.find('\t') == -1 && text.find(KoTextObject::customItemChar()) == -1 ) { m_singleWord = true; } @@ -1103,7 +1103,7 @@ TQPtrList<KAction> KoTextView::dataToolActionList(KInstance * instance, const TQ { m_singleWord = false; //laurent : don't try to search thesaurus when we have a customItemChar. - if( text.tqfind(KoTextObject::customItemChar())!=-1) + if( text.find(KoTextObject::customItemChar())!=-1) text = TQString(); } } @@ -1166,13 +1166,13 @@ void KoTextView::slotToolActivated( const KDataToolInfo & info, const TQString & TQString mimetype = "application/x-qrichtext"; TQString datatype = "KoTextString"; // If unsupported, try text/plain - if ( !info.mimeTypes().tqcontains( mimetype ) ) + if ( !info.mimeTypes().contains( mimetype ) ) { mimetype = "text/plain"; datatype = TQSTRING_OBJECT_NAME_STRING; } // If unsupported (and if we have a single word indeed), try application/x-singleword - if ( !info.mimeTypes().tqcontains( mimetype ) && m_singleWord ) + if ( !info.mimeTypes().contains( mimetype ) && m_singleWord ) mimetype = "application/x-singleword"; kdDebug(32500) << "Running tool with datatype=" << datatype << " mimetype=" << mimetype << endl; diff --git a/lib/kotext/KoUserStyleCollection.h b/lib/kotext/KoUserStyleCollection.h index 9330ca4d..e9a771a9 100644 --- a/lib/kotext/KoUserStyleCollection.h +++ b/lib/kotext/KoUserStyleCollection.h @@ -61,7 +61,7 @@ public: /** * @return the index of @p style in the collection */ - int indexOf( KoUserStyle* style ) const { return m_styleList.tqfindIndex( style ); } + int indexOf( KoUserStyle* style ) const { return m_styleList.findIndex( style ); } /** * Return the list of all styles in the collection. diff --git a/lib/kotext/KoVariable.cpp b/lib/kotext/KoVariable.cpp index bd03ecf9..0f8edaf8 100644 --- a/lib/kotext/KoVariable.cpp +++ b/lib/kotext/KoVariable.cpp @@ -245,8 +245,8 @@ TQString KoVariableDateFormat::convert( const TQVariant& data ) const TQString tmp ( dateTime.toString(m_strFormat) ); const int month = dateTime.date().month(); - tmp.tqreplace("PPPP", KGlobal::locale()->calendar()->monthNamePossessive(month, false)); //long possessive month name - tmp.tqreplace("PPP", KGlobal::locale()->calendar()->monthNamePossessive(month, true)); //short possessive month name + tmp.replace("PPPP", KGlobal::locale()->calendar()->monthNamePossessive(month, false)); //long possessive month name + tmp.replace("PPP", KGlobal::locale()->calendar()->monthNamePossessive(month, true)); //short possessive month name return tmp; } @@ -508,7 +508,7 @@ void KoVariableCollection::registerVariable( KoVariable *var ) void KoVariableCollection::unregisterVariable( KoVariable *var ) { - variables.take( variables.tqfindRef( var ) ); + variables.take( variables.findRef( var ) ); } TQValueList<KoVariable *> KoVariableCollection::recalcVariables(int type) @@ -554,14 +554,14 @@ void KoVariableCollection::setVariableValue( const TQString &name, const TQStrin TQString KoVariableCollection::getVariableValue( const TQString &name ) const { - if ( !varValues.tqcontains( name ) ) + if ( !varValues.contains( name ) ) return i18n( "No value" ); return varValues[ name ]; } bool KoVariableCollection::customVariableExist(const TQString &varname) const { - return varValues.tqcontains( varname ); + return varValues.contains( varname ); } void KoVariableCollection::setVariableSelected(KoVariable * var) @@ -757,7 +757,7 @@ KoVariable* KoVariableCollection::loadOasisField( KoTextDocument* textdoc, const TQString dataStyleName = tag.attributeNS( KoXmlNS::style, "data-style-name", TQString() ); TQString dateFormat = "locale"; const KoOasisStyles::DataFormatsMap& map = context.oasisStyles().dataFormats(); - KoOasisStyles::DataFormatsMap::const_iterator it = map.tqfind( dataStyleName ); + KoOasisStyles::DataFormatsMap::const_iterator it = map.find( dataStyleName ); if ( it != map.end() ) dateFormat = (*it).formatStr; @@ -1402,7 +1402,7 @@ TQCString KoDateVariable::formatStr(int & correct) const TQString tmpString(config->readEntry("Last Used"+num)); if(tmpString.startsWith("locale")) continue; - else if(stringList.tqcontains(tmpString)) + else if(stringList.contains(tmpString)) continue; else if(!tmpString.isEmpty()) { @@ -1614,7 +1614,7 @@ TQCString KoTimeVariable::formatStr(int & _correct) TQString tmpString(config->readEntry("Last Used"+num)); if(tmpString.startsWith("locale")) continue; - else if(stringList.tqcontains(tmpString)) + else if(stringList.contains(tmpString)) continue; else if(!tmpString.isEmpty()) { @@ -2225,7 +2225,7 @@ void KoFieldVariable::recalc() case VST_FILENAMEWITHOUTEXTENSION: { TQString file=m_doc->url().fileName(); - int pos=file.tqfindRev("."); + int pos=file.findRev("."); if(pos !=-1) value=file.mid(0,pos); else diff --git a/lib/kotext/TimeFormatWidget.cpp b/lib/kotext/TimeFormatWidget.cpp index 187b2929..34fd7cb2 100644 --- a/lib/kotext/TimeFormatWidget.cpp +++ b/lib/kotext/TimeFormatWidget.cpp @@ -116,7 +116,7 @@ TQString TimeFormatWidget::resultString() { const TQString lookup(combo1->currentText()); const TQStringList listTranslated( KoVariableTimeFormat::staticTranslatedFormatPropsList() ); - const int index = listTranslated.tqfindIndex(lookup); + const int index = listTranslated.findIndex(lookup); if (index==-1) return (lookup); // Either costum or non-locale diff --git a/lib/kotext/kohyphen/hyphdicts/hyph_da.dic b/lib/kotext/kohyphen/hyphdicts/hyph_da.dic index 2a7154fb..77d0666f 100644 --- a/lib/kotext/kohyphen/hyphdicts/hyph_da.dic +++ b/lib/kotext/kohyphen/hyphdicts/hyph_da.dic @@ -540,7 +540,7 @@ le4mo 4leu l1f lfin4 -ltqfind5 +lfind5 l1go1 l3h li4ga diff --git a/lib/kotext/kohyphen/hyphdicts/hyph_hu.dic b/lib/kotext/kohyphen/hyphdicts/hyph_hu.dic index 8b1bdce4..2137b1f9 100644 --- a/lib/kotext/kohyphen/hyphdicts/hyph_hu.dic +++ b/lib/kotext/kohyphen/hyphdicts/hyph_hu.dic @@ -25668,7 +25668,7 @@ fimeg1 fi1me 2f1i2nas fi1na -2tqfind +2find fin1os2z fi1no fi2n1� diff --git a/lib/kotext/kohyphen/hyphdicts/hyph_nl.dic b/lib/kotext/kohyphen/hyphdicts/hyph_nl.dic index a5b6f05c..0a5b745b 100644 --- a/lib/kotext/kohyphen/hyphdicts/hyph_nl.dic +++ b/lib/kotext/kohyphen/hyphdicts/hyph_nl.dic @@ -3408,7 +3408,7 @@ fik4st fil4m3a film5on fi3lo -4tqfind +4find 3fini f3inj 4fink diff --git a/lib/kotext/kohyphen/kohyphen.cpp b/lib/kotext/kohyphen/kohyphen.cpp index 29d13c37..d8a0374e 100644 --- a/lib/kotext/kohyphen/kohyphen.cpp +++ b/lib/kotext/kohyphen/kohyphen.cpp @@ -71,7 +71,7 @@ KoHyphenator::KoHyphenator() for (uint i = 0; i < records.count(); i++) { TQDomNamedNodeMap attr = records.item(i).attributes(); - if (attr.tqcontains("lang") && attr.tqcontains("encoding")) { + if (attr.contains("lang") && attr.contains("encoding")) { TQString lang = attr.namedItem("lang").nodeValue(); TQString encoding = attr.namedItem("encoding").nodeValue(); #ifdef DEBUG_HYPHENATOR @@ -171,18 +171,18 @@ HyphenDict *KoHyphenator::dict(const TQString &_lang) const { TQString lang( _lang ); //only load dictionary when encoding info is present - if (encodings.tqfind(lang) == encodings.end()) + if (encodings.find(lang) == encodings.end()) { - int underscore = lang.tqfind('_'); + int underscore = lang.find('_'); if ( underscore > -1 ) { lang.truncate( underscore ); - if (encodings.tqfind(lang) == encodings.end()) + if (encodings.find(lang) == encodings.end()) throw KoHyphenatorException( TQString("No dictionary for %1").tqarg(lang) ); } else throw KoHyphenatorException( TQString("No dictionary for %1").tqarg(lang) ); } - if (dicts.tqfind(lang) == dicts.end()) + if (dicts.find(lang) == dicts.end()) { #ifdef DEBUG_HYPHENATOR kdDebug() << "Searching dictionary for '" << lang << "' language..." << endl; @@ -194,7 +194,7 @@ HyphenDict *KoHyphenator::dict(const TQString &_lang) const kdDebug() << "Loading dictionary for '" << lang << "' language: path = " << path << endl; #endif const_cast<KoHyphenator*>(this)->dicts.insert( lang, hnj_hyphen_load(TQFile::encodeName(path)) ); - if (dicts.tqfind(lang) == dicts.end()) + if (dicts.find(lang) == dicts.end()) { #ifdef DEBUG_HYPHENATOR kdDebug() << "No dictionary loaded" << endl; @@ -210,14 +210,14 @@ HyphenDict *KoHyphenator::dict(const TQString &_lang) const TQTextCodec* KoHyphenator::codecForLang(const TQString& lang) const { - EncodingMap::Iterator it = encodings.tqfind(lang); + EncodingMap::Iterator it = encodings.find(lang); if (it == encodings.end()) { - int underscore = lang.tqfind('_'); + int underscore = lang.find('_'); if ( underscore > -1 ) { TQString _lang( lang ); _lang.truncate( underscore ); - it = encodings.tqfind(_lang); + it = encodings.find(_lang); } } if (it != encodings.end()) diff --git a/lib/kotext/kohyphen/kohyphentest.cpp b/lib/kotext/kohyphen/kohyphentest.cpp index d5d8daff..96e0bd2d 100644 --- a/lib/kotext/kohyphen/kohyphentest.cpp +++ b/lib/kotext/kohyphen/kohyphentest.cpp @@ -34,7 +34,7 @@ void check_hyphenation( const TQStringList& tests, const TQStringList& results, for ( it = tests.begin(), itres = results.begin(); it != tests.end() ; ++it, ++itres ) { TQString result = hypher->hyphenate((*it), lang); kdDebug() << (*it) << " hyphenates like this: " << result << endl; - check( result.tqreplace(TQChar(0xad),'-'), *itres ); + check( result.replace(TQChar(0xad),'-'), *itres ); } } |