summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_cell.cc
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-19 11:38:41 -0600
committerTimothy Pearson <[email protected]>2011-12-19 11:38:41 -0600
commitf0de9e167e289ab7dc33e57f077c1f04ec7c68c8 (patch)
tree1fc538e179833e62caec21956bfe47a252be5a72 /kspread/kspread_cell.cc
parent11191ef0b9908604d1d7aaca382b011ef22c454c (diff)
downloadkoffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.tar.gz
koffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.zip
Remove additional unneeded tq method conversions
Diffstat (limited to 'kspread/kspread_cell.cc')
-rw-r--r--kspread/kspread_cell.cc88
1 files changed, 44 insertions, 44 deletions
diff --git a/kspread/kspread_cell.cc b/kspread/kspread_cell.cc
index 705f77b4..0cbda2b4 100644
--- a/kspread/kspread_cell.cc
+++ b/kspread/kspread_cell.cc
@@ -1049,20 +1049,20 @@ TQString Cell::encodeFormula( bool _era, int _col, int _row ) const
int col = 0;
col = util_decodeColumnLabelText( buffer );
if ( fix1 )
- erg += TQString( "$%1" ).tqarg( col );
+ erg += TQString( "$%1" ).arg( col );
else
if (_era)
- erg += TQChar(0xA7) + TQString( "%1" ).tqarg( col );
+ erg += TQChar(0xA7) + TQString( "%1" ).arg( col );
else
- erg += TQString( "#%1" ).tqarg( col - _col );
+ erg += TQString( "#%1" ).arg( col - _col );
if ( fix2 )
- erg += TQString( "$%1#").tqarg( row );
+ erg += TQString( "$%1#").arg( row );
else
if (_era)
- erg += TQChar(0xA7) + TQString( "%1#" ).tqarg( row );
+ erg += TQChar(0xA7) + TQString( "%1#" ).arg( row );
else
- erg += TQString( "#%1#" ).tqarg( row - _row );
+ erg += TQString( "#%1#" ).arg( row - _row );
}
}
else
@@ -1687,7 +1687,7 @@ void Cell::offsetAlign( int _col, int _row )
const double effTop = BORDER_SPACE + 0.5 * effTopBorderPen( _col, _row ).width();
const double effBottom = h - BORDER_SPACE - 0.5 * effBottomBorderPen( _col, _row ).width();
- // Calculate d->textY based on the vertical tqalignment and a few
+ // Calculate d->textY based on the vertical alignment and a few
// other inputs.
switch( ay )
{
@@ -1846,7 +1846,7 @@ void Cell::offsetAlign( int _col, int _row )
a = Format::Left;
}
- // Calculate d->textX based on tqalignment and textwidth.
+ // Calculate d->textX based on alignment and textwidth.
switch ( a ) {
case Format::Left:
d->textX = 0.5 * effLeftBorderPen( _col, _row ).width() + BORDER_SPACE;
@@ -2052,7 +2052,7 @@ bool Cell::makeFormula()
if (format()->sheet()->doc()->getShowMessageError())
{
TQString tmp(i18n("Error in cell %1\n\n"));
- tmp = tmp.tqarg( fullName() );
+ tmp = tmp.arg( fullName() );
KMessageBox::error( (TQWidget*)0L, tmp);
}
setFlag(Flag_ParseError);
@@ -2253,7 +2253,7 @@ void Cell::paintCell( const KoRect &rect, TQPainter & painter,
selected = selected && !( markerArea.contains( cellRef ) );
// Don't draw any selection at all when printing.
- if ( painter.tqdevice()->isExtDev() || !drawCursor )
+ if ( painter.device()->isExtDev() || !drawCursor )
selected = false;
}
@@ -2299,7 +2299,7 @@ void Cell::paintCell( const KoRect &rect, TQPainter & painter,
// 2. Paint the default borders if we are on screen or if we are printing
// and the checkbox to do this is checked.
- if ( painter.tqdevice()->devType() != TQInternal::Printer
+ if ( painter.device()->devType() != TQInternal::Printer
|| format()->sheet()->print()->printGrid())
paintDefaultBorders( painter, rect, cellRect, cellRef,
paintBorderRight, paintBorderBottom,
@@ -2336,7 +2336,7 @@ void Cell::paintCell( const KoRect &rect, TQPainter & painter,
// If we print pages, then we disable clipping, otherwise borders are
// cut in the middle at the page borders.
- if ( painter.tqdevice()->isExtDev() )
+ if ( painter.device()->isExtDev() )
painter.setClipping( false );
// Paint the borders if this cell is not part of another merged cell.
@@ -2350,7 +2350,7 @@ void Cell::paintCell( const KoRect &rect, TQPainter & painter,
}
// Turn clipping back on.
- if ( painter.tqdevice()->isExtDev() )
+ if ( painter.device()->isExtDev() )
painter.setClipping( true );
// 5. Paint diagonal lines and page borders.
@@ -2364,12 +2364,12 @@ void Cell::paintCell( const KoRect &rect, TQPainter & painter,
if ( !isObscured() ) {
// 6a. Paint possible comment indicator.
- if ( !painter.tqdevice()->isExtDev()
+ if ( !painter.device()->isExtDev()
|| format()->sheet()->print()->printCommentIndicator() )
paintCommentIndicator( painter, cellRect, cellRef, backgroundColor );
// 6b. Paint possible formula indicator.
- if ( !painter.tqdevice()->isExtDev()
+ if ( !painter.device()->isExtDev()
|| format()->sheet()->print()->printFormulaIndicator() )
paintFormulaIndicator( painter, cellRect, backgroundColor );
@@ -2389,7 +2389,7 @@ void Cell::paintCell( const KoRect &rect, TQPainter & painter,
// b) something indicates that the text should not be painted
// c) the sheet is protected and the cell is hidden.
if ( !d->strOutText.isEmpty()
- && ( !painter.tqdevice()->isExtDev()
+ && ( !painter.device()->isExtDev()
|| !format()->getDontprintText( cellRef.x(), cellRef.y() ) )
&& !( format()->sheet()->isProtected()
&& format()->isHideAll( cellRef.x(), cellRef.y() ) ) )
@@ -2402,7 +2402,7 @@ void Cell::paintCell( const KoRect &rect, TQPainter & painter,
// cells, then paint the obscuring cell(s). Otherwise don't do
// anything so that we don't cause an infinite loop.
if ( isObscured() && paintingObscured == 0 &&
- !( sheetDir == Sheet::RightToLeft && painter.tqdevice()->isExtDev() ) )
+ !( sheetDir == Sheet::RightToLeft && painter.device()->isExtDev() ) )
{
//kdDebug(36001) << "painting cells that obscure " << name() << endl;
@@ -2723,7 +2723,7 @@ void Cell::paintBackground( TQPainter& painter, const KoRect &cellRect,
TQColor bg( backgroundColor );
// Handle printers separately.
- if ( !painter.tqdevice()->isExtDev() ) {
+ if ( !painter.device()->isExtDev() ) {
if ( bg.isValid() )
painter.setBackgroundColor( bg );
else
@@ -2742,7 +2742,7 @@ void Cell::paintBackground( TQPainter& painter, const KoRect &cellRect,
}
// Erase the background of the cell.
- if ( !painter.tqdevice()->isExtDev() )
+ if ( !painter.device()->isExtDev() )
painter.eraseRect( zoomedCellRect );
// Get a background brush
@@ -2791,7 +2791,7 @@ void Cell::paintDefaultBorders( TQPainter& painter, const KoRect &rect,
Doc* doc = sheet()->doc();
Sheet::LayoutDirection sheetDir = format()->sheet()->layoutDirection();
- bool paintingToExternalDevice = painter.tqdevice()->isExtDev();
+ bool paintingToExternalDevice = painter.device()->isExtDev();
// Each cell is responsible for drawing it's top and left portions
// of the "default" grid. --Or not drawing it if it shouldn't be
@@ -2948,7 +2948,7 @@ void Cell::paintDefaultBorders( TQPainter& painter, const KoRect &rect,
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.tqdevice()->isExtDev() ) {
+ if ( painter.device()->isExtDev() ) {
if ( sheetDir == Sheet::RightToLeft )
painter.drawLine( doc->zoomItX( TQMAX( rect.left(), cellRect.x() ) ),
doc->zoomItY( TQMAX( rect.top(), cellRect.y() + dt ) ),
@@ -2995,7 +2995,7 @@ void Cell::paintDefaultBorders( TQPainter& painter, const KoRect &rect,
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.tqdevice()->isExtDev() ) {
+ if ( painter.device()->isExtDev() ) {
painter.drawLine( doc->zoomItX( TQMAX( rect.left(), cellRect.x() + dl ) ),
doc->zoomItY( TQMAX( rect.top(), cellRect.bottom() ) ),
doc->zoomItX( TQMIN( rect.right(), cellRect.right() - dr ) ),
@@ -3026,7 +3026,7 @@ void Cell::paintCommentIndicator( TQPainter& painter,
&& cellRect.width() > 10.0
&& cellRect.height() > 10.0
&& ( sheet()->print()->printCommentIndicator()
- || ( !painter.tqdevice()->isExtDev() && sheet()->getShowCommentIndicator() ) ) ) {
+ || ( !painter.device()->isExtDev() && sheet()->getShowCommentIndicator() ) ) ) {
TQColor penColor = TQt::red;
// If background has high red part, switch to blue.
@@ -3123,7 +3123,7 @@ void Cell::paintMoreTextIndicator( TQPainter& painter,
// Show a red triangle when it's not possible to write all text in cell.
// Don't print the red triangle if we're printing.
if( testFlag( Flag_CellTooShortX ) &&
- !painter.tqdevice()->isExtDev() &&
+ !painter.device()->isExtDev() &&
cellRect.height() > 4.0 &&
cellRect.width() > 4.0 )
{
@@ -3180,7 +3180,7 @@ void Cell::paintText( TQPainter& painter,
// Resolve the text color if invalid (=default).
if ( !textColorPrint.isValid() ) {
- if ( painter.tqdevice()->isExtDev() )
+ if ( painter.device()->isExtDev() )
textColorPrint = TQt::black;
else
textColorPrint = TQApplication::tqpalette().active().text();
@@ -3466,7 +3466,7 @@ void Cell::paintPageBorders( TQPainter& painter,
bool paintBorderBottom )
{
// Not screen? Return immediately.
- if ( painter.tqdevice()->isExtDev() )
+ if ( painter.device()->isExtDev() )
return;
if ( ! format()->sheet()->isShowPageBorders() )
@@ -3628,7 +3628,7 @@ void Cell::paintCellBorders( TQPainter& painter, const KoRect& rect,
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.tqdevice()->isExtDev() ) {
+ if ( painter.device()->isExtDev() ) {
// FIXME: There is probably Cut&Paste bugs here as well as below.
// The TQMIN/TQMAX and left/right pairs don't really make sense.
//
@@ -3675,7 +3675,7 @@ void Cell::paintCellBorders( TQPainter& painter, const KoRect& rect,
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.tqdevice()->isExtDev() ) {
+ if ( painter.device()->isExtDev() ) {
if ( sheetDir == Sheet::RightToLeft )
painter.drawLine( TQMAX( zrect_left, zcellRect_left ),
TQMAX( zrect_top, zcellRect_top - top ),
@@ -3716,7 +3716,7 @@ void Cell::paintCellBorders( TQPainter& painter, const KoRect& rect,
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.tqdevice()->isExtDev() ) {
+ if ( painter.device()->isExtDev() ) {
if ( zcellRect_top >= zrect_top + top_penWidth / 2)
painter.drawLine( TQMAX( zrect_left, zcellRect_left ),
zcellRect_top,
@@ -3738,7 +3738,7 @@ void Cell::paintCellBorders( TQPainter& painter, const KoRect& rect,
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.tqdevice()->isExtDev() ) {
+ if ( painter.device()->isExtDev() ) {
if ( zcellRect_bottom <= zrect_bottom + bottom_penWidth / 2)
painter.drawLine( TQMAX( zrect_left, zcellRect_left ),
zcellRect_bottom,
@@ -3762,7 +3762,7 @@ void Cell::paintCellBorders( TQPainter& painter, const KoRect& rect,
#if 0
// Look at the cells on our corners. It may happen that we
// just erased parts of their borders corner, so we might need
- // to tqrepaint these corners.
+ // to repaint these corners.
//
TQPen vert_pen, horz_pen;
int vert_penWidth, horz_penWidth;
@@ -3810,7 +3810,7 @@ void Cell::paintCellBorders( TQPainter& painter, const KoRect& rect,
painter.setPen( vert_pen );
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.tqdevice()->isExtDev() ) {
+ if ( painter.device()->isExtDev() ) {
if ( sheetDir == Sheet::RightToLeft )
painter.drawLine( TQMAX( zrect_left, zcellRect_right ),
TQMAX( zrect_top, zcellRect_top ),
@@ -3860,7 +3860,7 @@ void Cell::paintCellBorders( TQPainter& painter, const KoRect& rect,
painter.setPen( vert_pen );
//If we are on paper printout, we limit the length of the lines
//On paper, we always have full cells, on screen not
- if ( painter.tqdevice()->isExtDev() ) {
+ if ( painter.device()->isExtDev() ) {
if ( sheetDir == Sheet::RightToLeft )
painter.drawLine( TQMAX( zrect_left, zcellRect_left ),
TQMAX( zrect_top, zcellRect_top ),
@@ -3913,7 +3913,7 @@ void Cell::paintCellBorders( TQPainter& painter, const KoRect& rect,
painter.setPen( vert_pen );
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.tqdevice()->isExtDev() ) {
+ if ( painter.device()->isExtDev() ) {
if ( sheetDir == Sheet::RightToLeft )
painter.drawLine( TQMAX( zrect_left, zcellRect_right ),
TQMAX( zrect_top, zcellRect_bottom - bottom ),
@@ -3965,7 +3965,7 @@ void Cell::paintCellBorders( TQPainter& painter, const KoRect& rect,
painter.setPen( vert_pen );
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.tqdevice()->isExtDev() ) {
+ if ( painter.device()->isExtDev() ) {
if ( sheetDir == Sheet::RightToLeft )
painter.drawLine( TQMAX( zrect_left, zcellRect_left ),
TQMAX( zrect_top, zcellRect_bottom - bottom ),
@@ -5232,7 +5232,7 @@ TQDomElement Cell::save( TQDomDocument& doc,
{
TQDomElement dateMin = doc.createElement( "datemin" );
TQString tmp("%1/%2/%3");
- tmp = tmp.tqarg(d->extra()->validity->dateMin.year()).tqarg(d->extra()->validity->dateMin.month()).tqarg(d->extra()->validity->dateMin.day());
+ tmp = tmp.arg(d->extra()->validity->dateMin.year()).arg(d->extra()->validity->dateMin.month()).arg(d->extra()->validity->dateMin.day());
dateMin.appendChild( doc.createTextNode( tmp ) );
validity.appendChild( dateMin );
}
@@ -5240,7 +5240,7 @@ TQDomElement Cell::save( TQDomDocument& doc,
{
TQDomElement dateMax = doc.createElement( "datemax" );
TQString tmp("%1/%2/%3");
- tmp = tmp.tqarg(d->extra()->validity->dateMax.year()).tqarg(d->extra()->validity->dateMax.month()).tqarg(d->extra()->validity->dateMax.day());
+ tmp = tmp.arg(d->extra()->validity->dateMax.year()).arg(d->extra()->validity->dateMax.month()).arg(d->extra()->validity->dateMax.day());
dateMax.appendChild( doc.createTextNode( tmp ) );
validity.appendChild( dateMax );
}
@@ -5312,7 +5312,7 @@ bool Cell::saveCellResult( TQDomDocument& doc, TQDomElement& result,
TQDate dd = value().asDateTime().date();
dataType = "Date";
str = "%1/%2/%3";
- str = str.tqarg(dd.year()).tqarg(dd.month()).tqarg(dd.day());
+ str = str.arg(dd.year()).arg(dd.month()).arg(dd.day());
}
else if( isTime() )
{
@@ -6048,25 +6048,25 @@ void Cell::loadOasisObjects( const TQDomElement &parent, KoOasisLoadingContext&
if ( !point.isValid() )
continue;
- KoRect tqgeometry = obj->tqgeometry();
- tqgeometry.setLeft( tqgeometry.left() + sheet()->columnPos( d->column, 0 ) );
- tqgeometry.setTop( tqgeometry.top() + sheet()->rowPos( d->row, 0 ) );
+ KoRect geometry = obj->geometry();
+ geometry.setLeft( geometry.left() + sheet()->columnPos( d->column, 0 ) );
+ geometry.setTop( geometry.top() + sheet()->rowPos( d->row, 0 ) );
TQString str = e.attributeNS( KoXmlNS::table, "end-x", TQString() );
if ( !str.isNull() )
{
uint end_x = (uint) KoUnit::parseValue( str );
- tqgeometry.setRight( sheet()->columnPos( point.column(), 0) + end_x );
+ geometry.setRight( sheet()->columnPos( point.column(), 0) + end_x );
}
str = e.attributeNS( KoXmlNS::table, "end-y", TQString() );
if ( !str.isNull() )
{
uint end_y = (uint) KoUnit::parseValue( str );
- tqgeometry.setBottom( sheet()->rowPos( point.row(), 0) + end_y );
+ geometry.setBottom( sheet()->rowPos( point.row(), 0) + end_y );
}
- obj->setGeometry( tqgeometry );
+ obj->setGeometry( geometry );
}
}
}