diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | b6edfe41c9395f2e20784cbf0e630af6426950a3 (patch) | |
tree | 56ed9b871d4296e6c15949c24e16420be1b28697 /lib/kotext/KoTextDocument.cpp | |
parent | ef39e8e4178a8f98cf5f154916ba0f03e4855206 (diff) | |
download | koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.tar.gz koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kotext/KoTextDocument.cpp')
-rw-r--r-- | lib/kotext/KoTextDocument.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
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 ) ) ); |