summaryrefslogtreecommitdiffstats
path: root/lib/kotext/KoTextFormatter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kotext/KoTextFormatter.cpp')
-rw-r--r--lib/kotext/KoTextFormatter.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/lib/kotext/KoTextFormatter.cpp b/lib/kotext/KoTextFormatter.cpp
index 6696f041..7bdfbc0c 100644
--- a/lib/kotext/KoTextFormatter.cpp
+++ b/lib/kotext/KoTextFormatter.cpp
@@ -94,7 +94,7 @@ TQPair<int, int> KoTextFormatterCore::determineCharWidth()
Q_ASSERT( ww >= 0 );
ww = TQMAX(0, ww);
#ifndef REF_IS_LU
- pixelww = zh->tqlayoutUnitToPixelX( ww );
+ pixelww = zh->layoutUnitToPixelX( ww );
#endif
} else {
ww = charFormat->charWidthLU( c, parag, i );
@@ -113,7 +113,7 @@ TQPair<int, int> KoTextFormatterCore::determineCharWidth()
kdDebug(32500) << "nextTab for x=" << x << " returned nx=" << nx << " (=> ww=" << ww << ")" << endl;
#endif
#ifndef REF_IS_LU
- pixelww = zh->tqlayoutUnitToPixelX( ww );
+ pixelww = zh->layoutUnitToPixelX( ww );
#endif
}
Q_ASSERT( ww >= 0 );
@@ -260,7 +260,7 @@ bool KoTextFormatterCore::format()
maxAvailableWidth = tqMakePair( 0, 0 );
KoTextZoomHandler *zh = doc->formattingZoomHandler();
- int pixelx = zh->tqlayoutUnitToPixelX( x );
+ int pixelx = zh->layoutUnitToPixelX( x );
int lastPixelx = 0;
KoTextStringChar* lastChr = 0;
@@ -445,7 +445,7 @@ bool KoTextFormatterCore::format()
ww, // ## correct?
x, initialRMargin, dw, parag );
- pixelx = zh->tqlayoutUnitToPixelX( x );
+ pixelx = zh->layoutUnitToPixelX( x );
initialHeight = tmph;
initialLMargin = x;
availableWidth = dw - initialRMargin;
@@ -545,7 +545,7 @@ bool KoTextFormatterCore::format()
c->width,
x, initialRMargin, dw, parag );
- pixelx = zh->tqlayoutUnitToPixelX( x );
+ pixelx = zh->layoutUnitToPixelX( x );
initialHeight = tmph;
initialLMargin = x;
availableWidth = dw - initialRMargin;
@@ -624,7 +624,7 @@ bool KoTextFormatterCore::format()
#endif
i = (firstChar - &string->at(0));
x = newLMargin;
- pixelx = zh->tqlayoutUnitToPixelX( x );
+ pixelx = zh->layoutUnitToPixelX( x );
availableWidth = dw - newRMargin;
initialLMargin = newLMargin;
initialRMargin = newRMargin;
@@ -679,10 +679,10 @@ bool KoTextFormatterCore::format()
c->x = x;
// pixelxadj is the adjustement to add to lu2pixel(x), to find pixelx
// (pixelx would be too expensive to store directly since it would require an int)
- c->pixelxadj = pixelx - zh->tqlayoutUnitToPixelX( x );
+ c->pixelxadj = pixelx - zh->layoutUnitToPixelX( x );
//c->pixelwidth = pixelww; // done as pixelx - lastPixelx below
#ifdef DEBUG_FORMATTER
- kdDebug(32500) << "LU: x=" << x << " [equiv. to pix=" << zh->tqlayoutUnitToPixelX( x ) << "] ; PIX: x=" << pixelx << " --> adj=" << c->pixelxadj << endl;
+ kdDebug(32500) << "LU: x=" << x << " [equiv. to pix=" << zh->layoutUnitToPixelX( x ) << "] ; PIX: x=" << pixelx << " --> adj=" << c->pixelxadj << endl;
#endif
x += ww;
@@ -692,11 +692,11 @@ bool KoTextFormatterCore::format()
if ( i < len - 1 )
tmpWused = TQMAX( tmpWused, x );
else // trailing space
- c->pixelwidth = zh->tqlayoutUnitToPixelX( ww ); // was: pixelww;
+ c->pixelwidth = zh->layoutUnitToPixelX( ww ); // was: pixelww;
lastPixelx = pixelx;
#ifdef REF_IS_LU
- pixelx = zh->tqlayoutUnitToPixelX( x ); // no accumulating rounding errors anymore
+ pixelx = zh->layoutUnitToPixelX( x ); // no accumulating rounding errors anymore
#else
pixelx += pixelww;
#endif
@@ -706,7 +706,7 @@ bool KoTextFormatterCore::format()
}
// ### hack. The last char in the paragraph is always invisible, and somehow sometimes has a wrong format. It changes between
- // tqlayouting and printing. This corrects some tqlayouting errors in BiDi mode due to this.
+ // layouting and printing. This corrects some layouting errors in BiDi mode due to this.
if ( len > 1 /*&& !c->isAnchor()*/ ) {
c->format()->removeRef();
c->setFormat( string->at( len - 2 ).format() );
@@ -787,11 +787,11 @@ void KoTextFormatterCore::moveChar( KoTextStringChar& chr, KoTextZoomHandler *zh
int deltaX, int deltaPixelX )
{
#ifndef REF_IS_LU
- int pixelx = chr.pixelxadj + zh->tqlayoutUnitToPixelX( chr.x );
+ int pixelx = chr.pixelxadj + zh->layoutUnitToPixelX( chr.x );
#endif
chr.x += deltaX;
#ifndef REF_IS_LU
- chr.pixelxadj = pixelx + deltaPixelX - zh->tqlayoutUnitToPixelX( chr.x );
+ chr.pixelxadj = pixelx + deltaPixelX - zh->layoutUnitToPixelX( chr.x );
#endif
}
@@ -814,7 +814,7 @@ KoTextParagLineStart *KoTextFormatterCore::koFormatLine(
if ( align & TQt::AlignHCenter || align & TQt::AlignRight ) {
if ( align & TQt::AlignHCenter )
space /= 2;
- int toAddPix = zh->tqlayoutUnitToPixelX( space );
+ int toAddPix = zh->layoutUnitToPixelX( space );
for ( int j = last; j >= start; --j ) {
KoTextStringChar &chr = string->at( j );
moveChar( chr, zh, space, toAddPix );
@@ -841,12 +841,12 @@ KoTextParagLineStart *KoTextFormatterCore::koFormatLine(
if( settings->isStretchable( string, k ) && numSpaces ) {
int s = space / numSpaces;
toAdd += s;
- toAddPix = zh->tqlayoutUnitToPixelX( toAdd );
+ toAddPix = zh->layoutUnitToPixelX( toAdd );
space -= s;
numSpaces--;
chr.width += s;
#ifndef REF_IS_LU
- chr.pixelwidth += zh->tqlayoutUnitToPixelX( s ); // ### rounding problem, recalculate
+ chr.pixelwidth += zh->layoutUnitToPixelX( s ); // ### rounding problem, recalculate
#endif
}
}
@@ -973,7 +973,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine(
}
}
// TODO #ifndef REF_IS_LU or remove
- int pixelx = zh->tqlayoutUnitToPixelX( x );
+ int pixelx = zh->layoutUnitToPixelX( x );
int toAdd = 0;
int toAddPix = 0;
bool first = TRUE;
@@ -991,11 +991,11 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine(
if( numSpaces && !first && settings->isBreakable( text, pos ) ) {
int s = space / numSpaces;
toAdd += s;
- toAddPix = zh->tqlayoutUnitToPixelX( toAdd );
+ toAddPix = zh->layoutUnitToPixelX( toAdd );
space -= s;
numSpaces--;
chr.width += s;
- chr.pixelwidth += zh->tqlayoutUnitToPixelX( s ); // ### rounding problem, recalculate
+ chr.pixelwidth += zh->layoutUnitToPixelX( s ); // ### rounding problem, recalculate
} else if ( first ) {
first = FALSE;
if ( chr.c == ' ' ) // trailing space
@@ -1006,9 +1006,9 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine(
}
}
chr.x = x + toAdd;
- chr.pixelxadj = pixelx + toAddPix - zh->tqlayoutUnitToPixelX( chr.x );
+ chr.pixelxadj = pixelx + toAddPix - zh->layoutUnitToPixelX( chr.x );
#ifdef DEBUG_FORMATTER
- kdDebug(32500) << "koBidiReorderLine: pos=" << pos << " x(LU)=" << x << " toAdd(LU)=" << toAdd << " -> chr.x=" << chr.x << " pixelx=" << pixelx << "+" << zh->tqlayoutUnitToPixelX( toAdd ) << ", pixelxadj=" << pixelx+zh->tqlayoutUnitToPixelX( toAdd )-zh->tqlayoutUnitToPixelX( chr.x ) << endl;
+ kdDebug(32500) << "koBidiReorderLine: pos=" << pos << " x(LU)=" << x << " toAdd(LU)=" << toAdd << " -> chr.x=" << chr.x << " pixelx=" << pixelx << "+" << zh->layoutUnitToPixelX( toAdd ) << ", pixelxadj=" << pixelx+zh->layoutUnitToPixelX( toAdd )-zh->layoutUnitToPixelX( chr.x ) << endl;
#endif
chr.rightToLeft = TRUE;
chr.startOfRun = FALSE;
@@ -1028,7 +1028,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine(
if( numSpaces && !first && settings->isBreakable( text, pos ) ) {
int s = space / numSpaces;
toAdd += s;
- toAddPix = zh->tqlayoutUnitToPixelX( toAdd );
+ toAddPix = zh->layoutUnitToPixelX( toAdd );
space -= s;
numSpaces--;
} else if ( first ) {
@@ -1041,7 +1041,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine(
}
}
chr.x = x + toAdd;
- chr.pixelxadj = pixelx + toAddPix - zh->tqlayoutUnitToPixelX( chr.x );
+ chr.pixelxadj = pixelx + toAddPix - zh->layoutUnitToPixelX( chr.x );
chr.rightToLeft = FALSE;
chr.startOfRun = FALSE;
int ww = chr.width;