diff options
Diffstat (limited to 'src/kernel/qtextlayout.cpp')
-rw-r--r-- | src/kernel/qtextlayout.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/kernel/qtextlayout.cpp b/src/kernel/qtextlayout.cpp index edbd910ed..ed5641a7b 100644 --- a/src/kernel/qtextlayout.cpp +++ b/src/kernel/qtextlayout.cpp @@ -134,7 +134,7 @@ int TQTextItem::cursorToX( int *cPos, Edge edge ) const for ( int i = 0; i < glyph_pos; i++ ) x += advances[i]; } -// qDebug("cursorToX: pos=%d, gpos=%d x=%d", pos, glyph_pos, x ); +// tqDebug("cursorToX: pos=%d, gpos=%d x=%d", pos, glyph_pos, x ); *cPos = pos; return x; } @@ -174,7 +174,7 @@ int TQTextItem::xToCursor( int x, CursorPosition cpos ) const cp_after = i; for ( int j = lastCluster; j < newCluster; j++ ) x_after += advances[j]; - // qDebug("cluster boundary: lastCluster=%d, newCluster=%d, x_before=%d, x_after=%d", + // tqDebug("cluster boundary: lastCluster=%d, newCluster=%d, x_before=%d, x_after=%d", // lastCluster, newCluster, x_before, x_after ); if ( x_after > x ) break; @@ -184,7 +184,7 @@ int TQTextItem::xToCursor( int x, CursorPosition cpos ) const bool before = ( cpos == OnCharacters || (x - x_before) < (x_after - x) ); -// qDebug("got cursor position for %d: %d/%d, x_ba=%d/%d using %d", +// tqDebug("got cursor position for %d: %d/%d, x_ba=%d/%d using %d", // x, cp_before,cp_after, x_before, x_after, before ? cp_before : cp_after ); return before ? cp_before : cp_after; @@ -355,7 +355,7 @@ TQTextLayout::Result TQTextLayout::addCurrentItem() TQScriptItem ¤t = d->items[d->currentItem]; d->shape( d->currentItem ); d->widthUsed += current.width; -// qDebug("trying to add item %d with width %d, remaining %d", d->currentItem, current.width, d->lineWidth-d->widthUsed ); +// tqDebug("trying to add item %d with width %d, remaining %d", d->currentItem, current.width, d->lineWidth-d->widthUsed ); d->currentItem++; @@ -376,7 +376,7 @@ TQTextLayout::Result TQTextLayout::endLine( int x, int y, int alignment, int i; TQTextLayout::Result result = LineEmpty; -// qDebug("endLine x=%d, y=%d, first=%d, current=%d lw=%d wu=%d", x, y, d->firstItemInLine, d->currentItem, d->lineWidth, d->widthUsed ); +// tqDebug("endLine x=%d, y=%d, first=%d, current=%d lw=%d wu=%d", x, y, d->firstItemInLine, d->currentItem, d->lineWidth, d->widthUsed ); int width_nobreak_found = d->widthUsed; if ( d->firstItemInLine == -1 ) goto end; @@ -428,21 +428,21 @@ TQTextLayout::Result TQTextLayout::endLine( int x, int y, int alignment, int lastGlyph = 0; int tmpItemWidth = 0; -// qDebug("looking for break in item %d, isSpace=%d", i, si->isSpace ); +// tqDebug("looking for break in item %d, isSpace=%d", i, si->isSpace ); if(si->isSpace && !(alignment & (TQt::SingleLine|TQt::IncludeTrailingSpaces))) { swidth += si->width; } else { tmpWidth += swidth; swidth = 0; for ( int pos = 0; pos < length; pos++ ) { -// qDebug("advance=%d, w=%d, tmpWidth=%d, softbreak=%d, whitespace=%d", +// tqDebug("advance=%d, w=%d, tmpWidth=%d, softbreak=%d, whitespace=%d", // *advances, w, tmpWidth, itemAttrs->softBreak, itemAttrs->whiteSpace ); int glyph = logClusters[pos]; if ( lastGlyph != glyph ) { while ( lastGlyph < glyph ) tmpItemWidth += advances[lastGlyph++]; if ( breakPosition != -1 && w + tmpWidth + tmpItemWidth > d->lineWidth ) { -// qDebug("found break at w=%d, tmpWidth=%d, tmpItemWidth=%d", w, tmpWidth, tmpItemWidth); +// tqDebug("found break at w=%d, tmpWidth=%d, tmpItemWidth=%d", w, tmpWidth, tmpItemWidth); d->widthUsed = w; goto found; } @@ -456,7 +456,7 @@ TQTextLayout::Result TQTextLayout::endLine( int x, int y, int alignment, breakany = FALSE; breakItem = i; breakPosition = pos; -// qDebug("found possible break at item %d, position %d (absolute=%d), w=%d, tmpWidth=%d, tmpItemWidth=%d", breakItem, breakPosition, d->items[breakItem].position+breakPosition, w, tmpWidth, tmpItemWidth); +// tqDebug("found possible break at item %d, position %d (absolute=%d), w=%d, tmpWidth=%d, tmpItemWidth=%d", breakItem, breakPosition, d->items[breakItem].position+breakPosition, w, tmpWidth, tmpItemWidth); w += tmpWidth + tmpItemWidth; itemWidth += tmpItemWidth; tmpWidth = 0; @@ -482,12 +482,12 @@ TQTextLayout::Result TQTextLayout::endLine( int x, int y, int alignment, goto nobreak; } -// qDebug("linebreak at item %d, position %d, wu=%d", breakItem, breakPosition, d->widthUsed ); +// tqDebug("linebreak at item %d, position %d, wu=%d", breakItem, breakPosition, d->widthUsed ); // split the line if ( breakPosition > 0 ) { // int length = d->length( breakItem ); -// qDebug("splitting item, itemWidth=%d", itemWidth); +// tqDebug("splitting item, itemWidth=%d", itemWidth); // not a full item, need to break d->splitItem( breakItem, breakPosition ); d->currentItem = breakItem+1; @@ -508,10 +508,10 @@ TQTextLayout::Result TQTextLayout::endLine( int x, int y, int alignment, visual = new int[numRuns]; } -// qDebug("reordering %d runs, numSpaceItems=%d", numRuns, numSpaceItems ); +// tqDebug("reordering %d runs, numSpaceItems=%d", numRuns, numSpaceItems ); for ( i = 0; i < numRuns; i++ ) { levels[i] = d->items[i+d->firstItemInLine].analysis.bidiLevel; -// qDebug(" level = %d", d->items[i+d->firstItemInLine].analysis.bidiLevel ); +// tqDebug(" level = %d", d->items[i+d->firstItemInLine].analysis.bidiLevel ); } d->bidiReorder( numRuns, levels, visual ); @@ -541,7 +541,7 @@ TQTextLayout::Result TQTextLayout::endLine( int x, int y, int alignment, int left = x; for ( i = 0; i < numRuns; i++ ) { TQScriptItem &si = d->items[d->firstItemInLine+visual[i]]; -// qDebug("positioning item %d with width %d (from=%d/length=%d) at %d", d->firstItemInLine+visual[i], si.width, si.position, +// tqDebug("positioning item %d with width %d (from=%d/length=%d) at %d", d->firstItemInLine+visual[i], si.width, si.position, // d->length(d->firstItemInLine+visual[i]), x ); si.x = x; si.y = y + asc; @@ -593,7 +593,7 @@ void TQTextLayout::endLayout() int TQTextLayout::nextCursorPosition( int oldPos, CursorMode mode ) const { -// qDebug("looking for next cursor pos for %d", oldPos ); +// tqDebug("looking for next cursor pos for %d", oldPos ); const TQCharAttributes *attributes = d->attributes(); int len = d->string.length(); if ( oldPos >= len ) @@ -606,13 +606,13 @@ int TQTextLayout::nextCursorPosition( int oldPos, CursorMode mode ) const while ( oldPos < len && !attributes[oldPos].wordStop && !attributes[oldPos-1].whiteSpace ) oldPos++; } -// qDebug(" -> %d", oldPos ); +// tqDebug(" -> %d", oldPos ); return oldPos; } int TQTextLayout::previousCursorPosition( int oldPos, CursorMode mode ) const { -// qDebug("looking for previous cursor pos for %d", oldPos ); +// tqDebug("looking for previous cursor pos for %d", oldPos ); const TQCharAttributes *attributes = d->attributes(); if ( oldPos <= 0 ) return 0; @@ -624,7 +624,7 @@ int TQTextLayout::previousCursorPosition( int oldPos, CursorMode mode ) const while ( oldPos && !attributes[oldPos].wordStop && !attributes[oldPos-1].whiteSpace ) oldPos--; } -// qDebug(" -> %d", oldPos ); +// tqDebug(" -> %d", oldPos ); return oldPos; } |