diff options
Diffstat (limited to 'kspread/kspread_canvas.cc')
-rw-r--r-- | kspread/kspread_canvas.cc | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/kspread/kspread_canvas.cc b/kspread/kspread_canvas.cc index 96d4836a..a6411621 100644 --- a/kspread/kspread_canvas.cc +++ b/kspread/kspread_canvas.cc @@ -566,7 +566,7 @@ void Canvas::validateSelection() TQString t; do { - i = message.tqfind( "\n", pos ); + i = message.find( "\n", pos ); if ( i == -1 ) t = message.mid( pos, message.length() - pos ); else @@ -1110,7 +1110,7 @@ void Canvas::mouseMoveEvent( TQMouseEvent * _ev ) // Test wether mouse is over the selection handle TQRect selectionHandle = d->view->selectionInfo()->selectionHandleArea(); - if ( selectionHandle.tqcontains( TQPoint( d->view->doc()->zoomItX( ev_PosX ), + if ( selectionHandle.contains( TQPoint( d->view->doc()->zoomItX( ev_PosX ), d->view->doc()->zoomItY( ev_PosY ) ) ) ) { //If the cursor is over the handle, than it might be already on the next cell. @@ -1131,8 +1131,8 @@ void Canvas::mouseMoveEvent( TQMouseEvent * _ev ) if ( !sheet->isProtected() ) setCursor( KCursor::handCursor() ); } - else if ( r1.tqcontains( TQPoint( (int) ev_PosX, (int) ev_PosY ) ) - && !r2.tqcontains( TQPoint( (int) ev_PosX, (int) ev_PosY ) ) ) + else if ( r1.contains( TQPoint( (int) ev_PosX, (int) ev_PosY ) ) + && !r2.contains( TQPoint( (int) ev_PosX, (int) ev_PosY ) ) ) { setCursor( KCursor::handCursor() ); } @@ -1246,7 +1246,7 @@ void Canvas::processClickSelectionHandle( TQMouseEvent *event ) void Canvas::processLeftClickAnchor() { bool isRefLink = localReferenceAnchor( d->anchor ); - bool isLocalLink = (d->anchor.tqfind("file:") == 0); + bool isLocalLink = (d->anchor.find("file:") == 0); if ( !isRefLink ) { TQString type=KMimeType::findByURL(d->anchor, 0, isLocalLink)->name(); @@ -1296,7 +1296,7 @@ bool Canvas::highlightRangeSizeGripAt(double x, double y) ( 6 ), ( 6 ) ); - if (handle.tqcontains(TQPoint((int) x,(int) y))) + if (handle.contains(TQPoint((int) x,(int) y))) { return true; } @@ -1428,7 +1428,7 @@ void Canvas::mousePressEvent( TQMouseEvent * _ev ) d->scrollTimer->start( 50 ); // Did we click in the lower right corner of the marker/marked-area ? - if ( selectionInfo()->selectionHandleArea().tqcontains( TQPoint( d->view->doc()->zoomItX( ev_PosX ), + if ( selectionInfo()->selectionHandleArea().contains( TQPoint( d->view->doc()->zoomItX( ev_PosX ), d->view->doc()->zoomItY( ev_PosY ) ) ) ) { processClickSelectionHandle( _ev ); @@ -1462,8 +1462,8 @@ void Canvas::mousePressEvent( TQMouseEvent * _ev ) d->dragStart.setX( -1 ); - if ( r1.tqcontains( TQPoint( (int) ev_PosX, (int) ev_PosY ) ) - && !r2.tqcontains( TQPoint( (int) ev_PosX, (int) ev_PosY ) ) ) + if ( r1.contains( TQPoint( (int) ev_PosX, (int) ev_PosY ) ) + && !r2.contains( TQPoint( (int) ev_PosX, (int) ev_PosY ) ) ) { d->dragStart.setX( (int) ev_PosX ); d->dragStart.setY( (int) ev_PosY ); @@ -1543,7 +1543,7 @@ void Canvas::mousePressEvent( TQMouseEvent * _ev ) } break; case Qt::RightButton: - if (!selectionInfo()->tqcontains( TQPoint( col, row ) )) + if (!selectionInfo()->contains( TQPoint( col, row ) )) { // No selection or the mouse press was outside of an existing selection? (d->chooseCell ? choice() : selectionInfo())->initialize(TQPoint(col,row), activeSheet()); @@ -1738,7 +1738,7 @@ void Canvas::dragMoveEvent( TQDragMoveEvent * _ev ) double ev_PosY = d->view->doc()->unzoomItY( _ev->pos().y() ) + yOffset(); - if ( r1.tqcontains( TQPoint ((int) ev_PosX, (int) ev_PosY) ) ) + if ( r1.contains( TQPoint ((int) ev_PosX, (int) ev_PosY) ) ) _ev->ignore( r1 ); } @@ -1776,7 +1776,7 @@ void Canvas::dropEvent( TQDropEvent * _ev ) double ev_PosY = d->view->doc()->unzoomItY( _ev->pos().y() ) + yOffset(); - if ( r1.tqcontains( TQPoint ((int) ev_PosX, (int) ev_PosY) ) ) + if ( r1.contains( TQPoint ((int) ev_PosX, (int) ev_PosY) ) ) { _ev->ignore( ); return; @@ -3239,14 +3239,14 @@ void Canvas::speakCell(TQWidget* w, const TQPoint& p, uint flags) // Try to format the formula so synth can more clearly speak it. TQString f2; for (uint i = 0; i < f.length(); i++) f2 += f[i] + " "; - f2.tqreplace("(", i18n("character (", "left paren")); - f2.tqreplace(")", i18n("character )", "right paren")); - f2.tqreplace(":", i18n("character :", "colon")); - f2.tqreplace(";", i18n("character ;", "semicolon")); - f2.tqreplace("=", i18n("character =", "equals")); - f2.tqreplace(".", i18n("character .", "point")); - f2.tqreplace(",", i18n("character ,", "comma")); - f2.tqreplace(" . . ", i18n("characters ..", " dot dot ")); + f2.replace("(", i18n("character (", "left paren")); + f2.replace(")", i18n("character )", "right paren")); + f2.replace(":", i18n("character :", "colon")); + f2.replace(";", i18n("character ;", "semicolon")); + f2.replace("=", i18n("character =", "equals")); + f2.replace(".", i18n("character .", "point")); + f2.replace(",", i18n("character ,", "comma")); + f2.replace(" . . ", i18n("characters ..", " dot dot ")); text.append(i18n("Spreadsheet formula", " Formula ") + f2); } // kdDebug() << "Canvas::speakCell: text = " << text << endl; @@ -3295,7 +3295,7 @@ KSpread::EmbeddedObject *Canvas::getObject( const TQPoint &pos, Sheet *_sheet ) bound.width(), bound.height() ) ); zoomedBound.moveBy( (int)( -xOffset() * doc()->zoomedResolutionX() ), (int)( -yOffset() * doc()->zoomedResolutionY() ) ); - if ( zoomedBound.tqcontains( p ) ) + if ( zoomedBound.contains( p ) ) return itObject.current(); } } @@ -3636,7 +3636,7 @@ void Canvas::displayObjectList( TQPtrList<EmbeddedObject> &list ) { // it can happen that the object is no longer there e.g. when // the insert of the object is undone - int pos = doc()->embeddedObjects().tqfindRef( d->m_objectDisplayAbove ); + int pos = doc()->embeddedObjects().findRef( d->m_objectDisplayAbove ); if ( pos != -1 && d->m_objectDisplayAbove->isSelected() ) { list.take( pos ); @@ -3679,8 +3679,8 @@ void Canvas::deleteEditor (bool saveChanges, bool array) if ( t.at(0)=='=' ) { //a formula - int openParenthese = t.tqcontains('(' ); - int closeParenthese = t.tqcontains(')' ); + int openParenthese = t.contains('(' ); + int closeParenthese = t.contains(')' ); int diff = TQABS( openParenthese - closeParenthese ); if ( openParenthese > closeParenthese ) { @@ -4732,7 +4732,7 @@ void VBorder::mousePressEvent( TQMouseEvent * _ev ) m_iSelectionAnchor = hit_row; - if ( !m_pView->selectionInfo()->tqcontains( TQPoint(1, hit_row) ) || + if ( !m_pView->selectionInfo()->contains( TQPoint(1, hit_row) ) || !( _ev->button() == Qt::RightButton ) || !m_pView->selectionInfo()->isRowSelected() ) { @@ -4796,7 +4796,7 @@ void VBorder::mouseReleaseEvent( TQMouseEvent * _ev ) rect.setCoords( 1, m_iResizedRow, KS_colMax, m_iResizedRow ); if ( m_pView->selectionInfo()->isRowSelected() ) { - if ( m_pView->selectionInfo()->tqcontains( TQPoint( 1, m_iResizedRow ) ) ) + if ( m_pView->selectionInfo()->contains( TQPoint( 1, m_iResizedRow ) ) ) { start = m_pView->selectionInfo()->lastRange().top(); end = m_pView->selectionInfo()->lastRange().bottom(); @@ -5348,7 +5348,7 @@ void HBorder::mousePressEvent( TQMouseEvent * _ev ) m_iSelectionAnchor = hit_col; - if ( !m_pView->selectionInfo()->tqcontains( TQPoint( hit_col, 1 ) ) || + if ( !m_pView->selectionInfo()->contains( TQPoint( hit_col, 1 ) ) || !( _ev->button() == Qt::RightButton ) || !m_pView->selectionInfo()->isColumnSelected() ) { @@ -5413,7 +5413,7 @@ void HBorder::mouseReleaseEvent( TQMouseEvent * _ev ) rect.setCoords( m_iResizedColumn, 1, m_iResizedColumn, KS_rowMax ); if ( m_pView->selectionInfo()->isColumnSelected() ) { - if ( m_pView->selectionInfo()->tqcontains( TQPoint( m_iResizedColumn, 1 ) ) ) + if ( m_pView->selectionInfo()->contains( TQPoint( m_iResizedColumn, 1 ) ) ) { start = m_pView->selectionInfo()->lastRange().left(); end = m_pView->selectionInfo()->lastRange().right(); @@ -6093,7 +6093,7 @@ void ToolTip::maybeTip( const TQPoint& p ) v ); marker = m_canvas->doc()->zoomRect( unzoomedMarker ); - insideMarker = marker.tqcontains( p ); + insideMarker = marker.contains( p ); } else { @@ -6103,7 +6103,7 @@ void ToolTip::maybeTip( const TQPoint& p ) v ); marker = m_canvas->doc()->zoomRect( unzoomedMarker ); - insideMarker = marker.tqcontains( p ); + insideMarker = marker.contains( p ); } // No use if mouse is somewhere else |