diff options
Diffstat (limited to 'tqtinterface/qt4/src/kernel/tqrichtext.cpp')
-rw-r--r-- | tqtinterface/qt4/src/kernel/tqrichtext.cpp | 210 |
1 files changed, 105 insertions, 105 deletions
diff --git a/tqtinterface/qt4/src/kernel/tqrichtext.cpp b/tqtinterface/qt4/src/kernel/tqrichtext.cpp index 00484d6..e8e91b3 100644 --- a/tqtinterface/qt4/src/kernel/tqrichtext.cpp +++ b/tqtinterface/qt4/src/kernel/tqrichtext.cpp @@ -8885,12 +8885,12 @@ void TQTextCursor::insert( const QString &str, bool checkNewLine, TQMemArray<TQT #if defined(TQ_WS_WIN) if ( checkNewLine ) { int i = 0; - while ( ( i = s.tqfind( '\r', i ) ) != -1 ) + while ( ( i = s.find( '\r', i ) ) != -1 ) s.remove( i ,1 ); } #endif if ( checkNewLine ) - justInsert = s.tqfind( '\n' ) == -1; + justInsert = s.find( '\n' ) == -1; if ( justInsert ) { // we ignore new lines and insert all in the current para at the current index para->insert( idx, s.tqunicode(), s.length() ); if ( formatting ) { @@ -8908,8 +8908,8 @@ void TQTextCursor::insert( const QString &str, bool checkNewLine, TQMemArray<TQT int y = para->rect().y() + para->rect().height(); int lastIndex = 0; do { - end = s.tqfind( '\n', start + 1 ); // tqfind line break - if ( end == -1 ) // didn't tqfind one, so end of line is end of string + end = s.find( '\n', start + 1 ); // find line break + if ( end == -1 ) // didn't find one, so end of line is end of string end = s.length(); int len = (start == -1 ? end : end - start - 1); if ( len > 0 ) // insert the line @@ -9846,7 +9846,7 @@ void TQTextDocument::setPlainText( const TQString &text ) oText = text; int lastNl = 0; - int nl = text.tqfind( '\n' ); + int nl = text.find( '\n' ); if ( nl == -1 ) { lParag = createParagraph( this, lParag, 0 ); if ( !fParag ) @@ -9872,7 +9872,7 @@ void TQTextDocument::setPlainText( const TQString &text ) if ( nl == (int)text.length() ) break; lastNl = nl + 1; - nl = text.tqfind( '\n', nl + 1 ); + nl = text.find( '\n', nl + 1 ); if ( nl == -1 ) nl = text.length(); } @@ -10065,7 +10065,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu #endif // some well-known tags, some have a nstyle, some not - if ( wellKnownTags.tqfind( tagname ) != -1 ) { + if ( wellKnownTags.find( tagname ) != -1 ) { if ( tagname == "br" ) { emptyTag = space = TRUE; int index = TQMAX( curpar->length(),1) - 1; @@ -10086,11 +10086,11 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu custom = parseTable( attr, format, doc, length, pos, curpar ); #endif } else if ( tagname == "qt" || tagname == "body" ) { - if ( attr.tqcontains( "bgcolor" ) ) { + if ( attr.contains( "bgcolor" ) ) { TQBrush *b = new TQBrush( TQColor( attr["bgcolor"] ) ); setPaper( b ); } - if ( attr.tqcontains( "background" ) ) { + if ( attr.contains( "background" ) ) { #ifndef TQT_NO_MIME TQImage img; TQString bg = attr["background"]; @@ -10108,21 +10108,21 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu } #endif } - if ( attr.tqcontains( "text" ) ) { + if ( attr.contains( "text" ) ) { TQColor c( attr["text"] ); initag.format.setColor( c ); curtag.format.setColor( c ); bodyText = c; } - if ( attr.tqcontains( "link" ) ) + if ( attr.contains( "link" ) ) linkColor = TQColor( attr["link"] ); - if ( attr.tqcontains( "title" ) ) - attribs.tqreplace( "title", attr["title"] ); + if ( attr.contains( "title" ) ) + attribs.replace( "title", attr["title"] ); if ( textEditMode ) { - if ( attr.tqcontains("style" ) ) { + if ( attr.contains("style" ) ) { TQString a = attr["style"]; - for ( int s = 0; s < a.tqcontains(';')+1; s++ ) { + for ( int s = 0; s < a.contains(';')+1; s++ ) { TQString style = a.section( ';', s, s ); if ( style.startsWith("font-size:" ) && style.endsWith("pt") ) { scaleFontsFactor = double( formatCollection()->defaultFormat()->fn.pointSize() ) / @@ -10145,7 +10145,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu title += doc[ pos ]; ++pos; } - attribs.tqreplace( "title", title ); + attribs.replace( "title", title ); } } // end of well-known tag handling @@ -10256,7 +10256,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu if ( nstyle->name() == "ul" ) curtag.style = sheet_->item( "ol" ); - if ( attr.tqcontains( "align" ) ) { + if ( attr.contains( "align" ) ) { TQString align = attr["align"].lower(); if ( align == "center" ) curtag.tqalignment = TQt::AlignCenter; @@ -10265,7 +10265,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu else if ( align == "justify" ) curtag.tqalignment = TQt::AlignJustify; } - if ( attr.tqcontains( "dir" ) ) { + if ( attr.contains( "dir" ) ) { TQString dir = attr["dir"]; if ( dir == "rtl" ) curtag.direction = TQChar::DirR; @@ -10276,14 +10276,14 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu NEWPAR; if ( curtag.style->displayMode() == TQStyleSheetItem::DisplayListItem ) { - if ( attr.tqcontains( "value " ) ) + if ( attr.contains( "value " ) ) curpar->setListValue( attr["value"].toInt() ); } - if ( attr.tqcontains( "style" ) ) { + if ( attr.contains( "style" ) ) { TQString a = attr["style"]; bool ok = TRUE; - for ( int s = 0; ok && s < a.tqcontains(';')+1; s++ ) { + for ( int s = 0; ok && s < a.contains(';')+1; s++ ) { TQString style = a.section( ';', s, s ); if ( style.startsWith("margin-top:" ) && style.endsWith("px") ) curpar->utm = 1+style.mid(11, style.length() - 13).toInt(&ok); @@ -10852,7 +10852,7 @@ void TQTextDocument::tqinvalidate() void TQTextDocument::selectionStart( int id, int ¶gId, int &index ) { - QMap<int, TQTextDocumentSelection>::Iterator it = selections.tqfind( id ); + QMap<int, TQTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return; TQTextDocumentSelection &sel = *it; @@ -10862,7 +10862,7 @@ void TQTextDocument::selectionStart( int id, int ¶gId, int &index ) TQTextCursor TQTextDocument::selectionStartCursor( int id) { - QMap<int, TQTextDocumentSelection>::Iterator it = selections.tqfind( id ); + QMap<int, TQTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return TQTextCursor( this ); TQTextDocumentSelection &sel = *it; @@ -10873,7 +10873,7 @@ TQTextCursor TQTextDocument::selectionStartCursor( int id) TQTextCursor TQTextDocument::selectionEndCursor( int id) { - QMap<int, TQTextDocumentSelection>::Iterator it = selections.tqfind( id ); + QMap<int, TQTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return TQTextCursor( this ); TQTextDocumentSelection &sel = *it; @@ -10884,7 +10884,7 @@ TQTextCursor TQTextDocument::selectionEndCursor( int id) void TQTextDocument::selectionEnd( int id, int ¶gId, int &index ) { - QMap<int, TQTextDocumentSelection>::Iterator it = selections.tqfind( id ); + QMap<int, TQTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return; TQTextDocumentSelection &sel = *it; @@ -10923,7 +10923,7 @@ static void setSelectionEndHelper( int id, TQTextDocumentSelection &sel, TQTextC bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor ) { - QMap<int, TQTextDocumentSelection>::Iterator it = selections.tqfind( id ); + QMap<int, TQTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return FALSE; TQTextDocumentSelection &sel = *it; @@ -11077,7 +11077,7 @@ void TQTextDocument::selectAll( int id ) bool TQTextDocument::removeSelection( int id ) { - if ( !selections.tqcontains( id ) ) + if ( !selections.contains( id ) ) return FALSE; TQTextDocumentSelection &sel = selections[ id ]; @@ -11103,7 +11103,7 @@ bool TQTextDocument::removeSelection( int id ) TQString TQTextDocument::selectedText( int id, bool asRichText ) const { - QMap<int, TQTextDocumentSelection>::ConstIterator it = selections.tqfind( id ); + QMap<int, TQTextDocumentSelection>::ConstIterator it = selections.find( id ); if ( it == selections.end() ) return TQString::null; @@ -11152,17 +11152,17 @@ TQString TQTextDocument::selectedText( int id, bool asRichText ) const richTextExportEnd = &c2; TQString sel = richText(); - int from = sel.tqfind( "<!--StartFragment-->" ); + int from = sel.find( "<!--StartFragment-->" ); if ( from >= 0 ) { from += 20; - // tqfind the previous span and move it into the start fragment before we clip it + // find the previous span and move it into the start fragment before we clip it TQString prevspan; - int pspan = sel.tqfindRev( "<span", from-21 ); - if ( pspan > sel.tqfindRev( "</span", from-21 ) ) { - int spanend = sel.tqfind( '>', pspan ); + int pspan = sel.findRev( "<span", from-21 ); + if ( pspan > sel.findRev( "</span", from-21 ) ) { + int spanend = sel.find( '>', pspan ); prevspan = sel.mid( pspan, spanend - pspan + 1 ); } - int to = sel.tqfindRev( "<!--EndFragment-->" ); + int to = sel.findRev( "<!--EndFragment-->" ); if ( from <= to ) sel = "<!--StartFragment-->" + prevspan + sel.mid( from, to - from ); } @@ -11249,7 +11249,7 @@ TQString TQTextDocument::selectedText( int id, bool asRichText ) const void TQTextDocument::setFormat( int id, TQTextFormat *f, int flags ) { - QMap<int, TQTextDocumentSelection>::ConstIterator it = selections.tqfind( id ); + QMap<int, TQTextDocumentSelection>::ConstIterator it = selections.find( id ); if ( it == selections.end() ) return; @@ -11281,7 +11281,7 @@ void TQTextDocument::setFormat( int id, TQTextFormat *f, int flags ) void TQTextDocument::removeSelectedText( int id, TQTextCursor *cursor ) { - QMap<int, TQTextDocumentSelection>::Iterator it = selections.tqfind( id ); + QMap<int, TQTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return; @@ -11345,7 +11345,7 @@ void TQTextDocument::removeSelectedText( int id, TQTextCursor *cursor ) void TQTextDocument::indentSelection( int id ) { - QMap<int, TQTextDocumentSelection>::Iterator it = selections.tqfind( id ); + QMap<int, TQTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) return; @@ -11379,7 +11379,7 @@ TQTextCursor *TQTextDocument::redo( TQTextCursor *c ) return commandHistory->redo( c ); } -bool TQTextDocument::tqfind( TQTextCursor& cursor, const TQString &expr, bool cs, bool wo, bool forward ) +bool TQTextDocument::find( TQTextCursor& cursor, const TQString &expr, bool cs, bool wo, bool forward ) { removeSelection( Standard ); TQTextParagraph *p = 0; @@ -11391,7 +11391,7 @@ bool TQTextDocument::tqfind( TQTextCursor& cursor, const TQString &expr, bool cs TQString s = cursor.paragraph()->string()->toString(); int start = cursor.index(); 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 ); int end = res + expr.length(); if ( res == -1 || ( !forward && start <= res ) ) break; @@ -11436,7 +11436,7 @@ TQt::TextFormat TQTextDocument::textFormat() const bool TQTextDocument::inSelection( int selId, const TQPoint &pos ) const { - QMap<int, TQTextDocumentSelection>::ConstIterator it = selections.tqfind( selId ); + QMap<int, TQTextDocumentSelection>::ConstIterator it = selections.find( selId ); if ( it == selections.end() ) return FALSE; @@ -11453,7 +11453,7 @@ bool TQTextDocument::inSelection( int selId, const TQPoint &pos ) const TQTextParagraph *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 ); @@ -11465,8 +11465,8 @@ bool TQTextDocument::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 && @@ -12780,7 +12780,7 @@ int TQTextParagraph::lineHeightOfChar( int i, int *bl, int *y ) const --it; } - qWarning( "TQTextParagraph::lineHeightOfChar: couldn't tqfind lh for %d", i ); + qWarning( "TQTextParagraph::lineHeightOfChar: couldn't find lh for %d", i ); return 15; } @@ -12806,7 +12806,7 @@ TQTextStringChar *TQTextParagraph::lineStartOfChar( int i, int *index, int *line --l; } - qWarning( "TQTextParagraph::lineStartOfChar: couldn't tqfind %d", i ); + qWarning( "TQTextParagraph::lineStartOfChar: couldn't find %d", i ); return 0; } @@ -12833,7 +12833,7 @@ TQTextStringChar *TQTextParagraph::lineStartOfLine( int line, int *index ) const return &str->at( i ); } - qWarning( "TQTextParagraph::lineStartOfLine: couldn't tqfind %d", line ); + qWarning( "TQTextParagraph::lineStartOfLine: couldn't find %d", line ); return 0; } @@ -13047,7 +13047,7 @@ void TQTextParagraph::paint( TQPainter &painter, const TQColorGroup &cg, TQTextC else if ( chr->customItem()->placement() == TQTextCustomItem::PlaceInline ) { bool inSelection = FALSE; if (drawSelections) { - QMap<int, TQTextParagraphSelection>::ConstIterator it = mSelections->tqfind( TQTextDocument::Standard ); + QMap<int, TQTextParagraphSelection>::ConstIterator it = mSelections->find( TQTextDocument::Standard ); inSelection = (it != mSelections->end() && (*it).start <= i && (*it).end > i); } chr->customItem()->draw( &painter, chr->x, y, @@ -13159,7 +13159,7 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s bool allSelected = FALSE; if (drawSelections) { - QMap<int, TQTextParagraphSelection>::ConstIterator it = mSelections->tqfind( TQTextDocument::Standard ); + QMap<int, TQTextParagraphSelection>::ConstIterator it = mSelections->find( TQTextDocument::Standard ); allSelected = (it != mSelections->end() && (*it).start <= start && (*it).end >= start+len); } if (!allSelected) @@ -13485,7 +13485,7 @@ TQString TQTextParagraph::richText() const TQTextStringChar *c = &str->at( i ); if ( c->isAnchor() && !c->anchorName().isEmpty() && c->anchorName() != lastAnchorName ) { lastAnchorName = c->anchorName(); - if ( c->anchorName().tqcontains( '#' ) ) { + if ( c->anchorName().contains( '#' ) ) { TQStringList l = TQStringList::split( '#', c->anchorName() ); for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) s += "<a name=\"" + *it + "\"></a>"; @@ -13878,7 +13878,7 @@ TQTextLineStart *TQTextFormatter::bidiReorderLine( TQTextParagraph * /*parag*/, void TQTextFormatter::insertLineStart( TQTextParagraph *parag, int index, TQTextLineStart *ls ) { QMap<int, TQTextLineStart*>::Iterator it; - if ( ( it = parag->lineStartList().tqfind( index ) ) == parag->lineStartList().end() ) { + if ( ( it = parag->lineStartList().find( index ) ) == parag->lineStartList().end() ) { parag->lineStartList().insert( index, ls ); } else { delete *it; @@ -14455,7 +14455,7 @@ TQTextFormat *TQTextFormatCollection::format( TQTextFormat *f ) return lastFormat; } - TQTextFormat *fm = cKey.tqfind( f->key() ); + TQTextFormat *fm = cKey.find( f->key() ); if ( fm ) { lastFormat = fm; lastFormat->addRef(); @@ -14506,7 +14506,7 @@ TQTextFormat *TQTextFormatCollection::format( TQTextFormat *of, TQTextFormat *nf cres->ha = nf->ha; cres->update(); - TQTextFormat *fm = cKey.tqfind( cres->key() ); + TQTextFormat *fm = cKey.find( cres->key() ); if ( !fm ) { cres->collection = this; cKey.insert( cres->key(), cres ); @@ -14527,7 +14527,7 @@ TQTextFormat *TQTextFormatCollection::format( const TQFont &f, const TQColor &c } TQString key = TQTextFormat::getKey( f, c, FALSE, TQTextFormat::AlignNormal ); - cachedFormat = cKey.tqfind( key ); + cachedFormat = cKey.find( key ); cfont = f; ccol = c; @@ -14555,7 +14555,7 @@ void TQTextFormatCollection::remove( TQTextFormat *f ) cres = 0; if ( cachedFormat == f ) cachedFormat = 0; - if (cKey.tqfind(f->key()) == f) + if (cKey.find(f->key()) == f) cKey.remove( f->key() ); } @@ -14843,20 +14843,20 @@ TQTextFormat TQTextFormat::makeTextFormat( const TQStyleSheetItem *style, const if ( style->name() == "font") { - if ( attr.tqcontains("color") ) { + if ( attr.contains("color") ) { TQString s = attr["color"]; if ( !s.isEmpty() ) { format.col.setNamedColor( s ); format.linkColor = FALSE; } } - if ( attr.tqcontains("face") ) { + if ( attr.contains("face") ) { TQString a = attr["face"]; TQString family = a.section( ',', 0, 0 ); if ( !!family ) format.fn.setFamily( family ); } - if ( attr.tqcontains("size") ) { + if ( attr.contains("size") ) { TQString a = attr["size"]; int n = a.toInt(); if ( a[0] == '+' || a[0] == '-' ) @@ -14869,9 +14869,9 @@ TQTextFormat TQTextFormat::makeTextFormat( const TQStyleSheetItem *style, const style->styleSheet()->scaleFont( format.fn, format.logicalFontSize ); } } - if ( attr.tqcontains("style" ) ) { + if ( attr.contains("style" ) ) { TQString a = attr["style"]; - for ( int s = 0; s < a.tqcontains(';')+1; s++ ) { + for ( int s = 0; s < a.contains(';')+1; s++ ) { TQString style = a.section( ';', s, s ); if ( style.startsWith("font-size:" ) && style.endsWith("pt") ) { format.logicalFontSize = 0; @@ -14891,15 +14891,15 @@ TQTextFormat TQTextFormat::makeTextFormat( const TQStyleSheetItem *style, const format.fn.setWeight( n/8 ); } else if ( style.startsWith("font-family:" ) ) { TQString family = style.mid(12).section(',',0,0); - family.tqreplace( '\"', ' ' ); - family.tqreplace( '\'', ' ' ); + family.replace( '\"', ' ' ); + family.replace( '\'', ' ' ); family = family.stripWhiteSpace(); format.fn.setFamily( family ); } else if ( style.startsWith("text-decoration:" ) ) { TQString s = style.mid( 16 ); - format.fn.setOverline( s.tqfind("overline") != -1 ); - format.fn.setStrikeOut( s.tqfind("line-through") != -1 ); - format.fn.setUnderline( s.tqfind("underline") != -1 ); + format.fn.setOverline( s.find("overline") != -1 ); + format.fn.setStrikeOut( s.find("line-through") != -1 ); + format.fn.setUnderline( s.find("underline") != -1 ); } else if ( style.startsWith("vertical-align:" ) ) { TQString s = TQT_TQSTRING(style.mid( 15 )).stripWhiteSpace(); if ( s == "sub" ) @@ -14936,9 +14936,9 @@ TQTextImage::TQTextImage( TQTextDocument *p, const QMap<TQString, TQString> &att : TQTextCustomItem( p ) { width = height = 0; - if ( attr.tqcontains("width") ) + if ( attr.contains("width") ) width = attr["width"].toInt(); - if ( attr.tqcontains("height") ) + if ( attr.contains("height") ) height = attr["height"].toInt(); reg = 0; @@ -14951,7 +14951,7 @@ TQTextImage::TQTextImage( TQTextDocument *p, const QMap<TQString, TQString> &att imgId = TQString( "%1,%2,%3,%4" ).arg( imageName ).arg( width ).arg( height ).arg( (ulong)&factory ); if ( !pixmap_map ) pixmap_map = new QMap<TQString, TQPixmapInt>; - if ( pixmap_map->tqcontains( imgId ) ) { + if ( pixmap_map->contains( imgId ) ) { TQPixmapInt& pmi = pixmap_map->operator[](imgId); pm = pmi.pm; pmi.ref++; @@ -15022,7 +15022,7 @@ TQTextImage::TQTextImage( TQTextDocument *p, const QMap<TQString, TQString> &att TQTextImage::~TQTextImage() { - if ( pixmap_map && pixmap_map->tqcontains( imgId ) ) { + if ( pixmap_map && pixmap_map->contains( imgId ) ) { TQPixmapInt& pmi = pixmap_map->operator[](imgId); pmi.ref--; if ( !pmi.ref ) { @@ -15043,7 +15043,7 @@ TQString TQTextImage::richText() const QMap<TQString, TQString>::ConstIterator it = attributes.begin(); for ( ; it != attributes.end(); ++it ) { s += it.key() + "="; - if ( (*it).tqfind( ' ' ) != -1 ) + if ( (*it).find( ' ' ) != -1 ) s += "\"" + *it + "\"" + " "; else s += *it + " "; @@ -15129,9 +15129,9 @@ TQTextHorizontalLine::TQTextHorizontalLine( TQTextDocument *p, const QMap<TQStri : TQTextCustomItem( p ) { height = tmpheight = 8; - if ( attr.tqfind( "color" ) != attr.end() ) - color = TQColor( *attr.tqfind( "color" ) ); - shade = attr.tqfind( "noshade" ) == attr.end(); + if ( attr.find( "color" ) != attr.end() ) + color = TQColor( *attr.find( "color" ) ); + shade = attr.find( "noshade" ) == attr.end(); } TQTextHorizontalLine::~TQTextHorizontalLine() @@ -15239,13 +15239,13 @@ TQTextCustomItem* TQTextDocument::parseTable( const QMap<TQString, TQString> &at if ( row >= 0 && col >= 0 ) { const TQStyleSheetItem* s = sheet_->item(tagname); - if ( !attr2.tqcontains("bgcolor") ) { + if ( !attr2.contains("bgcolor") ) { if (!rowbgcolor.isEmpty() ) attr2["bgcolor"] = rowbgcolor; else if (!tablebgcolor.isEmpty() ) attr2["bgcolor"] = tablebgcolor; } - if ( !attr2.tqcontains("align") ) { + if ( !attr2.contains("align") ) { if (!rowalign.isEmpty() ) attr2["align"] = rowalign; } @@ -15634,7 +15634,7 @@ TQChar TQTextDocument::parseHTMLSpecialChar(const TQChar* doc, int length, int& if (ok) return num; } else { - QMap<TQString, TQChar>::Iterator it = htmlMap()->tqfind(s); + QMap<TQString, TQChar>::Iterator it = htmlMap()->find(s); if ( it != htmlMap()->end() ) { return *it; } @@ -15871,10 +15871,10 @@ void TQTextFlow::unregisterFloatingItem( TQTextCustomItem* item ) void TQTextFlow::registerFloatingItem( TQTextCustomItem* item ) { if ( item->placement() == TQTextCustomItem::PlaceRight ) { - if ( !rightItems.tqcontains( item ) ) + if ( !rightItems.contains( item ) ) rightItems.append( item ); } else if ( item->placement() == TQTextCustomItem::PlaceLeft && - !leftItems.tqcontains( item ) ) { + !leftItems.contains( item ) ) { leftItems.append( item ); } } @@ -15931,13 +15931,13 @@ TQTextTable::TQTextTable( TQTextDocument *p, const QMap<TQString, TQString> & at { cells.setAutoDelete( FALSE ); cellspacing = 2; - if ( attr.tqcontains("cellspacing") ) + if ( attr.contains("cellspacing") ) cellspacing = attr["cellspacing"].toInt(); cellpadding = 1; - if ( attr.tqcontains("cellpadding") ) + if ( attr.contains("cellpadding") ) cellpadding = attr["cellpadding"].toInt(); border = innerborder = 0; - if ( attr.tqcontains("border" ) ) { + if ( attr.contains("border" ) ) { TQString s( attr["border"] ); if ( s == "TRUE" ) border = 1; @@ -15960,7 +15960,7 @@ TQTextTable::TQTextTable( TQTextDocument *p, const QMap<TQString, TQString> & at fixwidth = 0; stretch = 0; - if ( attr.tqcontains("width") ) { + if ( attr.contains("width") ) { bool b; TQString s( attr["width"] ); int w = s.toInt( &b ); @@ -16248,14 +16248,14 @@ bool TQTextTable::enterAt( TQTextCursor *c, TQTextDocument *&doc, TQTextParagrap if ( i == (int) cells.count() ) return FALSE; // no cell found - if ( currCell.tqfind( c ) == currCell.end() ) { + if ( currCell.find( c ) == currCell.end() ) { if ( lastY != -1 ) currCell.insert( c, lastCell ); else return FALSE; } - TQTextTableCell *cell = cells.at( *currCell.tqfind( c ) ); + TQTextTableCell *cell = cells.at( *currCell.find( c ) ); if ( !cell ) return FALSE; doc = cell->richText(); @@ -16269,8 +16269,8 @@ bool TQTextTable::enterAt( TQTextCursor *c, TQTextDocument *&doc, TQTextParagrap bool TQTextTable::next( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *¶g, int &idx, int &ox, int &oy ) { int cc = -1; - if ( currCell.tqfind( c ) != currCell.end() ) - cc = *currCell.tqfind( c ); + if ( currCell.find( c ) != currCell.end() ) + cc = *currCell.find( c ); if ( cc > (int)cells.count() - 1 || cc < 0 ) cc = -1; currCell.remove( c ); @@ -16286,9 +16286,9 @@ bool TQTextTable::next( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph * return TRUE; } - if ( currCell.tqfind( c ) == currCell.end() ) + if ( currCell.find( c ) == currCell.end() ) return FALSE; - TQTextTableCell *cell = cells.at( *currCell.tqfind( c ) ); + TQTextTableCell *cell = cells.at( *currCell.find( c ) ); if ( !cell ) return FALSE; doc = cell->richText(); @@ -16302,8 +16302,8 @@ bool TQTextTable::next( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph * bool TQTextTable::prev( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *¶g, int &idx, int &ox, int &oy ) { int cc = -1; - if ( currCell.tqfind( c ) != currCell.end() ) - cc = *currCell.tqfind( c ); + if ( currCell.find( c ) != currCell.end() ) + cc = *currCell.find( c ); if ( cc > (int)cells.count() - 1 || cc < 0 ) cc = cells.count(); currCell.remove( c ); @@ -16319,9 +16319,9 @@ bool TQTextTable::prev( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph * return TRUE; } - if ( currCell.tqfind( c ) == currCell.end() ) + if ( currCell.find( c ) == currCell.end() ) return FALSE; - TQTextTableCell *cell = cells.at( *currCell.tqfind( c ) ); + TQTextTableCell *cell = cells.at( *currCell.find( c ) ); if ( !cell ) return FALSE; doc = cell->richText(); @@ -16334,9 +16334,9 @@ bool TQTextTable::prev( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph * bool TQTextTable::down( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *¶g, int &idx, int &ox, int &oy ) { - if ( currCell.tqfind( c ) == currCell.end() ) + if ( currCell.find( c ) == currCell.end() ) return FALSE; - TQTextTableCell *cell = cells.at( *currCell.tqfind( c ) ); + TQTextTableCell *cell = cells.at( *currCell.find( c ) ); if ( cell->row_ == tqlayout->numRows() - 1 ) { currCell.insert( c, 0 ); TQTextCustomItem::down( c, doc, parag, idx, ox, oy ); @@ -16350,9 +16350,9 @@ bool TQTextTable::down( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph * int oldRow = cell->row_; int oldCol = cell->col_; - if ( currCell.tqfind( c ) == currCell.end() ) + if ( currCell.find( c ) == currCell.end() ) return FALSE; - int cc = *currCell.tqfind( c ); + int cc = *currCell.find( c ); for ( int i = cc; i < (int)cells.count(); ++i ) { cell = cells.at( i ); if ( cell->row_ > oldRow && cell->col_ == oldCol ) { @@ -16372,9 +16372,9 @@ bool TQTextTable::down( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph * bool TQTextTable::up( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *¶g, int &idx, int &ox, int &oy ) { - if ( currCell.tqfind( c ) == currCell.end() ) + if ( currCell.find( c ) == currCell.end() ) return FALSE; - TQTextTableCell *cell = cells.at( *currCell.tqfind( c ) ); + TQTextTableCell *cell = cells.at( *currCell.find( c ) ); if ( cell->row_ == 0 ) { currCell.insert( c, 0 ); TQTextCustomItem::up( c, doc, parag, idx, ox, oy ); @@ -16388,9 +16388,9 @@ bool TQTextTable::up( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&p int oldRow = cell->row_; int oldCol = cell->col_; - if ( currCell.tqfind( c ) == currCell.end() ) + if ( currCell.find( c ) == currCell.end() ) return FALSE; - int cc = *currCell.tqfind( c ); + int cc = *currCell.find( c ); for ( int i = cc; i >= 0; --i ) { cell = cells.at( i ); if ( cell->row_ < oldRow && cell->col_ == oldCol ) { @@ -16430,7 +16430,7 @@ TQTextTableCell::TQTextTableCell( TQTextTable* table, richtext->formatCollection()->setPaintDevice( table->tqparent->formatCollection()->paintDevice() ); richtext->bodyText = fmt.color(); richtext->setTableCell( this ); - TQString a = *attr.tqfind( "align" ); + TQString a = *attr.find( "align" ); if ( !a.isEmpty() ) { a = a.lower(); if ( a == "left" ) @@ -16441,7 +16441,7 @@ TQTextTableCell::TQTextTableCell( TQTextTable* table, richtext->tqsetAlignment( TQt::AlignRight ); } align = 0; - TQString va = *attr.tqfind( "valign" ); + TQString va = *attr.find( "valign" ); if ( !va.isEmpty() ) { va = va.lower(); if ( va == "top" ) @@ -16458,19 +16458,19 @@ TQTextTableCell::TQTextTableCell( TQTextTable* table, richtext->setRichText( doc, context, &fmt ); rowspan_ = 1; colspan_ = 1; - if ( attr.tqcontains("colspan") ) + if ( attr.contains("colspan") ) colspan_ = attr["colspan"].toInt(); - if ( attr.tqcontains("rowspan") ) + if ( attr.contains("rowspan") ) rowspan_ = attr["rowspan"].toInt(); background = 0; - if ( attr.tqcontains("bgcolor") ) { + if ( attr.contains("bgcolor") ) { background = new TQBrush(TQColor( attr["bgcolor"] )); } hasFixedWidth = FALSE; - if ( attr.tqcontains("width") ) { + if ( attr.contains("width") ) { bool b; TQString s( attr["width"] ); int w = s.toInt( &b ); |