summaryrefslogtreecommitdiffstats
path: root/lib/kotext/KoTextObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kotext/KoTextObject.cpp')
-rw-r--r--lib/kotext/KoTextObject.cpp36
1 files changed, 18 insertions, 18 deletions
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];