diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
commit | 10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch) | |
tree | 4bc444c00a79e88105f2cfce5b6209994c413ca0 /khtml/rendering/render_text.cpp | |
parent | 307136d8eef0ba133b78ceee8e901138d4c996a1 (diff) | |
download | tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip |
Revert automated changes
Sorry guys, they are just not ready for prime time
Work will continue as always
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/rendering/render_text.cpp')
-rw-r--r-- | khtml/rendering/render_text.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/khtml/rendering/render_text.cpp b/khtml/rendering/render_text.cpp index a45fc8583..0bded06fc 100644 --- a/khtml/rendering/render_text.cpp +++ b/khtml/rendering/render_text.cpp @@ -88,7 +88,7 @@ void InlineTextBox::operator delete(void* ptr, size_t sz) { assert(inInlineTextBoxDetach); - // Stash size where detach can tqfind it. + // Stash size where detach can find it. *(size_t *)ptr = sz; } @@ -230,7 +230,7 @@ void InlineTextBox::paintSelection(const Font *f, RenderText *text, TQPainter *p // In this case, simply swap the colors, thus in compliance with // NN4 (win32 only), IE, and Mozilla. if (!khtml::hasSufficientContrast(hbg, bg)) - tqSwap(hc, hbg); + qSwap(hc, hbg); } p->setPen(hc); @@ -319,9 +319,9 @@ void InlineTextBox::paintShadow(TQPainter *pt, const Font *f, int _tx, int _ty, const int w = m_width+2*thickness; const int h = m_height+2*thickness; const QRgb color = shadow->color.rgb(); - const int gray = tqGray(color); + const int gray = qGray(color); const bool inverse = (gray < 100); - const QRgb bgColor = (inverse) ? tqRgb(255,255,255) : tqRgb(0,0,0); + const QRgb bgColor = (inverse) ? qRgb(255,255,255) : qRgb(0,0,0); TQPixmap pixmap(w, h); pixmap.fill(bgColor); TQPainter p; @@ -365,7 +365,7 @@ void InlineTextBox::paintShadow(TQPainter *pt, const Font *f, int _tx, int _ty, for(int i=thickness; i<w-thickness; i++) { QRgb col= img.pixel(i,j); if (col == bgColor) continue; - float g = tqGray(col); + float g = qGray(col); if (inverse) g = (255-g)/(255-gray); else @@ -383,9 +383,9 @@ void InlineTextBox::paintShadow(TQPainter *pt, const Font *f, int _tx, int _ty, TQImage res(w,h,32); res.setAlphaBuffer(true); - int r = tqRed(color); - int g = tqGreen(color); - int b = tqBlue(color); + int r = qRed(color); + int g = qGreen(color); + int b = qBlue(color); // divide by factor factor = 1.0/factor; @@ -394,7 +394,7 @@ void InlineTextBox::paintShadow(TQPainter *pt, const Font *f, int _tx, int _ty, for(int i=0; i<w; i++) { int a = (int)(amap[i+j*w] * factor * 255.0); if (a > 255) a = 255; - res.setPixel(i,j, tqRgba(r,g,b,a)); + res.setPixel(i,j, qRgba(r,g,b,a)); } } @@ -494,7 +494,7 @@ FindSelectionResult InlineTextBox::checkSelectionPoint(int _x, int _y, int _tx, int InlineTextBox::offsetForPoint(int _x, int &ax) const { - // Do binary search for tqfinding out offset, saves some time for long + // Do binary search for finding out offset, saves some time for long // runs. int start = 0; int end = m_len; @@ -643,7 +643,7 @@ int InlineTextBoxArray::compareItems( Item d1, Item d2 ) } // remove this once QVector::bsearch is fixed -int InlineTextBoxArray::tqfindFirstMatching(Item d) const +int InlineTextBoxArray::findFirstMatching(Item d) const { int len = count(); @@ -758,7 +758,7 @@ DOM::DOMStringImpl* RenderText::originalString() const return element() ? element()->string() : 0; } -InlineTextBox * RenderText::tqfindInlineTextBox( int offset, int &pos, bool checkFirstLetter ) +InlineTextBox * RenderText::findInlineTextBox( int offset, int &pos, bool checkFirstLetter ) { // The text boxes point to parts of the rendertext's str string // (they don't include '\n') @@ -775,7 +775,7 @@ InlineTextBox * RenderText::tqfindInlineTextBox( int offset, int &pos, bool chec RenderText *letterText = static_cast<RenderText *>(firstLetter->firstChild()); //kdDebug(6040) << "lettertext: " << letterText << " minOfs: " << letterText->minOffset() << " maxOfs: " << letterText->maxOffset() << endl; if (offset >= letterText->minOffset() && offset <= letterText->maxOffset()) { - InlineTextBox *result = letterText->tqfindInlineTextBox(offset, pos, false); + InlineTextBox *result = letterText->findInlineTextBox(offset, pos, false); //kdDebug(6040) << "result: " << result << endl; if (result) return result; } @@ -927,7 +927,7 @@ void RenderText::caretPos(int offset, int flags, int &_x, int &_y, int &width, i } int pos; - InlineTextBox * s = tqfindInlineTextBox( offset, pos, true ); + InlineTextBox * s = findInlineTextBox( offset, pos, true ); RenderText *t = s->renderText(); // kdDebug(6040) << "offset="<<offset << " pos="<<pos << endl; @@ -963,7 +963,7 @@ void RenderText::caretPos(int offset, int flags, int &_x, int &_y, int &width, i long RenderText::minOffset() const { if (!m_lines.count()) return 0; - // FIXME: it is *not* guaranteed that the first run tqcontains the lowest offset + // FIXME: it is *not* guaranteed that the first run contains the lowest offset // Either make this a linear search (slow), // or maintain an index (needs much mem), // or calculate and store it in bidi.cpp (needs calculation even if not needed) @@ -975,7 +975,7 @@ long RenderText::maxOffset() const { int count = m_lines.count(); if (!count) return str->l; - // FIXME: it is *not* guaranteed that the last run tqcontains the highest offset + // FIXME: it is *not* guaranteed that the last run contains the highest offset // Either make this a linear search (slow), // or maintain an index (needs much mem), // or calculate and store it in bidi.cpp (needs calculation even if not needed) @@ -995,7 +995,7 @@ bool RenderText::posOfChar(int chr, int &x, int &y) parent()->absolutePosition( x, y, false ); int pos; - InlineTextBox * s = tqfindInlineTextBox( chr, pos ); + InlineTextBox * s = findInlineTextBox( chr, pos ); if ( s ) { // s is the line containing the character @@ -1036,7 +1036,7 @@ void RenderText::calcMinMaxWidth() bool firstLine = true; for(int i = 0; i < len; i++) { - unsigned short c = str->s[i].tqunicode(); + unsigned short c = str->s[i].unicode(); bool isNewline = false; // If line-breaks survive to here they are preserved @@ -1056,7 +1056,7 @@ void RenderText::calcMinMaxWidth() continue; int wordlen = 0; - while( i+wordlen < len && (i+wordlen == 0 || str->s[i+wordlen].tqunicode() != SOFT_HYPHEN) && + while( i+wordlen < len && (i+wordlen == 0 || str->s[i+wordlen].unicode() != SOFT_HYPHEN) && !(isBreakable( str->s, i+wordlen, str->l )) ) wordlen++; @@ -1071,7 +1071,7 @@ void RenderText::calcMinMaxWidth() currMaxWidth += w; // Add in wordspacing to our maxwidth, but not if this is the last word. - if (wordSpacing && !tqcontainsOnlyWhitespace(i+wordlen, len-(i+wordlen))) + if (wordSpacing && !containsOnlyWhitespace(i+wordlen, len-(i+wordlen))) currMaxWidth += wordSpacing; if (firstWord) { @@ -1175,7 +1175,7 @@ void RenderText::setText(DOMStringImpl *text, bool force) RenderObject *o; bool runOnString = false; - // tqfind previous non-empty text renderer if one exists + // find previous non-empty text renderer if one exists for (o = previousRenderer(); o; o = o->previousRenderer()) { if (!o->isInlineFlow()) { if (!o->isText()) @@ -1259,7 +1259,7 @@ void RenderText::position(InlineBox* box, int from, int len, bool reverse) { //kdDebug(6040) << "position: from="<<from<<" len="<<len<<endl; // ### should not be needed!!! - // asserts sometimes with pre (that unibw-hamburg testcase). ### tqfind out why + // asserts sometimes with pre (that unibw-hamburg testcase). ### find out why //KHTMLAssert(!(len == 0 || (str->l && len == 1 && *(str->s+from) == '\n') )); // It is now needed. BRs need text boxes too otherwise caret navigation // gets stuck (LS) @@ -1328,11 +1328,11 @@ short RenderText::width() const return w; } -void RenderText::tqrepaint(Priority p) +void RenderText::repaint(Priority p) { RenderObject *cb = containingBlock(); if(cb) - cb->tqrepaint(p); + cb->repaint(p); } bool RenderText::isFixedWidthFont() const @@ -1368,7 +1368,7 @@ const Font *RenderText::htmlFont(bool firstLine) const return f; } -bool RenderText::tqcontainsOnlyWhitespace(unsigned int from, unsigned int len) const +bool RenderText::containsOnlyWhitespace(unsigned int from, unsigned int len) const { unsigned int currPos; for (currPos = from; @@ -1390,7 +1390,7 @@ void RenderText::trimmedMinMaxWidth(short& beginMinW, bool& beginWS, stripFrontSpaces = false; int len = str->l; - if (len == 0 || (stripFrontSpaces && str->tqcontainsOnlyWhitespace())) { + if (len == 0 || (stripFrontSpaces && str->containsOnlyWhitespace())) { maxW = 0; hasBreak = false; return; @@ -1470,7 +1470,7 @@ static TQString quoteAndEscapeNonPrintables(const TQString &s) } else if (c == '"') { result += "\\\""; } else { - ushort u = c.tqunicode(); + ushort u = c.unicode(); if (u >= 0x20 && u < 0x7F) { result += c; } else { |