summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kspread/kspread_view.cc')
-rw-r--r--kspread/kspread_view.cc120
1 files changed, 60 insertions, 60 deletions
diff --git a/kspread/kspread_view.cc b/kspread/kspread_view.cc
index 3244a11d..8d1d8ddf 100644
--- a/kspread/kspread_view.cc
+++ b/kspread/kspread_view.cc
@@ -213,9 +213,9 @@ public:
TQStringList replaceStrings;
FindOption::searchTypeValue typeValue;
FindOption::searchDirectionValue directionValue;
- // Current "tqfind" operation
- KFind* tqfind;
- KReplace* tqreplace;
+ // Current "find" operation
+ KFind* find;
+ KReplace* replace;
int findLeftColumn;
int findRightColumn;
TQPoint findPos;
@@ -411,8 +411,8 @@ public:
KAction* paste;
KAction* specialPaste;
KAction* insertCellCopy;
- KAction* tqfind;
- KAction* tqreplace;
+ KAction* find;
+ KAction* replace;
// navigation
KAction* gotoCell;
@@ -967,11 +967,11 @@ void View::Private::initActions()
0, TQT_TQOBJECT(view), TQT_SLOT( slotInsertCellCopy() ), ac, "insertCellCopy" );
actions->insertCellCopy->setToolTip(i18n("Inserts a cell from the clipboard into the spreadsheet."));
- actions->tqfind = KStdAction::find( TQT_TQOBJECT(view), TQT_SLOT(tqfind()), ac );
+ actions->find = KStdAction::find( TQT_TQOBJECT(view), TQT_SLOT(find()), ac );
/*actions->findNext =*/ KStdAction::findNext( TQT_TQOBJECT(view), TQT_SLOT( findNext() ), ac );
/*actions->findPrevious =*/ KStdAction::findPrev( TQT_TQOBJECT(view), TQT_SLOT( findPrevious() ), ac );
- actions->tqreplace = KStdAction::replace( TQT_TQOBJECT(view), TQT_SLOT(tqreplace()), ac );
+ actions->replace = KStdAction::replace( TQT_TQOBJECT(view), TQT_SLOT(replace()), ac );
actions->fillRight = new KAction( i18n( "&Right" ), 0,
0, TQT_TQOBJECT(view), TQT_SLOT( fillRight() ), ac, "fillRight" );
@@ -1152,7 +1152,7 @@ void View::Private::initActions()
void View::Private::adjustActions( bool mode )
{
- actions->tqreplace->setEnabled( mode );
+ actions->replace->setEnabled( mode );
actions->insertSeries->setEnabled( mode );
actions->insertLink->setEnabled( mode );
actions->insertSpecialChar->setEnabled( mode );
@@ -1444,7 +1444,7 @@ void KPSheetSelectPage::setOptions( const TQMap<TQString,TQString>& opts )
{
unsigned int i = 0;
TQStringList sheetlist;
- while (opts.tqcontains(printOptionForIndex(i)))
+ while (opts.contains(printOptionForIndex(i)))
{
sheetlist.prepend(opts[printOptionForIndex(i++)]);
}
@@ -1506,7 +1506,7 @@ TQStringList KPSheetSelectPage::selectedSheets(KPrinter &prt)
TQStringList list;
unsigned int index;
const TQMap<TQString,TQString>& options = prt.options();
- for (index = 0; options.tqcontains(KPSheetSelectPage::printOptionForIndex(index)); index++)
+ for (index = 0; options.contains(KPSheetSelectPage::printOptionForIndex(index)); index++)
{
list.append(options[KPSheetSelectPage::printOptionForIndex(index)]);
}
@@ -1759,8 +1759,8 @@ View::View( TQWidget *_parent, const char *_name,
d->findRightColumn = 0;
d->typeValue = FindOption::Value;
d->directionValue = FindOption::Row;
- d->tqfind = 0;
- d->tqreplace = 0;
+ d->find = 0;
+ d->replace = 0;
d->popupMenuFirstToolId = 0;
d->popupMenu = 0;
@@ -2452,7 +2452,7 @@ bool View::spellSwitchToOtherSheet()
// for optimization
TQPtrList<Sheet> sheetList = doc()->map()->sheetList();
- unsigned int curIndex = sheetList.tqfindRef(d->spell.currentSpellSheet);
+ unsigned int curIndex = sheetList.findRef(d->spell.currentSpellSheet);
++curIndex;
// last sheet? then start at the beginning
@@ -2536,7 +2536,7 @@ void View::spellCheckerCorrected( const TQString & old, const TQString & corr,
d->spell.spellCurrCellX,
d->spell.spellCurrCellY,
cell->formatType());
- content.tqreplace( pos, old.length(), corr );
+ content.replace( pos, old.length(), corr );
cell->setCellText( content );
d->editWidget->setText( content );
@@ -2838,8 +2838,8 @@ void View::updateReadWrite( bool readwrite )
d->actions->gotoCell->setEnabled( true );
d->actions->viewZoom->setEnabled( true );
d->actions->showPageBorders->setEnabled( true );
- d->actions->tqfind->setEnabled( true);
- d->actions->tqreplace->setEnabled( readwrite );
+ d->actions->find->setEnabled( true);
+ d->actions->replace->setEnabled( readwrite );
if ( !doc()->isReadWrite())
d->actions->copy->setEnabled( true );
// d->actions->newView->setEnabled( true );
@@ -3846,9 +3846,9 @@ void View::setActiveSheet( Sheet * _t, bool updateSheet )
d->adjustWorkbookActions( !doc()->map()->isProtected() );
/* see if there was a previous selection on this other sheet */
- TQMapIterator<Sheet*, TQPoint> it = d->savedAnchors.tqfind(d->activeSheet);
- TQMapIterator<Sheet*, TQPoint> it2 = d->savedMarkers.tqfind(d->activeSheet);
- TQMapIterator<Sheet*, KoPoint> it3 = d->savedOffsets.tqfind(d->activeSheet);
+ TQMapIterator<Sheet*, TQPoint> it = d->savedAnchors.find(d->activeSheet);
+ TQMapIterator<Sheet*, TQPoint> it2 = d->savedMarkers.find(d->activeSheet);
+ TQMapIterator<Sheet*, KoPoint> it3 = d->savedOffsets.find(d->activeSheet);
// TODO Stefan: store the save markers/anchors in the Selection?
TQPoint newAnchor = (it == d->savedAnchors.end()) ? TQPoint(1,1) : *it;
@@ -4027,7 +4027,7 @@ void View::hideSheet()
}
TQStringList vs = doc()->map()->visibleSheets();
- int i = vs.tqfindIndex( d->activeSheet->tableName() ) - 1;
+ int i = vs.findIndex( d->activeSheet->tableName() ) - 1;
if( i < 0 ) i = 1;
TQString sn = vs[i];
@@ -4452,7 +4452,7 @@ void View::gotoCell()
dlg.exec();
}
-void View::tqfind()
+void View::find()
{
if (!activeSheet()) return;
@@ -4469,10 +4469,10 @@ void View::tqfind()
d->directionValue = dlg.searchDirection();
// Create the KFind object
- delete d->tqfind;
- delete d->tqreplace;
- d->tqfind = new KFind( dlg.pattern(), dlg.options(), this );
- d->tqreplace = 0L;
+ delete d->find;
+ delete d->replace;
+ d->find = new KFind( dlg.pattern(), dlg.options(), this );
+ d->replace = 0L;
d->searchInSheets.currentSheet = activeSheet();
d->searchInSheets.firstSheet = d->searchInSheets.currentSheet;
@@ -4481,11 +4481,11 @@ void View::tqfind()
findNext();
}
-// Initialize a find or replace operation, using d->find or d->tqreplace,
+// Initialize a find or replace operation, using d->find or d->replace,
// and d->findOptions.
void View::initFindReplace()
{
- KFind* findObj = d->tqfind ? d->tqfind : d->tqreplace;
+ KFind* findObj = d->find ? d->find : d->replace;
Q_ASSERT( findObj );
connect(findObj, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
this, TQT_SLOT( slotHighlight( const TQString &, int, int ) ) );
@@ -4518,9 +4518,9 @@ void View::initFindReplace()
void View::findNext()
{
- KFind* findObj = d->tqfind ? d->tqfind : d->tqreplace;
+ KFind* findObj = d->find ? d->find : d->replace;
if ( !findObj ) {
- tqfind();
+ find();
return;
}
KFind::Result res = KFind::NoMatch;
@@ -4539,10 +4539,10 @@ void View::findNext()
}
// Let KFind inspect the text fragment, and display a dialog if a match is found
- if ( d->tqfind )
- res = d->tqfind->find();
+ if ( d->find )
+ res = d->find->find();
else
- res = d->tqreplace->replace();
+ res = d->replace->replace();
if ( res == KFind::NoMatch ) {
// Go to next cell, skipping unwanted cells
@@ -4574,10 +4574,10 @@ void View::findNext()
findNext();
}
else { // done, close the 'find next' dialog
- if ( d->tqfind )
- d->tqfind->closeFindNextDialog();
+ if ( d->find )
+ d->find->closeFindNextDialog();
else
- d->tqreplace->closeReplaceNextDialog();
+ d->replace->closeReplaceNextDialog();
}
}
}
@@ -4660,9 +4660,9 @@ Cell* View::findNextCell()
void View::findPrevious()
{
- KFind* findObj = d->tqfind ? d->tqfind : d->tqreplace;
+ KFind* findObj = d->find ? d->find : d->replace;
if ( !findObj ) {
- tqfind();
+ find();
return;
}
//kdDebug() << "findPrevious" << endl;
@@ -4678,7 +4678,7 @@ void View::findPrevious()
d->findOptions = opt; // restore initial options
}
-void View::tqreplace()
+void View::replace()
{
if (!d->activeSheet)
return;
@@ -4694,21 +4694,21 @@ void View::tqreplace()
d->replaceStrings = dlg.replacementHistory();
d->typeValue = dlg.searchType();
- delete d->tqfind;
- delete d->tqreplace;
- d->tqfind = 0L;
+ delete d->find;
+ delete d->replace;
+ d->find = 0L;
// NOTE Stefan: Avoid beginning of line replacements with nothing which
// will lead to an infinite loop (Bug #125535). The reason
// for this is unclear to me, but who cares and who would
// want to do something like this, häh?!
if (dlg.pattern() == "^" && dlg.replacement().isEmpty())
return;
- d->tqreplace = new KReplace( dlg.pattern(), dlg.replacement(), dlg.options() );
+ d->replace = new KReplace( dlg.pattern(), dlg.replacement(), dlg.options() );
d->searchInSheets.currentSheet = activeSheet();
d->searchInSheets.firstSheet = d->searchInSheets.currentSheet;
initFindReplace();
- connect( d->tqreplace, TQT_SIGNAL( tqreplace( const TQString &, int, int, int ) ),
+ connect( d->replace, TQT_SIGNAL( replace( const TQString &, int, int, int ) ),
this, TQT_SLOT( slotReplace( const TQString &, int, int, int ) ) );
if ( !doc()->undoLocked() )
@@ -4737,10 +4737,10 @@ void View::slotHighlight( const TQString &/*text*/, int /*matchingIndex*/, int /
{
d->selection->initialize( d->findPos );
KDialogBase *baseDialog=0L;
- if ( d->tqfind )
- baseDialog = d->tqfind->findNextDialog();
+ if ( d->find )
+ baseDialog = d->find->findNextDialog();
else
- baseDialog = d->tqreplace->replaceNextDialog();
+ baseDialog = d->replace->replaceNextDialog();
kdDebug()<<" baseDialog :"<<baseDialog<<endl;
TQRect globalRect( d->findPos, d->findEnd );
globalRect.moveTopLeft( canvasWidget()->mapToGlobal( globalRect.topLeft() ) );
@@ -5477,11 +5477,11 @@ KoDocument * View::hitTest( const TQPoint& /*pos*/ )
// {
// if ( ( viewChild = child( docChild->document() ) ) )
// {
-// if ( viewChild->frameRegion( m ).tqcontains( pos ) )
+// if ( viewChild->frameRegion( m ).contains( pos ) )
// return 0;
// }
// else
-// if ( docChild->frameRegion( m ).tqcontains( pos ) )
+// if ( docChild->frameRegion( m ).contains( pos ) )
// return 0;
// }
//
@@ -5490,11 +5490,11 @@ KoDocument * View::hitTest( const TQPoint& /*pos*/ )
// {
// if ( ( viewChild = child( docChild->document() ) ) )
// {
-// if ( viewChild->frameRegion( m ).tqcontains( pos ) )
+// if ( viewChild->frameRegion( m ).contains( pos ) )
// return 0;
// }
// else
-// if ( docChild->frameRegion( m ).tqcontains( pos ) )
+// if ( docChild->frameRegion( m ).contains( pos ) )
// return 0;
// }
//
@@ -5847,7 +5847,7 @@ void View::slotListChoosePopupMenu( )
{
if ( c->value().isString() && c->text() != tmp && !c->text().isEmpty() )
{
- if ( itemList.tqfindIndex( c->text() ) == -1 )
+ if ( itemList.findIndex( c->text() ) == -1 )
itemList.append(c->text());
}
}
@@ -6830,11 +6830,11 @@ void View::slotRename()
i18n("Change Sheet Name") );
newName = newName.simplifyWhiteSpace();
- int n = newName.tqfind('-');
+ int n = newName.find('-');
if ( n > -1 ) newName[n] = '_';
- n = newName.tqfind('!');
+ n = newName.find('!');
if ( n > -1 ) newName[n] = '_';
- n = newName.tqfind('$');
+ n = newName.find('$');
if ( n > -1 ) newName[n] = '_';
newName = KInputDialog::getText( i18n("Rename Sheet"),i18n("Enter name:"), newName, &ok, this );
@@ -7444,19 +7444,19 @@ void View::commandExecuted()
void View::initialiseMarkerFromSheet( Sheet *_sheet, const TQPoint &point )
{
- d->savedMarkers.tqreplace( _sheet, point);
+ d->savedMarkers.replace( _sheet, point);
}
TQPoint View::markerFromSheet( Sheet* sheet ) const
{
- TQMapIterator<Sheet*, TQPoint> it = d->savedMarkers.tqfind(sheet);
+ TQMapIterator<Sheet*, TQPoint> it = d->savedMarkers.find(sheet);
TQPoint newMarker = (it == d->savedMarkers.end()) ? TQPoint(1,1) : *it;
return newMarker;
}
KoPoint View::offsetFromSheet( Sheet* sheet ) const
{
- TQMapIterator<Sheet*, KoPoint> it = d->savedOffsets.tqfind(sheet);
+ TQMapIterator<Sheet*, KoPoint> it = d->savedOffsets.find(sheet);
KoPoint offset = (it == d->savedOffsets.end()) ? KoPoint() : *it;
return offset;
}
@@ -7466,11 +7466,11 @@ void View::saveCurrentSheetSelection()
/* save the current selection on this sheet */
if (d->activeSheet != NULL)
{
- d->savedAnchors.tqreplace(d->activeSheet, d->selection->anchor());
+ d->savedAnchors.replace(d->activeSheet, d->selection->anchor());
kdDebug() << " Current scrollbar vert value: " << d->canvas->vertScrollBar()->value() << endl;
kdDebug() << "Saving marker pos: " << d->selection->marker() << endl;
- d->savedMarkers.tqreplace(d->activeSheet, d->selection->marker());
- d->savedOffsets.tqreplace(d->activeSheet, KoPoint(d->canvas->xOffset(),
+ d->savedMarkers.replace(d->activeSheet, d->selection->marker());
+ d->savedOffsets.replace(d->activeSheet, KoPoint(d->canvas->xOffset(),
d->canvas->yOffset()));
}
}