summaryrefslogtreecommitdiffstats
path: root/kspread
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commitb6edfe41c9395f2e20784cbf0e630af6426950a3 (patch)
tree56ed9b871d4296e6c15949c24e16420be1b28697 /kspread
parentef39e8e4178a8f98cf5f154916ba0f03e4855206 (diff)
downloadkoffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.tar.gz
koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspread')
-rw-r--r--kspread/Doxyfile2
-rw-r--r--kspread/KSpreadViewIface.cc8
-rw-r--r--kspread/KSpreadViewIface.h4
-rw-r--r--kspread/OASIS.txt2
-rw-r--r--kspread/dependencies.cc22
-rw-r--r--kspread/dialogs/kspread_dlg_cons.cc8
-rw-r--r--kspread/dialogs/kspread_dlg_database.cc24
-rw-r--r--kspread/dialogs/kspread_dlg_formula.cc18
-rw-r--r--kspread/dialogs/kspread_dlg_layout.cc20
-rw-r--r--kspread/dialogs/kspread_dlg_paperlayout.cc8
-rw-r--r--kspread/dialogs/kspread_dlg_reference.cc2
-rw-r--r--kspread/dialogs/kspread_dlg_sort.cc2
-rw-r--r--kspread/dialogs/kspread_dlg_styles.cc4
-rw-r--r--kspread/dialogs/kspread_dlg_subtotal.cc2
-rw-r--r--kspread/dialogs/link.cc10
-rw-r--r--kspread/formula.cc2
-rw-r--r--kspread/formula.h2
-rw-r--r--kspread/functions.cc6
-rw-r--r--kspread/ksploadinginfo.h2
-rw-r--r--kspread/kspread_autofill.cc74
-rw-r--r--kspread/kspread_canvas.cc60
-rw-r--r--kspread/kspread_cell.cc122
-rw-r--r--kspread/kspread_cell.h2
-rw-r--r--kspread/kspread_condition.cc18
-rw-r--r--kspread/kspread_doc.cc26
-rw-r--r--kspread/kspread_editors.cc12
-rw-r--r--kspread/kspread_format.cc10
-rw-r--r--kspread/kspread_functions_engineering.cc70
-rw-r--r--kspread/kspread_functions_math.cc2
-rw-r--r--kspread/kspread_functions_text.cc30
-rw-r--r--kspread/kspread_genvalidationstyle.cc4
-rw-r--r--kspread/kspread_map.cc8
-rw-r--r--kspread/kspread_numformat.cc18
-rw-r--r--kspread/kspread_object.cc10
-rw-r--r--kspread/kspread_sheet.cc66
-rw-r--r--kspread/kspread_sheet.h4
-rw-r--r--kspread/kspread_sheetprint.cc62
-rw-r--r--kspread/kspread_sheetprint.h4
-rw-r--r--kspread/kspread_style.cc24
-rw-r--r--kspread/kspread_style_manager.cc8
-rw-r--r--kspread/kspread_undo.cc4
-rw-r--r--kspread/kspread_util.cc28
-rw-r--r--kspread/kspread_util.h2
-rw-r--r--kspread/kspread_view.cc120
-rw-r--r--kspread/kspread_view.h6
-rw-r--r--kspread/ksprsavinginfo.h2
-rw-r--r--kspread/manipulator.cc20
-rw-r--r--kspread/manipulator_data.cc2
-rw-r--r--kspread/plugins/calculator/kcalc_core.cpp2
-rwxr-xr-xkspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py2
-rw-r--r--kspread/region.cc34
-rw-r--r--kspread/region.h14
-rw-r--r--kspread/selection.cc4
-rwxr-xr-xkspread/tests/generate-openformula-tests2
-rw-r--r--kspread/tests/inspector.cc2
-rw-r--r--kspread/tests/testrunner.cc2
-rw-r--r--kspread/valueconverter.cc4
-rw-r--r--kspread/valueformatter.cc12
-rw-r--r--kspread/valueparser.cc26
59 files changed, 535 insertions, 535 deletions
diff --git a/kspread/Doxyfile b/kspread/Doxyfile
index 33244f7f..54f1fb39 100644
--- a/kspread/Doxyfile
+++ b/kspread/Doxyfile
@@ -74,7 +74,7 @@ REPEAT_BRIEF = YES
# as the annotated text. Otherwise, the brief description is used as-is. If left
# blank, the following values are used ("$name" is automatically replaced with the
# name of the entity): "The $name class" "The $name widget" "The $name file"
-# "is" "provides" "specifies" "tqcontains" "represents" "a" "an" "the"
+# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
ABBREVIATE_BRIEF =
diff --git a/kspread/KSpreadViewIface.cc b/kspread/KSpreadViewIface.cc
index fab646f9..4b7f2a66 100644
--- a/kspread/KSpreadViewIface.cc
+++ b/kspread/KSpreadViewIface.cc
@@ -87,14 +87,14 @@ void ViewIface::show()
m_view->show();
}
-void ViewIface::tqfind()
+void ViewIface::find()
{
- m_view->tqfind();
+ m_view->find();
}
-void ViewIface::tqreplace()
+void ViewIface::replace()
{
- m_view->tqreplace();
+ m_view->replace();
}
void ViewIface::conditional()
diff --git a/kspread/KSpreadViewIface.h b/kspread/KSpreadViewIface.h
index 090e8967..385c23f3 100644
--- a/kspread/KSpreadViewIface.h
+++ b/kspread/KSpreadViewIface.h
@@ -55,8 +55,8 @@ k_dcop:
virtual void setSelection(TQRect selection);
virtual TQRect selection();
- virtual void tqfind();
- virtual void tqreplace();
+ virtual void find();
+ virtual void replace();
virtual void conditional();
virtual void validity();
virtual void insertSeries();
diff --git a/kspread/OASIS.txt b/kspread/OASIS.txt
index d85e8779..d0dfb9d5 100644
--- a/kspread/OASIS.txt
+++ b/kspread/OASIS.txt
@@ -96,7 +96,7 @@ rich text will be converted to simple plain text.
Link may not fully compatible since KSpread can only link the whole cell,
not partial text. For example, if the text is "Visit the website" where only
the string "website" is a hyperlink to an URL, in KSpread the whole string
-"Visit the website" becomes the link. Consequently, if the text tqcontains
+"Visit the website" becomes the link. Consequently, if the text contains
two or more links, only the first link will be used.
(I will fixe when we convert it to kotext)
diff --git a/kspread/dependencies.cc b/kspread/dependencies.cc
index 7f7c986f..66bbe61a 100644
--- a/kspread/dependencies.cc
+++ b/kspread/dependencies.cc
@@ -92,7 +92,7 @@ class DependencyList {
RangeList computeDependencies (const Point &cell) const;
TQValueList<Point> getCellDeps(const Point& cell) const {
- CellDepsMap::const_iterator it = cellDeps.tqfind( cell );
+ CellDepsMap::const_iterator it = cellDeps.find( cell );
return it == cellDeps.end() ? TQValueList<Point>() : *it;
}
@@ -231,7 +231,7 @@ RangeList DependencyList::getDependencies (const Point &cell)
{
RangeList rl;
//look if the cell has any dependencies
- if (!dependencies.tqcontains (cell))
+ if (!dependencies.contains (cell))
return rl; //it doesn't - return an empty list
//the cell does have dependencies - return them!
@@ -253,7 +253,7 @@ TQValueList<Point> DependencyList::getDependants (const Point &cell)
{
//process all range dependencies, and for each range including the questioned cell,
//add the depending cell to the list
- if ((*it).range.tqcontains (cell))
+ if ((*it).range.contains (cell))
{
Point c;
c.setRow ((*it).cellrow);
@@ -272,7 +272,7 @@ void DependencyList::areaModified (const TQString &name)
// basically means that all cells referencing this area should be treated
// as modified - that will retrieve updated area ranges and also update
// everything as necessary ...
- if (!areaDeps.tqcontains (name))
+ if (!areaDeps.contains (name))
return;
TQMap<Point, bool>::iterator it;
@@ -323,7 +323,7 @@ void DependencyList::addRangeDependency (const RangeDependency &rd)
void DependencyList::removeDependencies (const Point &cell)
{
//look if the cell has any dependencies
- if (!dependencies.tqcontains (cell))
+ if (!dependencies.contains (cell))
return; //it doesn't - nothing more to do
//first we remove cell-dependencies
@@ -336,12 +336,12 @@ void DependencyList::removeDependencies (const Point &cell)
if (!sh)
sh = sheet;
- if (!sh->dependencies()->deps->cellDeps.tqcontains (*it1))
+ if (!sh->dependencies()->deps->cellDeps.contains (*it1))
continue; //this should never happen
//we no longer depend on this cell
TQValueList<Point>::iterator cit;
- cit = sh->dependencies()->deps->cellDeps[*it1].tqfind (cell);
+ cit = sh->dependencies()->deps->cellDeps[*it1].find (cell);
if (cit != sh->dependencies()->deps->cellDeps[*it1].end())
sh->dependencies()->deps->cellDeps[*it1].erase (cit);
}
@@ -356,7 +356,7 @@ void DependencyList::removeDependencies (const Point &cell)
//with lists generated from all previous ranges (duplicates are removed)
TQValueList<Point> leadings = leadingCells (*it2);
for (it1 = leadings.begin(); it1 != leadings.end(); ++it1)
- if (!leads.tqcontains (*it1))
+ if (!leads.contains (*it1))
leads.push_back (*it1);
}
for (it1 = leads.begin(); it1 != leads.end(); ++it1)
@@ -366,7 +366,7 @@ void DependencyList::removeDependencies (const Point &cell)
if (!sh)
sh = sheet;
- if (sh->dependencies()->deps->rangeDeps.tqcontains (*it1))
+ if (sh->dependencies()->deps->rangeDeps.contains (*it1))
{
TQValueList<RangeDependency>::iterator it3;
it3 = sh->dependencies()->deps->rangeDeps[*it1].begin();
@@ -386,7 +386,7 @@ void DependencyList::removeDependencies (const Point &cell)
// remove information about named area dependencies
TQMap<TQString, TQMap<Point, bool> >::iterator itr;
for (itr = areaDeps.begin(); itr != areaDeps.end(); ++itr) {
- if (itr.data().tqcontains (cell))
+ if (itr.data().contains (cell))
itr.data().remove (cell);
}
@@ -481,7 +481,7 @@ void DependencyList::processRangeDependencies (const Point &cell)
{
//process all range dependencies, and for each range including the modified cell,
//recalc the depending cell
- if ((*it).range.tqcontains (cell))
+ if ((*it).range.contains (cell))
{
Point c;
c.setRow ((*it).cellrow);
diff --git a/kspread/dialogs/kspread_dlg_cons.cc b/kspread/dialogs/kspread_dlg_cons.cc
index ca049ee1..16b0ebbb 100644
--- a/kspread/dialogs/kspread_dlg_cons.cc
+++ b/kspread/dialogs/kspread_dlg_cons.cc
@@ -302,7 +302,7 @@ void ConsolidateDialog::slotOk()
if ( c )
{
TQString s = c->value().asString();
- if ( !lst.tqcontains( s ) )
+ if ( !lst.contains( s ) )
lst.append( s );
}
}
@@ -384,7 +384,7 @@ void ConsolidateDialog::slotOk()
if ( c )
{
TQString s = c->value().asString();
- if ( !s.isEmpty() && lst.tqfind( s ) == lst.end() )
+ if ( !s.isEmpty() && lst.find( s ) == lst.end() )
lst.append( s );
}
}
@@ -467,7 +467,7 @@ void ConsolidateDialog::slotOk()
if ( c )
{
TQString s = c->value().asString();
- if ( !s.isEmpty() && cols.tqfind( s ) == cols.end() )
+ if ( !s.isEmpty() && cols.find( s ) == cols.end() )
cols.append( s );
}
}
@@ -487,7 +487,7 @@ void ConsolidateDialog::slotOk()
if ( c )
{
TQString s = c->value().asString();
- if ( !s.isEmpty() && rows.tqfind( s ) == rows.end() )
+ if ( !s.isEmpty() && rows.find( s ) == rows.end() )
rows.append( s );
}
}
diff --git a/kspread/dialogs/kspread_dlg_database.cc b/kspread/dialogs/kspread_dlg_database.cc
index 1bca7c85..7aa5dfa9 100644
--- a/kspread/dialogs/kspread_dlg_database.cc
+++ b/kspread/dialogs/kspread_dlg_database.cc
@@ -944,18 +944,18 @@ TQString DatabaseDialog::getWhereCondition(TQString const & column,
TQString DatabaseDialog::exchangeWildcards(TQString const & value)
{
TQString str(value);
- int p = str.tqfind('*');
+ int p = str.find('*');
while ( p > -1 )
{
- str = str.tqreplace( p, 1, "%" );
- p = str.tqfind('*');
+ str = str.replace( p, 1, "%" );
+ p = str.find('*');
}
- p = str.tqfind('?');
+ p = str.find('?');
while ( p > -1 )
{
- str = str.tqreplace( p, 1, "_" );
- p = str.tqfind('?');
+ str = str.replace( p, 1, "_" );
+ p = str.find('?');
}
return str;
}
@@ -964,8 +964,8 @@ bool DatabaseDialog::optionsDoNext()
{
if ( m_operator_1->currentItem() == 4 )
{
- if ( ( m_operatorValue_1->text().tqfind('*') != -1 )
- || ( m_operatorValue_1->text().tqfind('?') != -1 ) )
+ if ( ( m_operatorValue_1->text().find('*') != -1 )
+ || ( m_operatorValue_1->text().find('?') != -1 ) )
{
// xgettext: no-c-format
int res = KMessageBox::warningYesNo( this, i18n("'*' or '?' are not valid wildcards in SQL. "
@@ -978,8 +978,8 @@ bool DatabaseDialog::optionsDoNext()
if ( m_operator_2->currentItem() == 4 )
{
- if ( ( m_operatorValue_2->text().tqfind('*') != -1 )
- || ( m_operatorValue_2->text().tqfind('?') != -1 ) )
+ if ( ( m_operatorValue_2->text().find('*') != -1 )
+ || ( m_operatorValue_2->text().find('?') != -1 ) )
{
// xgettext: no-c-format
int res = KMessageBox::warningYesNo( this, i18n("'*' or '?' are not valid wildcards in SQL. "
@@ -992,8 +992,8 @@ bool DatabaseDialog::optionsDoNext()
if ( m_operator_3->currentItem() == 4 )
{
- if ( ( m_operatorValue_3->text().tqfind('*') != -1 )
- || ( m_operatorValue_3->text().tqfind('?') != -1 ) )
+ if ( ( m_operatorValue_3->text().find('*') != -1 )
+ || ( m_operatorValue_3->text().find('?') != -1 ) )
{
// xgettext: no-c-format
int res = KMessageBox::warningYesNo( this, i18n("'*' or '?' are not valid wildcards in SQL. "
diff --git a/kspread/dialogs/kspread_dlg_formula.cc b/kspread/dialogs/kspread_dlg_formula.cc
index 0981a4e7..d8d7e9d7 100644
--- a/kspread/dialogs/kspread_dlg_formula.cc
+++ b/kspread/dialogs/kspread_dlg_formula.cc
@@ -224,8 +224,8 @@ FormulaDialog::FormulaDialog( View* tqparent, const char* name,const TQString& f
// Was a function name passed along with the constructor ? Then activate it.
if( !formulaName.isEmpty() )
{
- functions->setCurrentItem( functions->index( functions->tqfindItem( formulaName ) ) );
- slotDoubleClicked( functions->tqfindItem( formulaName ) );
+ functions->setCurrentItem( functions->index( functions->findItem( formulaName ) ) );
+ slotDoubleClicked( functions->findItem( formulaName ) );
}
else
{
@@ -266,7 +266,7 @@ void FormulaDialog::slotSearchText(const TQString &_text)
{
TQString result = listFunct.makeCompletion( _text.upper() );
if( !result.isNull() )
- functions->setCurrentItem( functions->index( functions->tqfindItem( result ) ) );
+ functions->setCurrentItem( functions->index( functions->findItem( result ) ) );
}
bool FormulaDialog::eventFilter( TQObject* obj, TQEvent* ev )
@@ -364,7 +364,7 @@ void FormulaDialog::slotSelectButton()
{
if( functions->currentItem() != -1 )
{
- slotDoubleClicked(functions->tqfindItem(functions->text(functions->currentItem())));
+ slotDoubleClicked(functions->findItem(functions->text(functions->currentItem())));
}
}
@@ -473,10 +473,10 @@ TQString FormulaDialog::createParameter( const TQString& _text, int param )
TQString tmp = _text;
int pos;
int start = 1;
- while( ( pos = tmp.tqfind( '"', start ) ) != -1 )
+ while( ( pos = tmp.find( '"', start ) ) != -1 )
{
if (tmp[pos - 1] != '\\')
- tmp.tqreplace( pos, 1, "\\\"" );
+ tmp.replace( pos, 1, "\\\"" );
else
start = pos + 1;
}
@@ -497,10 +497,10 @@ TQString FormulaDialog::createParameter( const TQString& _text, int param )
TQString tmp = _text;
int pos;
int start = 1;
- while( ( pos = tmp.tqfind( '"', start ) ) != -1 )
+ while( ( pos = tmp.find( '"', start ) ) != -1 )
{
if (tmp[pos - 1] != '\\')
- tmp.tqreplace( pos, 1, "\\\"" );
+ tmp.replace( pos, 1, "\\\"" );
else
start = pos + 1;
}
@@ -712,7 +712,7 @@ void FormulaDialog::slotShowFunction( const TQString& function )
slotActivated( category );
// select the function
- TQListBoxItem* item = functions->tqfindItem( function,
+ TQListBoxItem* item = functions->findItem( function,
TQt::ExactMatch | TQt::CaseSensitive );
if( item ) functions->setCurrentItem( item );
diff --git a/kspread/dialogs/kspread_dlg_layout.cc b/kspread/dialogs/kspread_dlg_layout.cc
index fcbb734e..8c21d75a 100644
--- a/kspread/dialogs/kspread_dlg_layout.cc
+++ b/kspread/dialogs/kspread_dlg_layout.cc
@@ -1976,13 +1976,13 @@ CellFormatPageFont::CellFormatPageFont( TQWidget* tqparent, CellFormatDialog *_d
selFont.setFamily( dlg->textFontFamily );
kdDebug(36001) << "Family = " << dlg->textFontFamily << endl;
- if ( !family_combo->tqfindItem(dlg->textFontFamily))
+ if ( !family_combo->findItem(dlg->textFontFamily))
{
family_combo->insertItem("",0);
family_combo->setCurrentItem(0);
}
else
- family_combo->setCurrentItem(family_combo->index(family_combo->tqfindItem(dlg->textFontFamily)));
+ family_combo->setCurrentItem(family_combo->index(family_combo->findItem(dlg->textFontFamily)));
}
else
{
@@ -3361,7 +3361,7 @@ void CellFormatPageBorder::slotPressEvent(TQMouseEvent *_ev)
TQRect rect(OFFSETX,OFFSETY-8,area->width()-OFFSETX,OFFSETY+8);
- if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
+ if (rect.contains(TQPoint(_ev->x(),_ev->y())))
{
if (((top->getPenWidth()!=preview->getPenWidth()) ||
(top->getColor()!=currentColor) ||
@@ -3378,7 +3378,7 @@ void CellFormatPageBorder::slotPressEvent(TQMouseEvent *_ev)
}
rect.setCoords(OFFSETX,area->height()-OFFSETY-8,area->width()-OFFSETX,
area->height()-OFFSETY+8);
- if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
+ if (rect.contains(TQPoint(_ev->x(),_ev->y())))
{
if (((bottom->getPenWidth()!=preview->getPenWidth()) ||
(bottom->getColor()!=currentColor) ||
@@ -3395,7 +3395,7 @@ void CellFormatPageBorder::slotPressEvent(TQMouseEvent *_ev)
}
rect.setCoords(OFFSETX-8,OFFSETY,OFFSETX+8,area->height()-OFFSETY);
- if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
+ if (rect.contains(TQPoint(_ev->x(),_ev->y())))
{
if (((left->getPenWidth()!=preview->getPenWidth()) ||
(left->getColor()!=currentColor) ||
@@ -3412,7 +3412,7 @@ void CellFormatPageBorder::slotPressEvent(TQMouseEvent *_ev)
}
rect.setCoords(area->width()-OFFSETX-8,OFFSETY,area->width()-OFFSETX+8,
area->height()-OFFSETY);
- if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
+ if (rect.contains(TQPoint(_ev->x(),_ev->y())))
{
if (((right->getPenWidth()!=preview->getPenWidth()) ||
(right->getColor()!=currentColor) ||
@@ -3431,12 +3431,12 @@ void CellFormatPageBorder::slotPressEvent(TQMouseEvent *_ev)
//don't work because I don't know how create a rectangle
//for diagonal
/*rect.setCoords(OFFSETX,OFFSETY,XLEN-OFFSETX,YHEI-OFFSETY);
-if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
+if (rect.contains(TQPoint(_ev->x(),_ev->y())))
{
invertState(fallDiagonal);
}
rect.setCoords(OFFSETX,YHEI-OFFSETY,XLEN-OFFSETX,OFFSETY);
-if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
+if (rect.contains(TQPoint(_ev->x(),_ev->y())))
{
invertState(goUpDiagonal);
} */
@@ -3446,7 +3446,7 @@ if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
rect.setCoords(area->width()/2-8,OFFSETY,area->width()/2+8,
area->height()-OFFSETY);
- if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
+ if (rect.contains(TQPoint(_ev->x(),_ev->y())))
{
if (((vertical->getPenWidth()!=preview->getPenWidth()) ||
(vertical->getColor()!=currentColor) ||
@@ -3466,7 +3466,7 @@ if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
{
rect.setCoords(OFFSETX,area->height()/2-8,area->width()-OFFSETX,
area->height()/2+8);
- if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
+ if (rect.contains(TQPoint(_ev->x(),_ev->y())))
{
if (((horizontal->getPenWidth()!=preview->getPenWidth()) ||
(horizontal->getColor()!=currentColor) ||
diff --git a/kspread/dialogs/kspread_dlg_paperlayout.cc b/kspread/dialogs/kspread_dlg_paperlayout.cc
index 6c277be6..c6b52c15 100644
--- a/kspread/dialogs/kspread_dlg_paperlayout.cc
+++ b/kspread/dialogs/kspread_dlg_paperlayout.cc
@@ -331,7 +331,7 @@ void PaperLayout::slotOk()
else
{
bool error = true;
- int first = tmpPrintRange.tqfind(":");
+ int first = tmpPrintRange.find(":");
if ( ( first != -1 ) && ( (int)tmpPrintRange.length() > first ) )
{
Point point1 ( tmpPrintRange.left( first ) );
@@ -359,7 +359,7 @@ void PaperLayout::slotOk()
else
{
bool error = true;
- int first = tmpRepeatCols.tqfind(":");
+ int first = tmpRepeatCols.find(":");
if ( ( first != -1 ) && ( (int)tmpRepeatCols.length() > first ) )
{
int col1 = util_decodeColumnLabelText( tmpRepeatCols.left( first ) );
@@ -385,7 +385,7 @@ void PaperLayout::slotOk()
else
{
bool error = true;
- int first = tmpRepeatRows.tqfind(":");
+ int first = tmpRepeatRows.find(":");
if ( ( first != -1 ) && ( (int)tmpRepeatRows.length() > first ) )
{
int row1 = tmpRepeatRows.left( first ).toInt();
@@ -411,7 +411,7 @@ void PaperLayout::slotOk()
{
kdDebug() << "New zoom is different than original: " << m_cZoom->currentText() << endl;
TQString zoomtext = m_cZoom->currentText();
- zoomtext.tqreplace("%","");
+ zoomtext.replace("%","");
bool convertok = false;
double zoomvalue = zoomtext.toDouble(&convertok);
if (!convertok)
diff --git a/kspread/dialogs/kspread_dlg_reference.cc b/kspread/dialogs/kspread_dlg_reference.cc
index 1fbb55e3..8f315ca5 100644
--- a/kspread/dialogs/kspread_dlg_reference.cc
+++ b/kspread/dialogs/kspread_dlg_reference.cc
@@ -91,7 +91,7 @@ reference::reference( View* tqparent, const char* name )
for ( it = area.begin(); it != area.end(); ++it )
{
text = (*it).ref_name;
- if ( sheetName.tqcontains((*it).sheet_name ))
+ if ( sheetName.contains((*it).sheet_name ))
m_list->insertItem(text);
}
diff --git a/kspread/dialogs/kspread_dlg_sort.cc b/kspread/dialogs/kspread_dlg_sort.cc
index 3b94da54..17beca41 100644
--- a/kspread/dialogs/kspread_dlg_sort.cc
+++ b/kspread/dialogs/kspread_dlg_sort.cc
@@ -574,7 +574,7 @@ void SortDialog::slotOk()
int h = outputPoint.pos().y() + sortArea.height();
int w = outputPoint.pos().x() + sortArea.width();
- if ( sortArea.tqcontains(outputPoint.pos())
+ if ( sortArea.contains(outputPoint.pos())
|| ( w >= sortArea.left() && w <= sortArea.right() )
|| ( h >= sortArea.top() && h <= sortArea.bottom() ) )
{
diff --git a/kspread/dialogs/kspread_dlg_styles.cc b/kspread/dialogs/kspread_dlg_styles.cc
index 818581f6..6a8e0fae 100644
--- a/kspread/dialogs/kspread_dlg_styles.cc
+++ b/kspread/dialogs/kspread_dlg_styles.cc
@@ -111,13 +111,13 @@ void StyleDlg::fillComboBox()
while ( entries.count() != count )
{
- if ( entries.tqfind( iter.data() ) == entries.end() )
+ if ( entries.find( iter.data() ) == entries.end() )
{
if ( iter.data()->tqparent() == 0 )
entries[iter.data()] = new KListViewItem( m_dlg->m_styleList, iter.data()->name() );
else
{
- Map::const_iterator i = entries.tqfind( iter.data()->tqparent() );
+ Map::const_iterator i = entries.find( iter.data()->tqparent() );
if ( i != entries.end() )
entries[iter.data()] = new KListViewItem( i.data(), iter.data()->name() );
}
diff --git a/kspread/dialogs/kspread_dlg_subtotal.cc b/kspread/dialogs/kspread_dlg_subtotal.cc
index 696821cb..a2771642 100644
--- a/kspread/dialogs/kspread_dlg_subtotal.cc
+++ b/kspread/dialogs/kspread_dlg_subtotal.cc
@@ -206,7 +206,7 @@ void SubtotalDialog::removeSubtotalLines()
continue;
text = cell->text();
- if ( text.tqfind( "SUBTOTAL" ) != -1 )
+ if ( text.find( "SUBTOTAL" ) != -1 )
{
containsSubtotal = true;
break;
diff --git a/kspread/dialogs/link.cc b/kspread/dialogs/link.cc
index 0e115e01..aba1a170 100644
--- a/kspread/dialogs/link.cc
+++ b/kspread/dialogs/link.cc
@@ -165,23 +165,23 @@ TQString LinkDialog::link() const
case 0:
str = d->internetLink->text();
if( !str.isEmpty() )
- if( str.tqfind( "http://" )==-1 )
- if( str.tqfind( "https://" )==-1 )
- if( str.tqfind( "ftp://" )==-1 )
+ if( str.find( "http://" )==-1 )
+ if( str.find( "https://" )==-1 )
+ if( str.find( "ftp://" )==-1 )
str.prepend( "http://" );
break;
case 1:
str = d->mailLink->text();
if( !str.isEmpty() )
- if( str.tqfind( "mailto:" )==-1 )
+ if( str.find( "mailto:" )==-1 )
str.prepend( "mailto:" );
break;
case 2:
str = d->fileLink->lineEdit()->text();
if( !str.isEmpty() )
- if( str.tqfind( "file:/" )==-1 )
+ if( str.find( "file:/" )==-1 )
str.prepend( "file://" );
break;
diff --git a/kspread/formula.cc b/kspread/formula.cc
index efeec46e..1e42867a 100644
--- a/kspread/formula.cc
+++ b/kspread/formula.cc
@@ -267,7 +267,7 @@ Token::Op Token::asOperator() const
TQString Token::sheetName() const
{
if( !isCell() && !isRange() ) return TQString();
- int i = m_text.tqfind( '!' );
+ int i = m_text.find( '!' );
if( i < 0 ) return TQString();
TQString sheet = m_text.left( i );
return sheet;
diff --git a/kspread/formula.h b/kspread/formula.h
index 8a1e2f03..8ece47c5 100644
--- a/kspread/formula.h
+++ b/kspread/formula.h
@@ -280,7 +280,7 @@ class Formula
void clear();
/**
- * Returns true if the specified expression is valid, i.e. it tqcontains
+ * Returns true if the specified expression is valid, i.e. it contains
* no parsing error.
* Empty formula (i.e. without expression) is always invalid.
*/
diff --git a/kspread/functions.cc b/kspread/functions.cc
index 0cc0dd98..de55f7e5 100644
--- a/kspread/functions.cc
+++ b/kspread/functions.cc
@@ -242,12 +242,12 @@ void FunctionRepository::add( Function* function )
Function *FunctionRepository::function (const TQString& name)
{
- return d->functions.tqfind (name.upper());
+ return d->functions.find (name.upper());
}
FunctionDescription *FunctionRepository::functionInfo (const TQString& name)
{
- return d->funcs.tqfind (name.upper());
+ return d->funcs.find (name.upper());
}
// returns names of function in certain group
@@ -299,7 +299,7 @@ void FunctionRepository::loadFile (const TQString& filename)
{
FunctionDescription* desc = new FunctionDescription( e2 );
desc->setGroup (group);
- if (d->functions.tqfind (desc->name()))
+ if (d->functions.find (desc->name()))
d->funcs.insert (desc->name(), desc);
}
}
diff --git a/kspread/ksploadinginfo.h b/kspread/ksploadinginfo.h
index 0c5aed03..4ca95632 100644
--- a/kspread/ksploadinginfo.h
+++ b/kspread/ksploadinginfo.h
@@ -36,7 +36,7 @@ public:
KSPLoadingInfo() { m_loadTemplate = false;}
~KSPLoadingInfo() {}
void addWordInAreaList( const TQString & word) { m_areaNamed.append( word ); }
- bool findWordInAreaList(const TQString & word) const { return (m_areaNamed.tqfind( word ) != m_areaNamed.end());}
+ bool findWordInAreaList(const TQString & word) const { return (m_areaNamed.find( word ) != m_areaNamed.end());}
void appendValidation( const TQString &name, const TQDomElement &element){ m_validationList.insert( name, element);}
TQDomElement validation( const TQString &name) { return m_validationList[name];}
diff --git a/kspread/kspread_autofill.cc b/kspread/kspread_autofill.cc
index 8a84e904..38cca433 100644
--- a/kspread/kspread_autofill.cc
+++ b/kspread/kspread_autofill.cc
@@ -206,38 +206,38 @@ AutoFillSequenceItem::AutoFillSequenceItem( const TQString &_str )
other=new TQStringList(config->readListEntry("Other list"));
}
- if ( month->tqfind( _str ) != month->end() )
+ if ( month->find( _str ) != month->end() )
{
m_Type = MONTH;
return;
}
- if ( shortMonth->tqfind( _str ) != shortMonth->end() )
+ if ( shortMonth->find( _str ) != shortMonth->end() )
{
m_Type = SHORTMONTH;
return;
}
- if ( day->tqfind( _str ) != day->end() )
+ if ( day->find( _str ) != day->end() )
{
m_Type = DAY;
return;
}
- if ( shortDay->tqfind( _str ) != shortDay->end() )
+ if ( shortDay->find( _str ) != shortDay->end() )
{
m_Type = SHORTDAY;
return;
}
- if( other->tqfind(_str)!=other->end())
+ if( other->find(_str)!=other->end())
{
m_Type = OTHER;
m_OtherBegin=0;
m_OtherEnd=other->count();
- int index= other->tqfindIndex(_str);
+ int index= other->findIndex(_str);
//find end and begin of qstringlist of other.
- for ( TQStringList::Iterator it = other->tqfind(_str); it != other->end();++it )
+ for ( TQStringList::Iterator it = other->find(_str); it != other->end();++it )
{
if((*it)=="\\")
{
@@ -246,8 +246,8 @@ AutoFillSequenceItem::AutoFillSequenceItem( const TQString &_str )
}
index++;
}
- index= other->tqfindIndex(_str);
- for ( TQStringList::Iterator it = other->tqfind(_str); it != other->begin();--it )
+ index= other->findIndex(_str);
+ for ( TQStringList::Iterator it = other->find(_str); it != other->begin();--it )
{
if((*it)=="\\")
{
@@ -286,8 +286,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta )
return false;
case MONTH:
{
- int i = month->tqfindIndex( m_String );
- int j = month->tqfindIndex( seq->getString() );
+ int i = month->findIndex( m_String );
+ int j = month->findIndex( seq->getString() );
int k = j;
if ( j + 1 == i )
@@ -299,8 +299,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta )
case SHORTMONTH:
{
- int i = shortMonth->tqfindIndex( m_String );
- int j = shortMonth->tqfindIndex( seq->getString() );
+ int i = shortMonth->findIndex( m_String );
+ int j = shortMonth->findIndex( seq->getString() );
int k = j;
if ( j + 1 == i )
@@ -312,8 +312,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta )
case DAY:
{
- int i = day->tqfindIndex( m_String );
- int j = day->tqfindIndex( seq->getString() );
+ int i = day->findIndex( m_String );
+ int j = day->findIndex( seq->getString() );
int k = j;
if ( j + 1 == i )
@@ -326,8 +326,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta )
case SHORTDAY:
{
- int i = shortDay->tqfindIndex( m_String );
- int j = shortDay->tqfindIndex( seq->getString() );
+ int i = shortDay->findIndex( m_String );
+ int j = shortDay->findIndex( seq->getString() );
int k = j;
if ( j + 1 == i )
@@ -340,8 +340,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta )
{
if( m_OtherEnd!= seq->getIOtherEnd() || m_OtherBegin!= seq->getIOtherBegin())
return false;
- int i = other->tqfindIndex( m_String );
- int j = other->tqfindIndex( seq->getString() );
+ int i = other->findIndex( m_String );
+ int j = other->findIndex( seq->getString() );
int k = j;
if ( j < i )
k += (m_OtherEnd - m_OtherBegin - 1);
@@ -373,7 +373,7 @@ TQString AutoFillSequenceItem::getSuccessor( int _no, double _delta )
break;
case MONTH:
{
- int i = month->tqfindIndex( m_String );
+ int i = month->findIndex( m_String );
int j = i + _no * (int) _delta;
while (j < 0)
j += month->count();
@@ -383,7 +383,7 @@ TQString AutoFillSequenceItem::getSuccessor( int _no, double _delta )
break;
case SHORTMONTH:
{
- int i = shortMonth->tqfindIndex( m_String );
+ int i = shortMonth->findIndex( m_String );
int j = i + _no * (int) _delta;
while (j < 0)
j += shortMonth->count();
@@ -393,7 +393,7 @@ TQString AutoFillSequenceItem::getSuccessor( int _no, double _delta )
break;
case DAY:
{
- int i = day->tqfindIndex( m_String );
+ int i = day->findIndex( m_String );
int j = i + _no * (int) _delta;
while (j < 0)
j += day->count();
@@ -403,7 +403,7 @@ TQString AutoFillSequenceItem::getSuccessor( int _no, double _delta )
break;
case SHORTDAY:
{
- int i = shortDay->tqfindIndex( m_String );
+ int i = shortDay->findIndex( m_String );
int j = i + _no * (int) _delta;
while (j < 0)
j += shortDay->count();
@@ -413,7 +413,7 @@ TQString AutoFillSequenceItem::getSuccessor( int _no, double _delta )
break;
case OTHER:
{
- int i = other->tqfindIndex( m_String )-(m_OtherBegin+1);
+ int i = other->findIndex( m_String )-(m_OtherBegin+1);
int j = i + _no * (int) _delta;
int k = j % (m_OtherEnd - m_OtherBegin-1);
erg = (*other->at( (k+m_OtherBegin+1) ));
@@ -444,7 +444,7 @@ TQString AutoFillSequenceItem::getPredecessor( int _no, double _delta )
break;
case MONTH:
{
- int i = month->tqfindIndex( m_String );
+ int i = month->findIndex( m_String );
int j = i - _no * (int) _delta;
while ( j < 0 )
j += month->count();
@@ -454,7 +454,7 @@ TQString AutoFillSequenceItem::getPredecessor( int _no, double _delta )
break;
case SHORTMONTH:
{
- int i = shortMonth->tqfindIndex( m_String );
+ int i = shortMonth->findIndex( m_String );
int j = i - _no * (int) _delta;
while ( j < 0 )
j += shortMonth->count();
@@ -464,7 +464,7 @@ TQString AutoFillSequenceItem::getPredecessor( int _no, double _delta )
break;
case DAY:
{
- int i = day->tqfindIndex( m_String );
+ int i = day->findIndex( m_String );
int j = i - _no * (int) _delta;
while ( j < 0 )
j += day->count();
@@ -474,7 +474,7 @@ TQString AutoFillSequenceItem::getPredecessor( int _no, double _delta )
break;
case SHORTDAY:
{
- int i = shortDay->tqfindIndex( m_String );
+ int i = shortDay->findIndex( m_String );
int j = i - _no * (int) _delta;
while ( j < 0 )
j += shortDay->count();
@@ -484,7 +484,7 @@ TQString AutoFillSequenceItem::getPredecessor( int _no, double _delta )
break;
case OTHER:
{
- int i = other->tqfindIndex( m_String ) - (m_OtherBegin + 1);
+ int i = other->findIndex( m_String ) - (m_OtherBegin + 1);
int j = i - _no * (int) _delta;
while ( j < 0 )
j += (m_OtherEnd - m_OtherBegin - 1);
@@ -1130,7 +1130,7 @@ void Sheet::FillSequenceWithCopy(TQPtrList<Cell>& _srcList,
{
// FIXME this is a workaround to avoid those nasty one minute off
// "dragging down" time is inaccurate overa large lists!
- // This is the best approximation I could tqfind (raphael)
+ // This is the best approximation I could find (raphael)
if (down)
{
// factor = 1.000002/24. + 0.000000001;
@@ -1153,24 +1153,24 @@ void Sheet::FillSequenceWithCopy(TQPtrList<Cell>& _srcList,
++incr;
}
else if((AutoFillSequenceItem::month != 0L)
- && AutoFillSequenceItem::month->tqfind( _srcList.at( s )->text()) != 0L
- && AutoFillSequenceItem::month->tqfind( _srcList.at( s )->text()) != AutoFillSequenceItem::month->end()
+ && AutoFillSequenceItem::month->find( _srcList.at( s )->text()) != 0L
+ && AutoFillSequenceItem::month->find( _srcList.at( s )->text()) != AutoFillSequenceItem::month->end()
&& _srcList.count() == 1)
{
TQString strMonth=_srcList.at( s )->text();
- int i = AutoFillSequenceItem::month->tqfindIndex( strMonth )+incr;
+ int i = AutoFillSequenceItem::month->findIndex( strMonth )+incr;
int k = (i) % AutoFillSequenceItem::month->count();
cell->setCellText((*AutoFillSequenceItem::month->at( k )));
incr++;
}
else if(AutoFillSequenceItem::day != 0L
- && AutoFillSequenceItem::day->tqfind( _srcList.at( s )->text()) != 0L
- && AutoFillSequenceItem::day->tqfind( _srcList.at( s )->text())
+ && AutoFillSequenceItem::day->find( _srcList.at( s )->text()) != 0L
+ && AutoFillSequenceItem::day->find( _srcList.at( s )->text())
!= AutoFillSequenceItem::day->end()
&& _srcList.count()==1)
{
TQString strDay=_srcList.at( s )->text();
- int i = AutoFillSequenceItem::day->tqfindIndex( strDay )+incr;
+ int i = AutoFillSequenceItem::day->findIndex( strDay )+incr;
int k = (i) % AutoFillSequenceItem::day->count();
cell->setCellText((*AutoFillSequenceItem::day->at( k )));
incr++;
@@ -1183,7 +1183,7 @@ void Sheet::FillSequenceWithCopy(TQPtrList<Cell>& _srcList,
{
TQString tmp=number.cap(1);
int num=tmp.toInt()+incr;
- cell->setCellText(_srcList.at( s )->text().tqreplace(number,TQString::number(num)));
+ cell->setCellText(_srcList.at( s )->text().replace(number,TQString::number(num)));
++incr;
}
else if ( !_srcList.at( s )->link().isEmpty() )
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
diff --git a/kspread/kspread_cell.cc b/kspread/kspread_cell.cc
index c3c520f8..a0ae2073 100644
--- a/kspread/kspread_cell.cc
+++ b/kspread/kspread_cell.cc
@@ -1326,7 +1326,7 @@ void Cell::makeLayout( TQPainter &_painter, int _col, int _row )
&& format()->multiRow( _col, _row ) )
{
// Copy of d->strOutText but without the newlines.
-// TQString o = d->strOutText.tqreplace( TQChar('\n'), " " );
+// TQString o = d->strOutText.replace( TQChar('\n'), " " );
// don't remove the existing LF, these are intended line wraps (whishlist #9881)
TQString o = d->strOutText;
@@ -1334,7 +1334,7 @@ void Cell::makeLayout( TQPainter &_painter, int _col, int _row )
// Break the line at appropriate places, i.e. spaces, if
// necessary. This means to change the spaces where breaks occur
// into newlines.
- if ( o.tqfind(' ') != -1 )
+ if ( o.find(' ') != -1 )
{
d->strOutText = "";
@@ -1350,8 +1350,8 @@ void Cell::makeLayout( TQPainter &_painter, int _col, int _row )
do {
- breakpos = o.tqfind( ' ', breakpos );
- int linefeed = o.tqfind( '\n', pos1 );
+ breakpos = o.find( ' ', breakpos );
+ int linefeed = o.find( '\n', pos1 );
// kdDebug() << "start: " << start << "; breakpos: " << breakpos << "; pos1: " << pos1 << "; linefeed: " << linefeed << endl;
@@ -1394,11 +1394,11 @@ void Cell::makeLayout( TQPainter &_painter, int _col, int _row )
}
breakpos++;
- } while( o.tqfind( ' ', breakpos ) != -1 );
+ } while( o.find( ' ', breakpos ) != -1 );
}
else
{
- lines = o.tqcontains('\n');
+ lines = o.contains('\n');
}
d->textHeight *= lines;
@@ -1414,7 +1414,7 @@ void Cell::makeLayout( TQPainter &_painter, int _col, int _row )
int pos = 0;
d->textWidth = 0.0;
do {
- i = d->strOutText.tqfind( "\n", pos );
+ i = d->strOutText.find( "\n", pos );
if ( i == -1 )
t = d->strOutText.mid( pos, d->strOutText.length() - pos );
@@ -2243,14 +2243,14 @@ void Cell::paintCell( const KoRect &rect, TQPainter & painter,
// itself really is selected.
bool selected = false;
if ( view != NULL ) {
- selected = view->selectionInfo()->tqcontains( cellRef );
+ selected = view->selectionInfo()->contains( cellRef );
// But the cell doesn't look selected if this is the marker cell.
Cell *cell = format()->sheet()->cellAt( view->selectionInfo()->marker() );
TQPoint bottomRight( view->selectionInfo()->marker().x() + cell->extraXCells(),
view->selectionInfo()->marker().y() + cell->extraYCells() );
TQRect markerArea( view->selectionInfo()->marker(), bottomRight );
- selected = selected && !( markerArea.tqcontains( cellRef ) );
+ selected = selected && !( markerArea.contains( cellRef ) );
// Don't draw any selection at all when printing.
if ( painter.tqdevice()->isExtDev() || !drawCursor )
@@ -2432,7 +2432,7 @@ void Cell::paintCell( const KoRect &rect, TQPainter & painter,
//
// This optimization removes an O(n^4) behaviour where n is
// the number of cells on one edge in a merged cell.
- if ( mergedCellsPainted.tqcontains( obscuringCellRef ) )
+ if ( mergedCellsPainted.contains( obscuringCellRef ) )
continue;
Cell *obscuringCell = format()->sheet()->cellAt( obscuringCellRef.x(),
@@ -3389,7 +3389,7 @@ void Cell::paintText( TQPainter& painter,
double dy = 0.0;
TQFontMetrics fm = painter.fontMetrics();
do {
- i = d->strOutText.tqfind( "\n", pos );
+ i = d->strOutText.find( "\n", pos );
if ( i == -1 )
t = d->strOutText.mid( pos, d->strOutText.length() - pos );
else {
@@ -4105,7 +4105,7 @@ TQString Cell::textDisplaying( TQPainter &_painter )
//out of space to fit even the integer part of the number then display #########
//TODO Perhaps try to display integer part in standard form if there is not enough room for it?
- if (!tmp.tqcontains('.'))
+ if (!tmp.contains('.'))
d->strOutText=TQString().fill('#',20);
}
@@ -4546,19 +4546,19 @@ void Cell::incPrecision()
if ( tmpPreci == -1 )
{
- int pos = d->strOutText.tqfind(decimal_point);
+ int pos = d->strOutText.find(decimal_point);
if ( pos == -1 )
- pos = d->strOutText.tqfind('.');
+ pos = d->strOutText.find('.');
if ( pos == -1 )
format()->setPrecision(1);
else
{
int start = 0;
- if ( d->strOutText.tqfind('%') != -1 )
+ if ( d->strOutText.find('%') != -1 )
start = 2;
- else if ( d->strOutText.tqfind(locale()->currencySymbol()) == ((int)(d->strOutText.length()-locale()->currencySymbol().length())) )
+ else if ( d->strOutText.find(locale()->currencySymbol()) == ((int)(d->strOutText.length()-locale()->currencySymbol().length())) )
start = locale()->currencySymbol().length() + 1;
- else if ( (start=d->strOutText.tqfind('E')) != -1 )
+ else if ( (start=d->strOutText.find('E')) != -1 )
start = d->strOutText.length() - start;
//kdDebug(36001) << "start=" << start << " pos=" << pos << " length=" << d->strOutText.length() << endl;
@@ -4582,13 +4582,13 @@ void Cell::decPrecision()
// kdDebug(36001) << "decPrecision: tmpPreci = " << tmpPreci << endl;
if ( format()->precision(column(),row()) == -1 )
{
- int pos = d->strOutText.tqfind( decimal_point );
+ int pos = d->strOutText.find( decimal_point );
int start = 0;
- if ( d->strOutText.tqfind('%') != -1 )
+ if ( d->strOutText.find('%') != -1 )
start = 2;
- else if ( d->strOutText.tqfind(locale()->currencySymbol()) == ((int)(d->strOutText.length()-locale()->currencySymbol().length())) )
+ else if ( d->strOutText.find(locale()->currencySymbol()) == ((int)(d->strOutText.length()-locale()->currencySymbol().length())) )
start = locale()->currencySymbol().length() + 1;
- else if ( (start = d->strOutText.tqfind('E')) != -1 )
+ else if ( (start = d->strOutText.find('E')) != -1 )
start = d->strOutText.length() - start;
else
start = 0;
@@ -4780,7 +4780,7 @@ bool Cell::testValidity() const
else if ( d->extra()->validity->m_restriction == Restriction::List )
{
//test int value
- if ( value().isString() && d->extra()->validity->listValidity.tqcontains( value().asString() ) )
+ if ( value().isString() && d->extra()->validity->listValidity.contains( value().asString() ) )
valid = true;
}
else if(d->extra()->validity->m_restriction==Restriction::TextLength)
@@ -5009,7 +5009,7 @@ bool Cell::updateChart(bool refresh)
CellBinding *bind;
for ( bind = format()->sheet()->firstCellBinding(); bind != 0L; bind = format()->sheet()->nextCellBinding() )
{
- if ( bind->tqcontains( d->column, d->row ) )
+ if ( bind->contains( d->column, d->row ) )
{
if (!refresh)
return true;
@@ -5817,13 +5817,13 @@ bool Cell::loadOasis( const TQDomElement& element , KoOasisLoadingContext& oasis
int year = 0, month = 0, day = 0;
bool ok = false;
- int p1 = value.tqfind( '-' );
+ int p1 = value.find( '-' );
if ( p1 > 0 )
year = value.left( p1 ).toInt( &ok );
kdDebug() << "year: " << value.left( p1 ) << endl;
- int p2 = value.tqfind( '-', ++p1 );
+ int p2 = value.find( '-', ++p1 );
if ( ok )
month = value.mid( p1, p2 - p1 ).toInt( &ok );
@@ -6095,7 +6095,7 @@ void Cell::loadOasisValidation( const TQString& validationName )
//A NumberValue is a whole or decimal number. It must not contain comma separators for numbers of 1000 or greater.
//ExtendedTrueCondition
- if ( valExpression.tqcontains( "cell-content-text-length()" ) )
+ if ( valExpression.contains( "cell-content-text-length()" ) )
{
//"cell-content-text-length()>45"
valExpression = valExpression.remove("oooc:cell-content-text-length()" );
@@ -6104,12 +6104,12 @@ void Cell::loadOasisValidation( const TQString& validationName )
loadOasisValidationCondition( valExpression );
}
- else if ( valExpression.tqcontains( "cell-content-is-text()" ) )
+ else if ( valExpression.contains( "cell-content-is-text()" ) )
{
d->extra()->validity->m_restriction = Restriction::Text;
}
//cell-content-text-length-is-between(Value, Value) | cell-content-text-length-is-not-between(Value, Value) | cell-content-is-in-list( StringList )
- else if ( valExpression.tqcontains( "cell-content-text-length-is-between" ) )
+ else if ( valExpression.contains( "cell-content-text-length-is-between" ) )
{
d->extra()->validity->m_restriction = Restriction::TextLength;
d->extra()->validity->m_cond = Conditional::Between;
@@ -6119,7 +6119,7 @@ void Cell::loadOasisValidation( const TQString& validationName )
TQStringList listVal = TQStringList::split( ",", valExpression );
loadOasisValidationValue( listVal );
}
- else if ( valExpression.tqcontains( "cell-content-text-length-is-not-between" ) )
+ else if ( valExpression.contains( "cell-content-text-length-is-not-between" ) )
{
d->extra()->validity->m_restriction = Restriction::TextLength;
d->extra()->validity->m_cond = Conditional::Different;
@@ -6130,7 +6130,7 @@ void Cell::loadOasisValidation( const TQString& validationName )
TQStringList listVal = TQStringList::split( ",", valExpression );
loadOasisValidationValue( listVal );
}
- else if ( valExpression.tqcontains( "cell-content-is-in-list(" ) )
+ else if ( valExpression.contains( "cell-content-is-in-list(" ) )
{
d->extra()->validity->m_restriction = Restriction::List;
valExpression = valExpression.remove( "oooc:cell-content-is-in-list(" );
@@ -6142,36 +6142,36 @@ void Cell::loadOasisValidation( const TQString& validationName )
//TrueFunction ::= cell-content-is-whole-number() | cell-content-is-decimal-number() | cell-content-is-date() | cell-content-is-time()
else
{
- if (valExpression.tqcontains( "cell-content-is-whole-number()" ) )
+ if (valExpression.contains( "cell-content-is-whole-number()" ) )
{
d->extra()->validity->m_restriction = Restriction::Number;
valExpression = valExpression.remove( "oooc:cell-content-is-whole-number() and " );
}
- else if (valExpression.tqcontains( "cell-content-is-decimal-number()" ) )
+ else if (valExpression.contains( "cell-content-is-decimal-number()" ) )
{
d->extra()->validity->m_restriction = Restriction::Integer;
valExpression = valExpression.remove( "oooc:cell-content-is-decimal-number() and " );
}
- else if (valExpression.tqcontains( "cell-content-is-date()" ) )
+ else if (valExpression.contains( "cell-content-is-date()" ) )
{
d->extra()->validity->m_restriction = Restriction::Date;
valExpression = valExpression.remove( "oooc:cell-content-is-date() and " );
}
- else if (valExpression.tqcontains( "cell-content-is-time()" ) )
+ else if (valExpression.contains( "cell-content-is-time()" ) )
{
d->extra()->validity->m_restriction = Restriction::Time;
valExpression = valExpression.remove( "oooc:cell-content-is-time() and " );
}
kdDebug()<<"valExpression :"<<valExpression<<endl;
- if ( valExpression.tqcontains( "cell-content()" ) )
+ if ( valExpression.contains( "cell-content()" ) )
{
valExpression = valExpression.remove( "cell-content()" );
loadOasisValidationCondition( valExpression );
}
//GetFunction ::= cell-content-is-between(Value, Value) | cell-content-is-not-between(Value, Value)
//for the moment we support just int/double value, not text/date/time :(
- if ( valExpression.tqcontains( "cell-content-is-between(" ) )
+ if ( valExpression.contains( "cell-content-is-between(" ) )
{
valExpression = valExpression.remove( "cell-content-is-between(" );
valExpression = valExpression.remove( ")" );
@@ -6179,7 +6179,7 @@ void Cell::loadOasisValidation( const TQString& validationName )
loadOasisValidationValue( listVal );
d->extra()->validity->m_cond = Conditional::Between;
}
- if ( valExpression.tqcontains( "cell-content-is-not-between(" ) )
+ if ( valExpression.contains( "cell-content-is-not-between(" ) )
{
valExpression = valExpression.remove( "cell-content-is-not-between(" );
valExpression = valExpression.remove( ")" );
@@ -6298,33 +6298,33 @@ void Cell::loadOasisValidationValue( const TQStringList &listVal )
void Cell::loadOasisValidationCondition( TQString &valExpression )
{
TQString value;
- if (valExpression.tqfind( "<=" )==0 )
+ if (valExpression.find( "<=" )==0 )
{
value = valExpression.remove( 0,2 );
d->extra()->validity->m_cond = Conditional::InferiorEqual;
}
- else if (valExpression.tqfind( ">=" )==0 )
+ else if (valExpression.find( ">=" )==0 )
{
value = valExpression.remove( 0,2 );
d->extra()->validity->m_cond = Conditional::SuperiorEqual;
}
- else if (valExpression.tqfind( "!=" )==0 )
+ else if (valExpression.find( "!=" )==0 )
{
//add Differentto attribute
value = valExpression.remove( 0,2 );
d->extra()->validity->m_cond = Conditional::DifferentTo;
}
- else if ( valExpression.tqfind( "<" )==0 )
+ else if ( valExpression.find( "<" )==0 )
{
value = valExpression.remove( 0,1 );
d->extra()->validity->m_cond = Conditional::Inferior;
}
- else if(valExpression.tqfind( ">" )==0 )
+ else if(valExpression.find( ">" )==0 )
{
value = valExpression.remove( 0,1 );
d->extra()->validity->m_cond = Conditional::Superior;
}
- else if (valExpression.tqfind( "=" )==0 )
+ else if (valExpression.find( "=" )==0 )
{
value = valExpression.remove( 0,1 );
d->extra()->validity->m_cond = Conditional::Equal;
@@ -6646,9 +6646,9 @@ bool Cell::load( const TQDomElement & cell, int _xshift, int _yshift,
setValue ( dd );
else
{
- int pos = t.tqfind( '/' );
+ int pos = t.find( '/' );
int year = t.mid( 0, pos ).toInt();
- int pos1 = t.tqfind( '/', pos + 1 );
+ int pos1 = t.find( '/', pos + 1 );
int month = t.mid( pos + 1, ( ( pos1 - 1 ) - pos ) ).toInt();
int day = t.right( t.length() - pos1 - 1 ).toInt();
TQDate date( year, month, day );
@@ -6670,9 +6670,9 @@ bool Cell::load( const TQDomElement & cell, int _xshift, int _yshift,
int minutes = -1;
int second = -1;
int pos, pos1;
- pos = t.tqfind( ':' );
+ pos = t.find( ':' );
hours = t.mid( 0, pos ).toInt();
- pos1 = t.tqfind( ':', pos + 1 );
+ pos1 = t.find( ':', pos + 1 );
minutes = t.mid( pos + 1, ( ( pos1 - 1 ) - pos ) ).toInt();
second = t.right( t.length() - pos1 - 1 ).toInt();
TQTime time( hours, minutes, second );
@@ -6776,9 +6776,9 @@ bool Cell::loadCellData(const TQDomElement & text, Paste::Operation op )
else // old docs: do the ugly solution of calling checkTextInput to parse the text
{
// ...except for date/time
- if (isDate() && ( t.tqcontains('/') == 2 ))
+ if (isDate() && ( t.contains('/') == 2 ))
dataType = "Date";
- else if (isTime() && ( t.tqcontains(':') == 2 ) )
+ else if (isTime() && ( t.contains(':') == 2 ) )
dataType = "Time";
else
{
@@ -6805,7 +6805,7 @@ bool Cell::loadCellData(const TQDomElement & text, Paste::Operation op )
else if( dataType == "Num" )
{
bool ok = false;
- if (t.tqcontains('.'))
+ if (t.contains('.'))
setValue ( Value( t.toDouble(&ok) ) ); // We save in non-localized format
else
setValue ( Value( t.toLong(&ok) ) );
@@ -6818,7 +6818,7 @@ bool Cell::loadCellData(const TQDomElement & text, Paste::Operation op )
/* KLocale::formatNumber requires the precision we want to return.
*/
- int precision = t.length() - t.tqfind('.') - 1;
+ int precision = t.length() - t.find('.') - 1;
if ( formatType() == Percentage_format )
{
@@ -6842,9 +6842,9 @@ bool Cell::loadCellData(const TQDomElement & text, Paste::Operation op )
// date ?
else if( dataType == "Date" )
{
- int pos = t.tqfind('/');
+ int pos = t.find('/');
int year = t.mid(0,pos).toInt();
- int pos1 = t.tqfind('/',pos+1);
+ int pos1 = t.find('/',pos+1);
int month = t.mid(pos+1,((pos1-1)-pos)).toInt();
int day = t.right(t.length()-pos1-1).toInt();
setValue( TQDate(year,month,day) );
@@ -6864,9 +6864,9 @@ bool Cell::loadCellData(const TQDomElement & text, Paste::Operation op )
int minutes = -1;
int second = -1;
int pos, pos1;
- pos = t.tqfind(':');
+ pos = t.find(':');
hours = t.mid(0,pos).toInt();
- pos1 = t.tqfind(':',pos+1);
+ pos1 = t.find(':',pos+1);
minutes = t.mid(pos+1,((pos1-1)-pos)).toInt();
second = t.right(t.length()-pos1-1).toInt();
setValue( TQTime(hours,minutes,second) );
@@ -6913,9 +6913,9 @@ TQTime Cell::toTime(const TQDomElement &element)
int minutes = -1;
int second = -1;
int pos, pos1;
- pos = t.tqfind(':');
+ pos = t.find(':');
hours = t.mid(0,pos).toInt();
- pos1 = t.tqfind(':',pos+1);
+ pos1 = t.find(':',pos+1);
minutes = t.mid(pos+1,((pos1-1)-pos)).toInt();
second = t.right(t.length()-pos1-1).toInt();
setValue( Value( TQTime(hours,minutes,second)) );
@@ -6930,9 +6930,9 @@ TQDate Cell::toDate(const TQDomElement &element)
int year = -1;
int month = -1;
int day = -1;
- pos = t.tqfind('/');
+ pos = t.find('/');
year = t.mid(0,pos).toInt();
- pos1 = t.tqfind('/',pos+1);
+ pos1 = t.find('/',pos+1);
month = t.mid(pos+1,((pos1-1)-pos)).toInt();
day = t.right(t.length()-pos1-1).toInt();
setValue( Value( TQDate(year,month,day) ) );
@@ -7324,7 +7324,7 @@ void Cell::checkForNamedAreas( TQString & formula ) const
{
if ( loadinginfo->findWordInAreaList(word) )
{
- formula = formula.tqreplace( start, word.length(), "'" + word + "'" );
+ formula = formula.replace( start, word.length(), "'" + word + "'" );
l = formula.length();
++i;
kdDebug() << "Formula: " << formula << ", L: " << l << ", i: " << i + 1 <<endl;
@@ -7339,7 +7339,7 @@ void Cell::checkForNamedAreas( TQString & formula ) const
{
if ( loadinginfo->findWordInAreaList(word) )
{
- formula = formula.tqreplace( start, word.length(), "'" + word + "'" );
+ formula = formula.replace( start, word.length(), "'" + word + "'" );
l = formula.length();
++i;
kdDebug() << "Formula: " << formula << ", L: " << l << ", i: " << i + 1 <<endl;
diff --git a/kspread/kspread_cell.h b/kspread/kspread_cell.h
index 24662186..5831d717 100644
--- a/kspread/kspread_cell.h
+++ b/kspread/kspread_cell.h
@@ -483,7 +483,7 @@ public:
/**
* @return effective pen for the left border
* If this cell is merged by another cell, the other cell's
- * left border pen. If this cell's conditional formatting tqcontains
+ * left border pen. If this cell's conditional formatting contains
* a left border pen and the condition is matched, the conditional
* formatting's pen. Otherwise, its own left border pen.
*/
diff --git a/kspread/kspread_condition.cc b/kspread/kspread_condition.cc
index fdca8e46..876dfbf0 100644
--- a/kspread/kspread_condition.cc
+++ b/kspread/kspread_condition.cc
@@ -475,14 +475,14 @@ void Conditions::loadOasisConditions( const TQDomElement & element )
void Conditions::loadOasisConditionValue( const TQString &styleCondition, Conditional &newCondition )
{
TQString val( styleCondition );
- if ( val.tqcontains( "cell-content()" ) )
+ if ( val.contains( "cell-content()" ) )
{
val = val.remove( "cell-content()" );
loadOasisCondition( val,newCondition );
}
//GetFunction ::= cell-content-is-between(Value, Value) | cell-content-is-not-between(Value, Value)
//for the moment we support just int/double value, not text/date/time :(
- if ( val.tqcontains( "cell-content-is-between(" ) )
+ if ( val.contains( "cell-content-is-between(" ) )
{
val = val.remove( "cell-content-is-between(" );
val = val.remove( ")" );
@@ -490,7 +490,7 @@ void Conditions::loadOasisConditionValue( const TQString &styleCondition, Condit
loadOasisValidationValue( listVal, newCondition );
newCondition.cond = Conditional::Between;
}
- if ( val.tqcontains( "cell-content-is-not-between(" ) )
+ if ( val.contains( "cell-content-is-not-between(" ) )
{
val = val.remove( "cell-content-is-not-between(" );
val = val.remove( ")" );
@@ -505,33 +505,33 @@ void Conditions::loadOasisConditionValue( const TQString &styleCondition, Condit
void Conditions::loadOasisCondition( TQString &valExpression, Conditional &newCondition )
{
TQString value;
- if (valExpression.tqfind( "<=" )==0 )
+ if (valExpression.find( "<=" )==0 )
{
value = valExpression.remove( 0,2 );
newCondition.cond = Conditional::InferiorEqual;
}
- else if (valExpression.tqfind( ">=" )==0 )
+ else if (valExpression.find( ">=" )==0 )
{
value = valExpression.remove( 0,2 );
newCondition.cond = Conditional::SuperiorEqual;
}
- else if (valExpression.tqfind( "!=" )==0 )
+ else if (valExpression.find( "!=" )==0 )
{
//add Differentto attribute
value = valExpression.remove( 0,2 );
newCondition.cond = Conditional::DifferentTo;
}
- else if ( valExpression.tqfind( "<" )==0 )
+ else if ( valExpression.find( "<" )==0 )
{
value = valExpression.remove( 0,1 );
newCondition.cond = Conditional::Inferior;
}
- else if(valExpression.tqfind( ">" )==0 )
+ else if(valExpression.find( ">" )==0 )
{
value = valExpression.remove( 0,1 );
newCondition.cond = Conditional::Superior;
}
- else if (valExpression.tqfind( "=" )==0 )
+ else if (valExpression.find( "=" )==0 )
{
value = valExpression.remove( 0,1 );
newCondition.cond = Conditional::Equal;
diff --git a/kspread/kspread_doc.cc b/kspread/kspread_doc.cc
index 7340feda..0491e630 100644
--- a/kspread/kspread_doc.cc
+++ b/kspread/kspread_doc.cc
@@ -1273,12 +1273,12 @@ void Doc::loadPaper( TQDomElement const & paper )
fright = right.text();
}
//The macro "<sheet>" formerly was typed as "<table>"
- hleft = hleft.tqreplace( "<table>", "<sheet>" );
- hcenter = hcenter.tqreplace( "<table>", "<sheet>" );
- hright = hright.tqreplace( "<table>", "<sheet>" );
- fleft = fleft.tqreplace( "<table>", "<sheet>" );
- fcenter = fcenter.tqreplace( "<table>", "<sheet>" );
- fright = fright.tqreplace( "<table>", "<sheet>" );
+ hleft = hleft.replace( "<table>", "<sheet>" );
+ hcenter = hcenter.replace( "<table>", "<sheet>" );
+ hright = hright.replace( "<table>", "<sheet>" );
+ fleft = fleft.replace( "<table>", "<sheet>" );
+ fcenter = fcenter.replace( "<table>", "<sheet>" );
+ fright = fright.replace( "<table>", "<sheet>" );
TQPtrListIterator<Sheet> it ( map()->sheetList() );
for( ; it.current(); ++it )
@@ -1319,7 +1319,7 @@ void Doc::deregisterPlugin( Plugin * plugin )
bool Doc::docData( TQString const & xmlTag, TQDomElement & data )
{
- SavedDocParts::iterator iter = m_savedDocParts.tqfind( xmlTag );
+ SavedDocParts::iterator iter = m_savedDocParts.find( xmlTag );
if ( iter == m_savedDocParts.end() )
return false;
@@ -2090,18 +2090,18 @@ void Doc::loadOasisAreaName( const TQDomElement& body )
range = Oasis::decodeFormula( range );
- if ( range.tqfind( ':' ) == -1 )
+ if ( range.find( ':' ) == -1 )
{
Point p( range );
- int n = range.tqfind( '!' );
+ int n = range.find( '!' );
if ( n > 0 )
range = range + ":" + range.right( range.length() - n - 1);
kdDebug() << "=> Area: " << range << endl;
}
- if ( range.tqcontains( '!' ) && range[0] == '$' )
+ if ( range.contains( '!' ) && range[0] == '$' )
{
// cut absolute sheet indicator
range.remove( 0, 1 );
@@ -2168,7 +2168,7 @@ void Doc::loadAreaName( const TQDomElement& element )
void Doc::addStringCompletion(const TQString &stringCompletion)
{
- if ( d->listCompletion.items().tqcontains(stringCompletion) == 0 )
+ if ( d->listCompletion.items().contains(stringCompletion) == 0 )
d->listCompletion.addItem( stringCompletion );
}
@@ -2288,7 +2288,7 @@ void Doc::takeSheet( Sheet * sheet )
void Doc::addIgnoreWordAll( const TQString & word)
{
- if( d->spellListIgnoreAll.tqfindIndex( word )==-1)
+ if( d->spellListIgnoreAll.findIndex( word )==-1)
d->spellListIgnoreAll.append( word );
}
@@ -2438,7 +2438,7 @@ void Doc::setUndoRedoLimit(int val)
void Doc::insertPixmapKey( KoPictureKey key )
{
- if ( !d->usedPictures.tqcontains( key ) )
+ if ( !d->usedPictures.contains( key ) )
d->usedPictures.append( key );
}
diff --git a/kspread/kspread_editors.cc b/kspread/kspread_editors.cc
index 1ed83ac2..c9948189 100644
--- a/kspread/kspread_editors.cc
+++ b/kspread/kspread_editors.cc
@@ -137,12 +137,12 @@ int FormulaEditorHighlighter::highlightParagraph(const TQString& text, int /* en
Range newRange( token.text() );
- if (!alreadyFoundRanges.tqcontains(newRange))
+ if (!alreadyFoundRanges.contains(newRange))
{
alreadyFoundRanges.append(newRange);
d->rangeCount++;
}
- setFormat(token.pos() + 1, token.text().length(), colors[ alreadyFoundRanges.tqfindIndex(newRange) % colors.size()] );
+ setFormat(token.pos() + 1, token.text().length(), colors[ alreadyFoundRanges.findIndex(newRange) % colors.size()] );
}
break;
case Token::Boolean: // True, False (also i18n-ized)
@@ -768,7 +768,7 @@ void CellEditor::slotCursorPositionChanged(int /* para */, int pos)
Region region(d->canvas->view(), token.text());
it = region.constBegin();
- if (!alreadyUsedRegions.tqcontains(region))
+ if (!alreadyUsedRegions.contains(region))
{
TQRect r=(*it)->rect();
@@ -1310,7 +1310,7 @@ LocationEditWidget::LocationEditWidget( TQWidget * _parent,
void LocationEditWidget::addCompletionItem( const TQString &_item )
{
kdDebug()<<" LocationEditWidget::addCompletionItem add :"<<_item<<endl;
- if ( completionList.items().tqcontains( _item) == 0 )
+ if ( completionList.items().contains( _item) == 0 )
{
completionList.addItem( _item );
kdDebug()<<" _utem :"<<_item<<endl;
@@ -1348,14 +1348,14 @@ bool LocationEditWidget::activateItem()
// Set the cell component to uppercase:
// Sheet1!a1 -> Sheet1!A2
- int pos = ltext.tqfind('!');
+ int pos = ltext.find('!');
if ( pos !=- 1 )
tmp = ltext.left(pos)+ltext.mid(pos).upper();
else
tmp = ltext.upper();
// Selection entered in location widget
- if ( ltext.tqcontains( ':' ) )
+ if ( ltext.contains( ':' ) )
m_pView->selectionInfo()->initialize( Region(m_pView,tmp) );
// Location entered in location widget
else
diff --git a/kspread/kspread_format.cc b/kspread/kspread_format.cc
index 95898cd3..73c0bbff 100644
--- a/kspread/kspread_format.cc
+++ b/kspread/kspread_format.cc
@@ -3429,15 +3429,15 @@ Currency::Currency(TQString const & code, currencyFormat format)
if ( format == Gnumeric )
{
// I use TQChar(c,r) here so that this file can be opened in any encoding...
- if ( code.tqfind( TQChar( 172, 32 ) ) != -1 ) // Euro sign
+ if ( code.find( TQChar( 172, 32 ) ) != -1 ) // Euro sign
m_code = TQChar( 172, 32 );
- else if ( code.tqfind( TQChar( 163, 0 ) ) != -1 ) // Pound sign
+ else if ( code.find( TQChar( 163, 0 ) ) != -1 ) // Pound sign
m_code = TQChar( 163, 0 );
- else if ( code.tqfind( TQChar( 165, 0 ) ) != -1 ) // Yen sign
+ else if ( code.find( TQChar( 165, 0 ) ) != -1 ) // Yen sign
m_code = TQChar( 165, 0 );
else if ( code[0] == '[' && code[1] == '$' )
{
- int n = code.tqfind(']');
+ int n = code.find(']');
if (n != -1)
{
m_code = code.mid( 2, n - 2 );
@@ -3447,7 +3447,7 @@ Currency::Currency(TQString const & code, currencyFormat format)
m_type = 0;
}
}
- else if ( code.tqfind( '$' ) != -1 )
+ else if ( code.find( '$' ) != -1 )
m_code = "$";
} // end gnumeric
m_type = gCurrencyMap.getIndex( m_code );
diff --git a/kspread/kspread_functions_engineering.cc b/kspread/kspread_functions_engineering.cc
index 8e2a47d9..8ae0bf2f 100644
--- a/kspread/kspread_functions_engineering.cc
+++ b/kspread/kspread_functions_engineering.cc
@@ -307,7 +307,7 @@ Value func_hex2oct (valVector args, ValueCalc *calc, FuncExtra *)
// example: "kPa" will return 1e3 and change unit into "Pa"
static double kspread_convert_prefix( TQMap<TQString,double> map, TQString& unit )
{
- if( map.tqcontains( unit ) )
+ if( map.contains( unit ) )
return 1.0;
// initialize prefix mapping if necessary
@@ -334,7 +334,7 @@ static double kspread_convert_prefix( TQMap<TQString,double> map, TQString& unit
// check for possible prefix
char prefix = unit[0].latin1();
- if( prefixMap.tqcontains( prefix ) )
+ if( prefixMap.contains( prefix ) )
{
unit.remove( 0, 1 );
return prefixMap[ prefix ];
@@ -372,8 +372,8 @@ static bool kspread_convert_mass( const TQString& fromUnit,
double toPrefix = kspread_convert_prefix( massMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !massMap.tqcontains( fromU ) ) return false;
- if( !massMap.tqcontains( toU ) ) return false;
+ if( !massMap.contains( fromU ) ) return false;
+ if( !massMap.contains( toU ) ) return false;
result = value * fromPrefix * massMap[toU] / (massMap[fromU] * toPrefix);
@@ -406,8 +406,8 @@ static bool kspread_convert_distance( const TQString& fromUnit,
double toPrefix = kspread_convert_prefix( distanceMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !distanceMap.tqcontains( fromU ) ) return false;
- if( !distanceMap.tqcontains( toU ) ) return false;
+ if( !distanceMap.contains( fromU ) ) return false;
+ if( !distanceMap.contains( toU ) ) return false;
result = value * fromPrefix * distanceMap[toU] / (distanceMap[fromU] * toPrefix);
@@ -435,8 +435,8 @@ static bool kspread_convert_pressure( const TQString& fromUnit,
double toPrefix = kspread_convert_prefix( pressureMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !pressureMap.tqcontains( fromU ) ) return false;
- if( !pressureMap.tqcontains( toU ) ) return false;
+ if( !pressureMap.contains( fromU ) ) return false;
+ if( !pressureMap.contains( toU ) ) return false;
result = value * fromPrefix * pressureMap[toU] / (pressureMap[fromU] * toPrefix);
@@ -462,8 +462,8 @@ static bool kspread_convert_force( const TQString& fromUnit,
double toPrefix = kspread_convert_prefix( forceMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !forceMap.tqcontains( fromU ) ) return false;
- if( !forceMap.tqcontains( toU ) ) return false;
+ if( !forceMap.contains( fromU ) ) return false;
+ if( !forceMap.contains( toU ) ) return false;
result = value * fromPrefix * forceMap[toU] / (forceMap[fromU] * toPrefix);
@@ -495,8 +495,8 @@ static bool kspread_convert_energy( const TQString& fromUnit,
double toPrefix = kspread_convert_prefix( energyMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !energyMap.tqcontains( fromU ) ) return false;
- if( !energyMap.tqcontains( toU ) ) return false;
+ if( !energyMap.contains( fromU ) ) return false;
+ if( !energyMap.contains( toU ) ) return false;
result = value * fromPrefix * energyMap[toU] / (energyMap[fromU] * toPrefix);
@@ -522,8 +522,8 @@ static bool kspread_convert_power( const TQString& fromUnit,
double toPrefix = kspread_convert_prefix( powerMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !powerMap.tqcontains( fromU ) ) return false;
- if( !powerMap.tqcontains( toU ) ) return false;
+ if( !powerMap.contains( fromU ) ) return false;
+ if( !powerMap.contains( toU ) ) return false;
result = value * fromPrefix * powerMap[toU] / (powerMap[fromU] * toPrefix);
@@ -548,8 +548,8 @@ static bool kspread_convert_magnetism( const TQString& fromUnit,
double toPrefix = kspread_convert_prefix( magnetismMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !magnetismMap.tqcontains( fromU ) ) return false;
- if( !magnetismMap.tqcontains( toU ) ) return false;
+ if( !magnetismMap.contains( fromU ) ) return false;
+ if( !magnetismMap.contains( toU ) ) return false;
result = value * fromPrefix * magnetismMap[toU] / (magnetismMap[fromU] * toPrefix);
@@ -570,10 +570,10 @@ static bool kspread_convert_temperature( const TQString& fromUnit,
tempFactorMap[ "K" ] = 1.0; tempOffsetMap[ "K" ] = -273.15;
}
- if( !tempFactorMap.tqcontains( fromUnit ) ) return false;
- if( !tempOffsetMap.tqcontains( fromUnit ) ) return false;
- if( !tempFactorMap.tqcontains( toUnit ) ) return false;
- if( !tempOffsetMap.tqcontains( toUnit ) ) return false;
+ if( !tempFactorMap.contains( fromUnit ) ) return false;
+ if( !tempOffsetMap.contains( fromUnit ) ) return false;
+ if( !tempFactorMap.contains( toUnit ) ) return false;
+ if( !tempOffsetMap.contains( toUnit ) ) return false;
result = ( value + tempOffsetMap[ fromUnit ] )* tempFactorMap[ fromUnit ];
result = ( result / tempFactorMap[ toUnit ] ) - tempOffsetMap[ toUnit ];
@@ -612,8 +612,8 @@ static bool kspread_convert_volume( const TQString& fromUnit,
double toPrefix = kspread_convert_prefix( volumeMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !volumeMap.tqcontains( fromU ) ) return false;
- if( !volumeMap.tqcontains( toU ) ) return false;
+ if( !volumeMap.contains( fromU ) ) return false;
+ if( !volumeMap.contains( toU ) ) return false;
result = value * fromPrefix * volumeMap[toU] / (volumeMap[fromU] * toPrefix);
@@ -644,8 +644,8 @@ static bool kspread_convert_area( const TQString& fromUnit,
double toPrefix = kspread_convert_prefix( areaMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !areaMap.tqcontains( fromU ) ) return false;
- if( !areaMap.tqcontains( toU ) ) return false;
+ if( !areaMap.contains( fromU ) ) return false;
+ if( !areaMap.contains( toU ) ) return false;
result = value * fromPrefix * areaMap[toU] / (areaMap[fromU] * toPrefix);
@@ -672,8 +672,8 @@ static bool kspread_convert_speed( const TQString& fromUnit,
double toPrefix = kspread_convert_prefix( speedMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !speedMap.tqcontains( fromU ) ) return false;
- if( !speedMap.tqcontains( toU ) ) return false;
+ if( !speedMap.contains( fromU ) ) return false;
+ if( !speedMap.contains( toU ) ) return false;
result = value * fromPrefix * speedMap[toU] / (speedMap[fromU] * toPrefix);
@@ -751,7 +751,7 @@ Value func_complex (valVector args, ValueCalc *calc, FuncExtra *)
static double imag_complexe(TQString str, bool &ok)
{
TQString tmp=str;
-if(tmp.tqfind('i')==-1)
+if(tmp.find('i')==-1)
{ //not a complex
ok=true;
return 0;
@@ -766,12 +766,12 @@ else if( tmp.length()==2 )
{
//-i,+i,
int pos1;
- if((pos1=tmp.tqfind('+'))!=-1&& pos1==0)
+ if((pos1=tmp.find('+'))!=-1&& pos1==0)
{
ok=true;
return 1;
}
- else if( (pos1=tmp.tqfind('-'))!=-1 && pos1==0 )
+ else if( (pos1=tmp.find('-'))!=-1 && pos1==0 )
{
ok=true;
return -1;
@@ -790,12 +790,12 @@ else if( tmp.length()==2 )
else
{//12+12i
int pos1,pos2;
- if((pos1=tmp.tqfind('i'))!=-1)
+ if((pos1=tmp.find('i'))!=-1)
{
double val;
TQString tmpStr;
- if((pos2=tmp.tqfindRev('+'))!=-1 && pos2!=0)
+ if((pos2=tmp.findRev('+'))!=-1 && pos2!=0)
{
if((pos1-pos2)==1)
{
@@ -811,7 +811,7 @@ else
return val;
}
}
- else if( (pos2=tmp.tqfindRev('-'))!=-1&& pos2!=0)
+ else if( (pos2=tmp.findRev('-'))!=-1&& pos2!=0)
{
if((pos1-pos2)==1)
{
@@ -859,7 +859,7 @@ double val;
int pos1,pos2;
TQString tmp=str;
TQString tmpStr;
-if((pos1=tmp.tqfind('i'))==-1)
+if((pos1=tmp.find('i'))==-1)
{ //12.5
val=KGlobal::locale()->readNumber(tmp, &ok);
if(!ok)
@@ -868,7 +868,7 @@ if((pos1=tmp.tqfind('i'))==-1)
}
else
{ //15-xi
- if((pos2=tmp.tqfindRev('-'))!=-1 && pos2!=0)
+ if((pos2=tmp.findRev('-'))!=-1 && pos2!=0)
{
tmpStr=tmp.left(pos2);
val=KGlobal::locale()->readNumber(tmpStr, &ok);
@@ -876,7 +876,7 @@ else
val=0;
return val;
} //15+xi
- else if((pos2=tmp.tqfindRev('+'))!=-1)
+ else if((pos2=tmp.findRev('+'))!=-1)
{
tmpStr=tmp.left(pos2);
val=KGlobal::locale()->readNumber(tmpStr, &ok);
diff --git a/kspread/kspread_functions_math.cc b/kspread/kspread_functions_math.cc
index 702160bc..814226ae 100644
--- a/kspread/kspread_functions_math.cc
+++ b/kspread/kspread_functions_math.cc
@@ -994,7 +994,7 @@ Value func_subtotal (valVector args, ValueCalc *calc, FuncExtra *e)
Cell *cell = e->sheet->cellAt (c, r);
if (cell->isDefault())
continue;
- if (cell->isFormula() && cell->text().tqfind ("SUBTOTAL", 0, false) != -1)
+ if (cell->isFormula() && cell->text().find ("SUBTOTAL", 0, false) != -1)
// cell contains the word SUBTOTAL - replace value with empty
range.setElement (c-c1, r-r1, empty);
}
diff --git a/kspread/kspread_functions_text.cc b/kspread/kspread_functions_text.cc
index 966ac56c..1f661d27 100644
--- a/kspread/kspread_functions_text.cc
+++ b/kspread/kspread_functions_text.cc
@@ -45,7 +45,7 @@ Value func_compare (valVector args, ValueCalc *calc, FuncExtra *);
Value func_concatenate (valVector args, ValueCalc *calc, FuncExtra *);
Value func_dollar (valVector args, ValueCalc *calc, FuncExtra *);
Value func_exact (valVector args, ValueCalc *calc, FuncExtra *);
-Value func_tqfind (valVector args, ValueCalc *calc, FuncExtra *);
+Value func_find (valVector args, ValueCalc *calc, FuncExtra *);
Value func_fixed (valVector args, ValueCalc *calc, FuncExtra *);
Value func_left (valVector args, ValueCalc *calc, FuncExtra *);
Value func_len (valVector args, ValueCalc *calc, FuncExtra *);
@@ -54,7 +54,7 @@ Value func_mid (valVector args, ValueCalc *calc, FuncExtra *);
Value func_proper (valVector args, ValueCalc *calc, FuncExtra *);
Value func_regexp (valVector args, ValueCalc *calc, FuncExtra *);
Value func_regexpre (valVector args, ValueCalc *calc, FuncExtra *);
-Value func_tqreplace (valVector args, ValueCalc *calc, FuncExtra *);
+Value func_replace (valVector args, ValueCalc *calc, FuncExtra *);
Value func_rept (valVector args, ValueCalc *calc, FuncExtra *);
Value func_rot (valVector args, ValueCalc *calc, FuncExtra *);
Value func_right (valVector args, ValueCalc *calc, FuncExtra *);
@@ -116,7 +116,7 @@ void RegisterTextFunctions()
f = new Function ("EXACT", func_exact);
f->setParamCount (2);
repo->add (f);
- f = new Function ("FIND", func_tqfind);
+ f = new Function ("FIND", func_find);
f->setParamCount (2, 3);
repo->add (f);
f = new Function ("FIXED", func_fixed);
@@ -134,7 +134,7 @@ void RegisterTextFunctions()
f = new Function ("REGEXPRE", func_regexpre);
f->setParamCount (3);
repo->add (f);
- f = new Function ("REPLACE", func_tqreplace);
+ f = new Function ("REPLACE", func_replace);
f->setParamCount (4);
repo->add (f);
f = new Function ("REPT", func_rept);
@@ -268,7 +268,7 @@ Value func_exact (valVector args, ValueCalc *calc, FuncExtra *)
}
// Function: FIND
-Value func_tqfind (valVector args, ValueCalc *calc, FuncExtra *)
+Value func_find (valVector args, ValueCalc *calc, FuncExtra *)
{
TQString find_text, within_text;
int start_num = 1;
@@ -282,7 +282,7 @@ Value func_tqfind (valVector args, ValueCalc *calc, FuncExtra *)
if (start_num <= 0) return Value::errorVALUE();
if (start_num > (int)within_text.length()) return Value::errorVALUE();
- int pos = within_text.tqfind (find_text, start_num - 1);
+ int pos = within_text.find (find_text, start_num - 1);
if( pos < 0 ) return Value::errorNA();
return Value (pos + 1);
@@ -319,9 +319,9 @@ Value func_fixed (valVector args, ValueCalc *calc, FuncExtra *)
bool neg = number < 0;
result = TQString::number( neg ? -number:number, 'f', decimals );
- int pos = result.tqfind('.');
+ int pos = result.find('.');
if (pos == -1) pos = result.length();
- else result.tqreplace(pos, 1, locale->decimalSymbol());
+ else result.replace(pos, 1, locale->decimalSymbol());
if( !no_commas )
while (0 < (pos -= 3))
result.insert(pos, locale->thousandsSeparator());
@@ -446,7 +446,7 @@ Value func_regexpre (valVector args, ValueCalc *calc, FuncExtra *)
while ((pos = exp.search (s, pos)) != -1)
{
int i = exp.matchedLength();
- s = s.tqreplace (pos, i, str);
+ s = s.replace (pos, i, str);
pos += str.length();
}
@@ -454,7 +454,7 @@ Value func_regexpre (valVector args, ValueCalc *calc, FuncExtra *)
}
// Function: REPLACE
-Value func_tqreplace (valVector args, ValueCalc *calc, FuncExtra *)
+Value func_replace (valVector args, ValueCalc *calc, FuncExtra *)
{
TQString text = calc->conv()->asString (args[0]).asString();
int pos = calc->conv()->asInteger (args[1]).asInteger();
@@ -463,7 +463,7 @@ Value func_tqreplace (valVector args, ValueCalc *calc, FuncExtra *)
if (pos < 0) pos = 0;
- TQString result = text.tqreplace (pos-1, len, new_text);
+ TQString result = text.replace (pos-1, len, new_text);
return Value (result);
}
@@ -521,7 +521,7 @@ Value func_search (valVector args, ValueCalc *calc, FuncExtra *)
// use globbing feature of TQRegExp
TQRegExp regex( find_text, false, true );
- int pos = within_text.tqfind( regex, start_num-1 );
+ int pos = within_text.find( regex, start_num-1 );
if( pos < 0 ) return Value::errorNA();
return Value (pos + 1);
@@ -567,12 +567,12 @@ Value func_substitute (valVector args, ValueCalc *calc, FuncExtra *)
TQString result = text;
- int p = result.tqfind (old_text);
+ int p = result.find (old_text);
while ((p != -1) && (num > 0))
{
- result.tqreplace( p, old_text.length(), new_text );
+ result.replace( p, old_text.length(), new_text );
// find another location, starting straight after the replaced text
- p = result.tqfind (old_text, p + new_text.length());
+ p = result.find (old_text, p + new_text.length());
if( !all ) num--;
}
diff --git a/kspread/kspread_genvalidationstyle.cc b/kspread/kspread_genvalidationstyle.cc
index f886836a..613be176 100644
--- a/kspread/kspread_genvalidationstyle.cc
+++ b/kspread/kspread_genvalidationstyle.cc
@@ -36,7 +36,7 @@ GenValidationStyles::~GenValidationStyles()
TQString GenValidationStyles::lookup( const GenValidationStyle& style )
{
- StyleMap::iterator it = m_styles.tqfind( style );
+ StyleMap::iterator it = m_styles.find( style );
if ( it == m_styles.end() ) {
TQString styleName( "val" );
@@ -54,7 +54,7 @@ TQString GenValidationStyles::makeUniqueName( const TQString& base ) const
do {
name = base;
name += TQString::number( num++ );
- } while ( m_names.tqfind( name ) != m_names.end() );
+ } while ( m_names.find( name ) != m_names.end() );
return name;
}
diff --git a/kspread/kspread_map.cc b/kspread/kspread_map.cc
index 032fd13c..7d55a8ff 100644
--- a/kspread/kspread_map.cc
+++ b/kspread/kspread_map.cc
@@ -107,8 +107,8 @@ void Map::moveSheet( const TQString & _from, const TQString & _to, bool _before
Sheet* sheetfrom = findSheet( _from );
Sheet* sheetto = findSheet( _to );
- int from = m_lstSheets.tqfind( sheetfrom ) ;
- int to = m_lstSheets.tqfind( sheetto ) ;
+ int from = m_lstSheets.find( sheetfrom ) ;
+ int to = m_lstSheets.find( sheetto ) ;
if ( !_before )
++to;
@@ -475,14 +475,14 @@ DCOPObject * Map::dcopObject()
void Map::takeSheet( Sheet * sheet )
{
- int pos = m_lstSheets.tqfindRef( sheet );
+ int pos = m_lstSheets.findRef( sheet );
m_lstSheets.take( pos );
m_lstDeletedSheets.append( sheet );
}
void Map::insertSheet( Sheet * sheet )
{
- int pos = m_lstDeletedSheets.tqfindRef( sheet );
+ int pos = m_lstDeletedSheets.findRef( sheet );
if ( pos != -1 )
m_lstDeletedSheets.take( pos );
m_lstSheets.append(sheet);
diff --git a/kspread/kspread_numformat.cc b/kspread/kspread_numformat.cc
index ed118ec1..906086f9 100644
--- a/kspread/kspread_numformat.cc
+++ b/kspread/kspread_numformat.cc
@@ -182,7 +182,7 @@ namespace NumFormat_Local
int getType( TQString const & format, BaseFormat * f ) const
{
- FormatMap::const_iterator iter = m_formats.tqfind( format );
+ FormatMap::const_iterator iter = m_formats.find( format );
if ( iter == m_formats.end() )
{
f = 0;
@@ -338,7 +338,7 @@ void parseNegativePart( TQString & format, int i,
g_convertionInfo.negBr = true;
break;
case '[':
- if ( format.tqfind( "[red]", i, false ) == i )
+ if ( format.find( "[red]", i, false ) == i )
{
g_convertionInfo.negRed = true;
i += 5;
@@ -370,12 +370,12 @@ void parseNegativePart( TQString & format, int i,
}
}
- int p = g_convertionInfo.postfix.tqfind( '"' );
+ int p = g_convertionInfo.postfix.find( '"' );
while ( p != -1 )
{
g_convertionInfo.postfix.remove( p, 1 );
- p = g_convertionInfo.postfix.tqfind( '"', p );
+ p = g_convertionInfo.postfix.find( '"', p );
}
}
@@ -935,10 +935,10 @@ void createNumber( TQString & result, Value const & value,
result = TQString::number( nnum, 'f', prec );
- int pos = result.tqfind( '.' );
+ int pos = result.find( '.' );
if ( pos >= 0 )
{
- result = result.tqreplace( pos, 1, g_dcSymbol );
+ result = result.replace( pos, 1, g_dcSymbol );
// remove '0' from the end if not required
if ( data->rightOpt > 0 )
@@ -1168,13 +1168,13 @@ void createScientific( TQString & result, Value const & value,
result = TQString::number( nnum, 'E', data->rightReq + data->rightOpt );
- int pos = result.tqfind( '.' );
+ int pos = result.find( '.' );
if ( pos >= 0 )
{
- result = result.tqreplace( pos, 1, g_dcSymbol );
+ result = result.replace( pos, 1, g_dcSymbol );
if ( data->rightOpt > 0 )
{
- int i = result.tqfind( 'E', pos, false ) - 1;
+ int i = result.find( 'E', pos, false ) - 1;
int n = result.length() - data->rightOpt;
if ( i > 0 )
diff --git a/kspread/kspread_object.cc b/kspread/kspread_object.cc
index 71cbbd75..7440b990 100644
--- a/kspread/kspread_object.cc
+++ b/kspread/kspread_object.cc
@@ -628,7 +628,7 @@ bool EmbeddedChart::saveOasisObjectAttributes( KSpreadOasisSaveContext &sc ) con
if(m_pBinding) { // see http://bugs.kde.org/show_bug.cgi?id=120395
TQRect dataArea = m_pBinding->dataArea();
TQString rangeName = util_rangeName( dataArea);
- rangeName.insert( rangeName.tqfind(':') +1, sheet()->sheetName() + "." );
+ rangeName.insert( rangeName.find(':') +1, sheet()->sheetName() + "." );
rangeName.prepend( sheet()->sheetName() + "." );
sc.xmlWriter.addAttribute( "draw:notify-on-update-of-ranges", rangeName );
}
@@ -1009,7 +1009,7 @@ void EmbeddedPictureObject::loadOasis(const TQDomElement &element, KoOasisLoadin
if ( !href.isEmpty() /*&& href[0] == '#'*/ )
{
TQString strExtension;
- const int result=href.tqfindRev(".");
+ const int result=href.findRev(".");
if (result>=0)
{
strExtension=href.mid(result+1); // As we are using KoPicture, the extension should be without the dot.
@@ -1066,12 +1066,12 @@ void EmbeddedPictureObject::loadOasis(const TQDomElement &element, KoOasisLoadin
// _fileName=e.attribute("filename");
// if ( !_fileName.isEmpty() )
// {
-// if ( int _envVarB = _fileName.tqfind( '$' ) >= 0 )
+// if ( int _envVarB = _fileName.find( '$' ) >= 0 )
// {
-// int _envVarE = _fileName.tqfind( '/', _envVarB );
+// int _envVarE = _fileName.find( '/', _envVarB );
// // ### FIXME: it should be TQString::local8Bit instead of TQFile::encodeName, shouldn't it?
// TQString path = getenv( TQFile::encodeName(_fileName.mid( _envVarB, _envVarE-_envVarB )) );
-// _fileName.tqreplace( _envVarB-1, _envVarE-_envVarB+1, path );
+// _fileName.replace( _envVarB-1, _envVarE-_envVarB+1, path );
// }
// }
//
diff --git a/kspread/kspread_sheet.cc b/kspread/kspread_sheet.cc
index 43e4bbec..6c27757c 100644
--- a/kspread/kspread_sheet.cc
+++ b/kspread/kspread_sheet.cc
@@ -122,9 +122,9 @@ void CellBinding::cellChanged( Cell *_cell )
emit changed( _cell );
}
-bool CellBinding::tqcontains( int _x, int _y )
+bool CellBinding::contains( int _x, int _y )
{
- return m_rctDataArea.tqcontains( TQPoint( _x, _y ) );
+ return m_rctDataArea.contains( TQPoint( _x, _y ) );
}
/*****************************************************************************
@@ -344,7 +344,7 @@ public:
int Sheet::s_id = 0L;
TQIntDict<Sheet>* Sheet::s_mapSheets;
-Sheet* Sheet::tqfind( int _id )
+Sheet* Sheet::find( int _id )
{
if ( !s_mapSheets )
return 0L;
@@ -2331,7 +2331,7 @@ void Sheet::refreshRemoveAreaName(const TQString & _areaName)
{
if ( c->isFormula() )
{
- if (c->text().tqfind(tmp) != -1)
+ if (c->text().find(tmp) != -1)
{
if ( !c->makeFormula() )
kdError(36001) << "ERROR: Syntax ERROR" << endl;
@@ -2348,7 +2348,7 @@ void Sheet::refreshChangeAreaName(const TQString & _areaName)
{
if ( c->isFormula() )
{
- if (c->text().tqfind(tmp) != -1)
+ if (c->text().find(tmp) != -1)
{
if ( !c->makeFormula() )
kdError(36001) << "ERROR: Syntax ERROR" << endl;
@@ -2369,17 +2369,17 @@ void Sheet::changeCellTabName( TQString const & old_name, TQString const & new_n
{
if( c->isFormula() )
{
- if(c->text().tqfind(old_name)!=-1)
+ if(c->text().find(old_name)!=-1)
{
- int nb = c->text().tqcontains(old_name+"!");
+ int nb = c->text().contains(old_name+"!");
TQString tmp=old_name+"!";
int len = tmp.length();
tmp=c->text();
for( int i=0; i<nb; i++ )
{
- int pos = tmp.tqfind( old_name+"!" );
- tmp.tqreplace( pos, len, new_name+"!" );
+ int pos = tmp.find( old_name+"!" );
+ tmp.replace( pos, len, new_name+"!" );
}
c->setCellText(tmp);
}
@@ -2958,7 +2958,7 @@ void Sheet::changeNameCellRef( const TQPoint & pos, bool fullRowOrColumn,
}
#if 0
-void Sheet::tqreplace( const TQString &_tqfind, const TQString &_tqreplace, long options,
+void Sheet::replace( const TQString &_find, const TQString &_replace, long options,
Canvas *canvas )
{
Selection* selectionInfo = canvas->view()->selectionInfo();
@@ -2987,13 +2987,13 @@ void Sheet::tqreplace( const TQString &_tqfind, const TQString &_tqreplace, long
// Create the class that handles all the actual replace stuff, and connect it to its
// local slots.
- KReplace dialog( _tqfind, _tqreplace, options );
+ KReplace dialog( _find, _replace, options );
TQObject::connect(
&dialog, TQT_SIGNAL( highlight( const TQString &, int, int, const TQRect & ) ),
canvas, TQT_SLOT( highlight( const TQString &, int, int, const TQRect & ) ) );
TQObject::connect(
- &dialog, TQT_SIGNAL( tqreplace( const TQString &, int, int,int, const TQRect & ) ),
- canvas, TQT_SLOT( tqreplace( const TQString &, int, int,int, const TQRect & ) ) );
+ &dialog, TQT_SIGNAL( replace( const TQString &, int, int,int, const TQRect & ) ),
+ canvas, TQT_SLOT( replace( const TQString &, int, int,int, const TQRect & ) ) );
// Now do the replacing...
if ( !doc()->undoLocked() )
@@ -3024,7 +3024,7 @@ void Sheet::tqreplace( const TQString &_tqfind, const TQString &_tqreplace, long
TQString text = cell->text();
cellRegion.setTop( row );
cellRegion.setLeft( col );
- if (!dialog.tqreplace( text, cellRegion ))
+ if (!dialog.replace( text, cellRegion ))
return;
}
}
@@ -3276,8 +3276,8 @@ void Sheet::sortByRow( const TQRect &area, int key1, int key2, int key3,
if ( firstKey )
{
- int i1 = firstKey->tqfindIndex( cell2->text() );
- int i2 = firstKey->tqfindIndex( bestCell->text() );
+ int i1 = firstKey->findIndex( cell2->text() );
+ int i2 = firstKey->findIndex( bestCell->text() );
if ( i1 != -1 && i2 != -1 )
{
@@ -3632,8 +3632,8 @@ void Sheet::sortByColumn( const TQRect &area, int key1, int key2, int key3,
if ( firstKey )
{
- int i1 = firstKey->tqfindIndex( cell2->text() );
- int i2 = firstKey->tqfindIndex( bestCell->text() );
+ int i1 = firstKey->findIndex( cell2->text() );
+ int i2 = firstKey->findIndex( bestCell->text() );
if ( i1 != -1 && i2 != -1 )
{
@@ -5043,7 +5043,7 @@ TQString Sheet::copyAsText( Selection* selectionInfo )
if ( !c->isDefault() )
{
TQPoint p( c->column(), c->row() );
- if ( selection.tqcontains( p ) )
+ if ( selection.contains( p ) )
{
top = TQMIN( top, (unsigned) c->row() );
left = TQMIN( left, (unsigned) c->column() );
@@ -5193,7 +5193,7 @@ void Sheet::pasteTextPlain( TQString &_text, TQRect pasteArea)
{
int p = 0;
- p = tmp.tqfind('\n');
+ p = tmp.find('\n');
if (p < 0)
p = tmp.length();
@@ -5816,7 +5816,7 @@ TQDomDocument Sheet::saveCellRegion(const Region& region, bool copy, bool era)
if (!cell->isDefault() && !cell->isPartOfMerged())
{
TQPoint point(cell->column(), cell->row());
- if (range.tqcontains(point))
+ if (range.contains(point))
{
root.appendChild(cell->save( dd, 0, top - 1, copy, copy, era));
}
@@ -5857,7 +5857,7 @@ TQDomDocument Sheet::saveCellRegion(const Region& region, bool copy, bool era)
if (!cell->isDefault() && !cell->isPartOfMerged())
{
TQPoint point(cell->column(), cell->row());
- if (range.tqcontains(point))
+ if (range.contains(point))
{
root.appendChild(cell->save( dd, left - 1, 0, copy, copy, era));
}
@@ -6334,9 +6334,9 @@ bool Sheet::loadSheetStyleFormat( TQDomElement *style )
void Sheet::replaceMacro( TQString & text, const TQString & old, const TQString & newS )
{
- int n = text.tqfind( old );
+ int n = text.find( old );
if ( n != -1 )
- text = text.tqreplace( n, old.length(), newS );
+ text = text.replace( n, old.length(), newS );
}
@@ -6630,35 +6630,35 @@ void Sheet::loadOasisMasterLayoutPage( KoStyleStack &styleStack )
TQString str = styleStack.attributeNS( KoXmlNS::style, "print" );
kdDebug()<<" style:print :"<<str<<endl;
- if (str.tqcontains( "headers" ) )
+ if (str.contains( "headers" ) )
{
//TODO implement it into kspread
}
- if ( str.tqcontains( "grid" ) )
+ if ( str.contains( "grid" ) )
{
d->print->setPrintGrid( true );
}
- if ( str.tqcontains( "annotations" ) )
+ if ( str.contains( "annotations" ) )
{
//TODO it's not implemented
}
- if ( str.tqcontains( "objects" ) )
+ if ( str.contains( "objects" ) )
{
//TODO it's not implemented
}
- if ( str.tqcontains( "charts" ) )
+ if ( str.contains( "charts" ) )
{
//TODO it's not implemented
}
- if ( str.tqcontains( "drawings" ) )
+ if ( str.contains( "drawings" ) )
{
//TODO it's not implemented
}
- if ( str.tqcontains( "formulas" ) )
+ if ( str.contains( "formulas" ) )
{
d->showFormula = true;
}
- if ( str.tqcontains( "zero-values" ) )
+ if ( str.contains( "zero-values" ) )
{
//TODO it's not implemented
}
@@ -8537,7 +8537,7 @@ void Sheet::clearPaintDirtyData()
bool Sheet::cellIsPaintDirty( TQPoint const & cell ) const
{
- return d->paintDirtyList.tqcontains(cell);
+ return d->paintDirtyList.contains(cell);
}
#ifndef NDEBUG
diff --git a/kspread/kspread_sheet.h b/kspread/kspread_sheet.h
index 6266d382..5d907810 100644
--- a/kspread/kspread_sheet.h
+++ b/kspread/kspread_sheet.h
@@ -98,7 +98,7 @@ public:
CellBinding( Sheet *_sheet, const TQRect& _area );
virtual ~CellBinding();
- bool tqcontains( int _x, int _y );
+ bool contains( int _x, int _y );
/**
* Call this function if one of the cells covered by this binding ( @see #rect )
* has changed. This will in turn force for example a chart to update.
@@ -1057,7 +1057,7 @@ public:
virtual DCOPObject* dcopObject();
- static Sheet* tqfind( int _id );
+ static Sheet* find( int _id );
#ifndef NDEBUG
void printDebug();
diff --git a/kspread/kspread_sheetprint.cc b/kspread/kspread_sheetprint.cc
index 6bb577f6..c3c12117 100644
--- a/kspread/kspread_sheetprint.cc
+++ b/kspread/kspread_sheetprint.cc
@@ -705,7 +705,7 @@ bool SheetPrint::isOnNewPageX( int _column )
}
//Now check if we find the column already in the list
- if ( m_lnewPageListX.tqfindIndex( _column ) != -1 )
+ if ( m_lnewPageListX.findIndex( _column ) != -1 )
{
if( _column > m_maxCheckedNewPageX )
m_maxCheckedNewPageX = _column;
@@ -820,7 +820,7 @@ bool SheetPrint::isOnNewPageY( int _row )
}
//Now check if we find the row already in the list
- if ( m_lnewPageListY.tqfindIndex( _row ) != -1 )
+ if ( m_lnewPageListY.findIndex( _row ) != -1 )
{
if( _row > m_maxCheckedNewPageY )
m_maxCheckedNewPageY = _row;
@@ -934,11 +934,11 @@ void SheetPrint::updateNewPageListX( int _col )
{
//Find the page entry for this column
TQValueList<PrintNewPageEntry>::iterator it;
- it = m_lnewPageListX.tqfind( _col );
+ it = m_lnewPageListX.find( _col );
while ( ( it == m_lnewPageListX.end() ) && _col > 0 )
{
_col--;
- it = m_lnewPageListX.tqfind( _col );
+ it = m_lnewPageListX.find( _col );
}
//Remove later pages
@@ -969,11 +969,11 @@ void SheetPrint::updateNewPageListY( int _row )
{
//Find the page entry for this row
TQValueList<PrintNewPageEntry>::iterator it;
- it = m_lnewPageListY.tqfind( _row );
+ it = m_lnewPageListY.find( _row );
while ( ( it == m_lnewPageListY.end() ) && _row > 0 )
{
_row--;
- it = m_lnewPageListY.tqfind( _row );
+ it = m_lnewPageListY.find( _row );
}
//Remove later pages
@@ -1005,10 +1005,10 @@ void SheetPrint::resetPrintRange ()
setPrintRange( TQRect( TQPoint( 1, 1 ), TQPoint( KS_colMax, KS_rowMax ) ) );
}
-void SheetPrint::replaceHeadFootLineMacro ( TQString &_text, const TQString &_search, const TQString &_tqreplace )
+void SheetPrint::replaceHeadFootLineMacro ( TQString &_text, const TQString &_search, const TQString &_replace )
{
- if ( _search != _tqreplace )
- _text.tqreplace ( TQString( "<" + _search + ">" ), "<" + _tqreplace + ">" );
+ if ( _search != _replace )
+ _text.replace ( TQString( "<" + _search + ">" ), "<" + _replace + ">" );
}
TQString SheetPrint::localizeHeadFootLine ( const TQString &_text )
@@ -1172,7 +1172,7 @@ void SheetPrint::setPaperLayout( float _leftBorder, float _topBorder,
TQString paper( _paper );
if ( paper[0].isDigit() ) // Custom format
{
- const int i = paper.tqfind( 'x' );
+ const int i = paper.find( 'x' );
if ( i < 0 )
{
// We have nothing useful, so assume ISO A4
@@ -1218,7 +1218,7 @@ TQValueList<PrintNewPageEntry>::iterator SheetPrint::findNewPageColumn( int col
}
return it;
// TQValueList<PrintNewPageEntry>::iterator it;
-// it = m_lnewPageListX.tqfind( startCol );
+// it = m_lnewPageListX.find( startCol );
}
TQValueList<PrintNewPageEntry>::iterator SheetPrint::findNewPageRow( int row )
@@ -1307,35 +1307,35 @@ TQString SheetPrint::completeHeading( const TQString &_data, int _page, const TQ
tmp = _data;
int pos = 0;
- while ( ( pos = tmp.tqfind( "<page>", pos ) ) != -1 )
- tmp.tqreplace( pos, 6, page );
+ while ( ( pos = tmp.find( "<page>", pos ) ) != -1 )
+ tmp.replace( pos, 6, page );
pos = 0;
- while ( ( pos = tmp.tqfind( "<pages>", pos ) ) != -1 )
- tmp.tqreplace( pos, 7, pages );
+ while ( ( pos = tmp.find( "<pages>", pos ) ) != -1 )
+ tmp.replace( pos, 7, pages );
pos = 0;
- while ( ( pos = tmp.tqfind( "<file>", pos ) ) != -1 )
- tmp.tqreplace( pos, 6, pathFileName );
+ while ( ( pos = tmp.find( "<file>", pos ) ) != -1 )
+ tmp.replace( pos, 6, pathFileName );
pos = 0;
- while ( ( pos = tmp.tqfind( "<name>", pos ) ) != -1 )
- tmp.tqreplace( pos, 6, fileName );
+ while ( ( pos = tmp.find( "<name>", pos ) ) != -1 )
+ tmp.replace( pos, 6, fileName );
pos = 0;
- while ( ( pos = tmp.tqfind( "<time>", pos ) ) != -1 )
- tmp.tqreplace( pos, 6, t );
+ while ( ( pos = tmp.find( "<time>", pos ) ) != -1 )
+ tmp.replace( pos, 6, t );
pos = 0;
- while ( ( pos = tmp.tqfind( "<date>", pos ) ) != -1 )
- tmp.tqreplace( pos, 6, d );
+ while ( ( pos = tmp.find( "<date>", pos ) ) != -1 )
+ tmp.replace( pos, 6, d );
pos = 0;
- while ( ( pos = tmp.tqfind( "<author>", pos ) ) != -1 )
- tmp.tqreplace( pos, 8, full_name );
+ while ( ( pos = tmp.find( "<author>", pos ) ) != -1 )
+ tmp.replace( pos, 8, full_name );
pos = 0;
- while ( ( pos = tmp.tqfind( "<email>", pos ) ) != -1 )
- tmp.tqreplace( pos, 7, email_addr );
+ while ( ( pos = tmp.find( "<email>", pos ) ) != -1 )
+ tmp.replace( pos, 7, email_addr );
pos = 0;
- while ( ( pos = tmp.tqfind( "<org>", pos ) ) != -1 )
- tmp.tqreplace( pos, 5, organization );
+ while ( ( pos = tmp.find( "<org>", pos ) ) != -1 )
+ tmp.replace( pos, 5, organization );
pos = 0;
- while ( ( pos = tmp.tqfind( "<sheet>", pos ) ) != -1 )
- tmp.tqreplace( pos, 7, ta );
+ while ( ( pos = tmp.find( "<sheet>", pos ) ) != -1 )
+ tmp.replace( pos, 7, ta );
return tmp;
}
diff --git a/kspread/kspread_sheetprint.h b/kspread/kspread_sheetprint.h
index d0779eb5..0062476d 100644
--- a/kspread/kspread_sheetprint.h
+++ b/kspread/kspread_sheetprint.h
@@ -290,11 +290,11 @@ public:
/**
* Replaces in _text all _search text parts by _replace text parts.
- * Included is a test to not change if _search == _tqreplace.
+ * Included is a test to not change if _search == _replace.
* The arguments should not include neither the beginning "<" nor the leading ">", this is already
* included internally.
*/
- void replaceHeadFootLineMacro ( TQString &_text, const TQString &_search, const TQString &_tqreplace );
+ void replaceHeadFootLineMacro ( TQString &_text, const TQString &_search, const TQString &_replace );
/**
* Replaces in _text all page macros by the i18n-version of the macros
*/
diff --git a/kspread/kspread_style.cc b/kspread/kspread_style.cc
index ef3b9158..e1bbbf52 100644
--- a/kspread/kspread_style.cc
+++ b/kspread/kspread_style.cc
@@ -207,7 +207,7 @@ void Style::loadOasisDataStyle( KoOasisStyles& oasisStyles, const TQDomElement&
// kdDebug()<< " oasisStyles.dataFormats()[...] suffix :"<< oasisStyles.dataFormats()[element.attributeNS( KoXmlNS::style, "data-style-name" , TQString())].suffix<<endl;
const TQString styleName = element.attributeNS( KoXmlNS::style, "data-style-name", TQString() );
- if ( oasisStyles.dataFormats().tqcontains(styleName) )
+ if ( oasisStyles.dataFormats().contains(styleName) )
{
const KoOasisStyles::NumericStyleFormat dataStyle = oasisStyles.dataFormats()[styleName];
@@ -571,16 +571,16 @@ void Style::loadOasisTextProperties( KoOasisStyles& oasisStyles, const KoStyleSt
static TQString convertDateFormat( const TQString& date )
{
TQString result = date;
- result.tqreplace( "%Y", "yyyy" );
- result.tqreplace( "%y", "yy" );
- result.tqreplace( "%n", "M" );
- result.tqreplace( "%m", "MM" );
- result.tqreplace( "%e", "d" );
- result.tqreplace( "%d", "dd" );
- result.tqreplace( "%b", "MMM" );
- result.tqreplace( "%B", "MMMM" );
- result.tqreplace( "%a", "ddd" );
- result.tqreplace( "%A", "dddd" );
+ result.replace( "%Y", "yyyy" );
+ result.replace( "%y", "yy" );
+ result.replace( "%n", "M" );
+ result.replace( "%m", "MM" );
+ result.replace( "%e", "d" );
+ result.replace( "%d", "dd" );
+ result.replace( "%b", "MMM" );
+ result.replace( "%B", "MMMM" );
+ result.replace( "%a", "ddd" );
+ result.replace( "%A", "dddd" );
return result;
}
@@ -2674,7 +2674,7 @@ TQString Style::colorName( const TQColor& color )
TQRgb rgb = color.rgb();
- if (!map.tqcontains( rgb ))
+ if (!map.contains( rgb ))
{
map[rgb] = color.name();
return map[rgb];
diff --git a/kspread/kspread_style_manager.cc b/kspread/kspread_style_manager.cc
index 1d570e95..61ca5711 100644
--- a/kspread/kspread_style_manager.cc
+++ b/kspread/kspread_style_manager.cc
@@ -244,7 +244,7 @@ void StyleManager::createBuiltinStyles()
CustomStyle * StyleManager::style( TQString const & name ) const
{
- Styles::const_iterator iter( m_styles.tqfind( name ) );
+ Styles::const_iterator iter( m_styles.find( name ) );
if ( iter != m_styles.end() )
return iter.data();
@@ -270,7 +270,7 @@ void StyleManager::takeStyle( CustomStyle * style )
++iter;
}
- Styles::iterator i( m_styles.tqfind( style->name() ) );
+ Styles::iterator i( m_styles.find( style->name() ) );
if ( i != m_styles.end() )
{
@@ -322,7 +322,7 @@ void StyleManager::changeName( TQString const & oldName, TQString const & newNam
++iter;
}
- iter = m_styles.tqfind( oldName );
+ iter = m_styles.find( oldName );
if ( iter != end )
{
CustomStyle * s = iter.data();
@@ -366,7 +366,7 @@ TQDict<Style> StyleManager::loadOasisAutoStyles( KoOasisStyles& oasisStyles )
if ( it.current()->hasAttributeNS( KoXmlNS::style, "tqparent-style-name" ) )
{
TQString parentStyleName = it.current()->attributeNS( KoXmlNS::style, "tqparent-style-name", TQString() );
- if ( m_oasisStyles.tqcontains( parentStyleName ) )
+ if ( m_oasisStyles.contains( parentStyleName ) )
{
autoStyles[name]->setParent( m_oasisStyles[parentStyleName] );
}
diff --git a/kspread/kspread_undo.cc b/kspread/kspread_undo.cc
index f88c35fc..6036344c 100644
--- a/kspread/kspread_undo.cc
+++ b/kspread/kspread_undo.cc
@@ -2055,7 +2055,7 @@ void UndoChangeAreaTextCell::undo()
const TQPoint location(x,y);
- if ( m_lstTextCell.tqcontains(location) )
+ if ( m_lstTextCell.contains(location) )
cell->setCellText( m_lstTextCell[location] );
else
cell->setCellText( "",true );
@@ -2121,7 +2121,7 @@ void UndoChangeAreaTextCell::redo()
const TQPoint location(x,y);
- if (m_lstRedoTextCell.tqcontains(location))
+ if (m_lstRedoTextCell.contains(location))
cell->setCellText( m_lstRedoTextCell[location] );
else
cell->setCellText( "" , true );
diff --git a/kspread/kspread_util.cc b/kspread/kspread_util.cc
index 43c2581b..47edd2ac 100644
--- a/kspread/kspread_util.cc
+++ b/kspread/kspread_util.cc
@@ -248,7 +248,7 @@ void Point::init(const TQString & _str)
}
TQString str( _str );
- int n = _str.tqfind( '!' );
+ int n = _str.find( '!' );
if ( n != -1 )
{
_sheetName = _str.left( n );
@@ -284,7 +284,7 @@ void Point::init(const TQString & _str)
//default is error
int x = -1;
//search for the first character != text
- int result = str.tqfind( TQRegExp("[^A-Za-z]+"), p );
+ int result = str.find( TQRegExp("[^A-Za-z]+"), p );
//get the colomn number for the character between actual position and the first non text charakter
if ( result != -1 )
@@ -381,7 +381,7 @@ Point::Point( const TQString & str, Map * map,
{
uint p = 0;
- int p2 = str.tqfind( '!' );
+ int p2 = str.find( '!' );
if ( p2 != -1 )
{
_sheetName = str.left( p2++ );
@@ -464,7 +464,7 @@ Range::Range(const TQString & _str)
_range.setLeft(-1);
_sheet = 0;
- int p = _str.tqfind(':');
+ int p = _str.find(':');
// if (p == -1)
// return;
@@ -554,7 +554,7 @@ Range::Range(const TQString & str, Map * map,
_sheet = 0;
int p = 0;
- int p2 = str.tqfind('!');
+ int p2 = str.find('!');
if (p2 != -1)
{
_sheetName = str.left(p2++);
@@ -574,7 +574,7 @@ Range::Range(const TQString & str, Map * map,
_sheet = sheet;
- int p3 = str.tqfind(':', p);
+ int p3 = str.find(':', p);
if (p3 == -1)
return;
@@ -603,7 +603,7 @@ TQString Range::toString() const
//Insert $ characters to show fixed parts of range
- int pos=result.tqfind("!")+1;
+ int pos=result.find("!")+1;
Q_ASSERT(pos != -1);
if (_leftFixed)
@@ -616,7 +616,7 @@ TQString Range::toString() const
result.insert(pos+Cell::columnName(_range.left()).length(),'$');
}
- pos=result.tqfind(":")+1;
+ pos=result.find(":")+1;
Q_ASSERT(pos != -1);
if (_rightFixed)
@@ -657,9 +657,9 @@ void Range::getEndPoint(Point* pt)
pt->setSheetName(_sheetName);
}
-bool Range::tqcontains (const Point &cell) const
+bool Range::contains (const Point &cell) const
{
- return _range.tqcontains (cell.pos());
+ return _range.contains (cell.pos());
}
bool Range::intersects (const Range &r) const
@@ -1007,10 +1007,10 @@ TQPen KSpread::convertOasisStringToPen( const TQString &border )
//Return true when it's a reference to cell from sheet.
bool KSpread::localReferenceAnchor( const TQString &_ref )
{
- bool isLocalRef = (_ref.tqfind("http://") != 0 &&
- _ref.tqfind("mailto:") != 0 &&
- _ref.tqfind("ftp://") != 0 &&
- _ref.tqfind("file:") != 0 );
+ bool isLocalRef = (_ref.find("http://") != 0 &&
+ _ref.find("mailto:") != 0 &&
+ _ref.find("ftp://") != 0 &&
+ _ref.find("file:") != 0 );
return isLocalRef;
}
diff --git a/kspread/kspread_util.h b/kspread/kspread_util.h
index 5418f118..fc39708b 100644
--- a/kspread/kspread_util.h
+++ b/kspread/kspread_util.h
@@ -173,7 +173,7 @@ public:
TQRect range() const;
/** Returns true if this range includes the specified cell */
- bool tqcontains (const Point &cell) const;
+ bool contains (const Point &cell) const;
/**
* Returns true if this range intersects Range @p r (ie. there is at least one cell
* which is common to both Ranges )
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()));
}
}
diff --git a/kspread/kspread_view.h b/kspread/kspread_view.h
index 4a64a52e..4d6eb96f 100644
--- a/kspread/kspread_view.h
+++ b/kspread/kspread_view.h
@@ -407,10 +407,10 @@ public slots:
void toggleProtectSheet( bool );
void toggleProtectDoc( bool );
void viewZoom( const TQString & );
- void tqfind();
+ void find();
void findNext();
void findPrevious();
- void tqreplace();
+ void replace();
void conditional();
void validity();
void insertSeries();
@@ -638,7 +638,7 @@ protected slots:
void slotListChoosePopupMenu( );
/**
- * Called by tqfind/tqreplace (findNext) when it found a match
+ * Called by find/replace (findNext) when it found a match
*/
void slotHighlight( const TQString &text, int matchingIndex, int matchedLength );
/**
diff --git a/kspread/ksprsavinginfo.h b/kspread/ksprsavinginfo.h
index 0dff20e2..46bdd2cc 100644
--- a/kspread/ksprsavinginfo.h
+++ b/kspread/ksprsavinginfo.h
@@ -45,7 +45,7 @@ public:
sheetDef pageDef( const TQString &name) { return m_masterPageStyle[name]; }
- bool findStyleName(const TQString & name) const { return (m_masterPageStyle.tqfind( name ) != m_masterPageStyle.end());}
+ bool findStyleName(const TQString & name) const { return (m_masterPageStyle.find( name ) != m_masterPageStyle.end());}
StylePageMap stylePageMap() const { return m_masterPageStyle;}
diff --git a/kspread/manipulator.cc b/kspread/manipulator.cc
index 5d501798..bed111ba 100644
--- a/kspread/manipulator.cc
+++ b/kspread/manipulator.cc
@@ -1224,7 +1224,7 @@ bool AdjustColumnRowManipulator::process(Element* element)
int col = cell->column();
if ( !cell->isEmpty() && !cell->isObscured())
{
- if (widths.tqcontains(col) && widths[col] != -1.0)
+ if (widths.contains(col) && widths[col] != -1.0)
{
ColumnFormat* format = sheet->nonDefaultColumnFormat(col);
if ( kAbs(format->dblWidth() - widths[col] ) > DBL_EPSILON )
@@ -1241,7 +1241,7 @@ bool AdjustColumnRowManipulator::process(Element* element)
{
for (int col = range.left(); col <= range.right(); ++col)
{
- if (widths.tqcontains(col) && widths[col] != -1.0)
+ if (widths.contains(col) && widths[col] != -1.0)
{
ColumnFormat* format = sheet->nonDefaultColumnFormat(col);
if ( kAbs(format->dblWidth() - widths[col] ) > DBL_EPSILON )
@@ -1264,7 +1264,7 @@ bool AdjustColumnRowManipulator::process(Element* element)
int row = cell->row();
if ( !cell->isEmpty() && !cell->isObscured())
{
- if (heights.tqcontains(row) && heights[row] != -1.0)
+ if (heights.contains(row) && heights[row] != -1.0)
{
RowFormat* format = sheet->nonDefaultRowFormat(row);
if ( kAbs(format->dblHeight() - heights[row] ) > DBL_EPSILON )
@@ -1281,7 +1281,7 @@ bool AdjustColumnRowManipulator::process(Element* element)
{
for (int row = range.top(); row <= range.bottom(); ++row)
{
- if (heights.tqcontains(row) && heights[row] != -1.0)
+ if (heights.contains(row) && heights[row] != -1.0)
{
RowFormat* format = sheet->nonDefaultRowFormat(row);
if ( kAbs(format->dblHeight() - heights[row] ) > DBL_EPSILON )
@@ -1323,7 +1323,7 @@ bool AdjustColumnRowManipulator::preProcessing()
int row = cell->row();
if (m_adjustColumn)
{
- if (!m_newWidths.tqcontains(col))
+ if (!m_newWidths.contains(col))
{
m_newWidths[col] = -1.0;
ColumnFormat* format = m_sheet->columnFormat(col);
@@ -1337,7 +1337,7 @@ bool AdjustColumnRowManipulator::preProcessing()
}
if (m_adjustRow)
{
- if (!m_newHeights.tqcontains(row))
+ if (!m_newHeights.contains(row))
{
m_newHeights[row] = -1.0;
RowFormat* format = m_sheet->rowFormat(row);
@@ -1363,7 +1363,7 @@ bool AdjustColumnRowManipulator::preProcessing()
int col = cell->column();
if (m_adjustColumn)
{
- if (!m_newWidths.tqcontains(col))
+ if (!m_newWidths.contains(col))
{
m_newWidths[col] = -1.0;
ColumnFormat* format = m_sheet->columnFormat(col);
@@ -1377,7 +1377,7 @@ bool AdjustColumnRowManipulator::preProcessing()
}
if (m_adjustRow)
{
- if (!m_newHeights.tqcontains(row))
+ if (!m_newHeights.contains(row))
{
m_newHeights[row] = -1.0;
RowFormat* format = m_sheet->rowFormat(row);
@@ -1403,7 +1403,7 @@ bool AdjustColumnRowManipulator::preProcessing()
cell = m_sheet->cellAt( col, row );
if (m_adjustColumn)
{
- if (!m_newWidths.tqcontains(col))
+ if (!m_newWidths.contains(col))
{
m_newWidths[col] = -1.0;
ColumnFormat* format = m_sheet->columnFormat(col);
@@ -1417,7 +1417,7 @@ bool AdjustColumnRowManipulator::preProcessing()
}
if (m_adjustRow)
{
- if (!m_newHeights.tqcontains(row))
+ if (!m_newHeights.contains(row))
{
m_newHeights[row] = -1.0;
RowFormat* format = m_sheet->rowFormat(row);
diff --git a/kspread/manipulator_data.cc b/kspread/manipulator_data.cc
index 827c610a..5b829de3 100644
--- a/kspread/manipulator_data.cc
+++ b/kspread/manipulator_data.cc
@@ -48,7 +48,7 @@ bool AbstractDataManipulator::process (Element* element)
FormatType fmtType = No_format;
if (m_reverse) {
// reverse - use the stored value
- if (oldData.tqcontains (col) && oldData[col].tqcontains (row)) {
+ if (oldData.contains (col) && oldData[col].contains (row)) {
val = oldData[col][row].val;
text = oldData[col][row].text;
fmtType = oldData[col][row].format;
diff --git a/kspread/plugins/calculator/kcalc_core.cpp b/kspread/plugins/calculator/kcalc_core.cpp
index e82e56c9..7a6f8209 100644
--- a/kspread/plugins/calculator/kcalc_core.cpp
+++ b/kspread/plugins/calculator/kcalc_core.cpp
@@ -575,7 +575,7 @@ void TQtCalculator::EnterNegate()
TQString string;
string = display_str;
int pos;
- pos = string.tqfindRev('e',-1,false);
+ pos = string.findRev('e',-1,false);
if(pos == -1)
return;
diff --git a/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py b/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py
index 8217a751..f434bce5 100755
--- a/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py
+++ b/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py
@@ -813,7 +813,7 @@ class SampleDialog(qt.QDialog):
widget = self.samplechild.widgets[widgetname]
value = widget.value()
if value != None:
- code = code.tqreplace("{%s}" % widgetname, str(value))
+ code = code.replace("{%s}" % widgetname, str(value))
return code
class MainDialog(qt.QDialog):
diff --git a/kspread/region.cc b/kspread/region.cc
index 4b31554c..92c408ef 100644
--- a/kspread/region.cc
+++ b/kspread/region.cc
@@ -75,7 +75,7 @@ Region::Region(View* view, const TQString& string, Sheet* sheet)
sheet = filterSheetName(sRegion);
}
- int delimiterPos = sRegion.tqfind(':');
+ int delimiterPos = sRegion.find(':');
if (delimiterPos > -1)
{
// range
@@ -335,7 +335,7 @@ Region::Element* Region::eor(const TQPoint& point, Sheet* sheet)
Iterator endOfList = cells().end();
while (it != endOfList)
{
- if (!(*it)->tqcontains(point))
+ if (!(*it)->contains(point))
{
++it;
continue;
@@ -420,7 +420,7 @@ Region::Iterator Region::insert(Region::Iterator pos, const TQPoint& point, Shee
{
continue;
}
- if (element->tqcontains(point))
+ if (element->contains(point))
{
containsPoint = true;
break;
@@ -430,7 +430,7 @@ Region::Iterator Region::insert(Region::Iterator pos, const TQPoint& point, Shee
neighbour = element->rect().normalize();
neighbour.setTopLeft(neighbour.topLeft() - TQPoint(1,1));
neighbour.setBottomRight(neighbour.bottomRight() + TQPoint(1,1));
- if (neighbour.tqcontains(point))
+ if (neighbour.contains(point))
{
adjacentPoint = true; // TODO Stefan: Implement!
break;
@@ -471,11 +471,11 @@ Region::Iterator Region::insert(Region::Iterator pos, const TQRect& range, Sheet
++it;
continue;
}
- if ((*it)->tqcontains(range))
+ if ((*it)->contains(range))
{
containsRange = true;
}
- else if (range.tqcontains((*it)->rect()))
+ else if (range.contains((*it)->rect()))
{
delete *it;
it = d->cells.remove(it);
@@ -570,7 +570,7 @@ bool Region::isColumnOrRowSelected() const
return false;
}
-bool Region::tqcontains(const TQPoint& point, Sheet* sheet) const
+bool Region::contains(const TQPoint& point, Sheet* sheet) const
{
if (d->cells.isEmpty())
{
@@ -580,7 +580,7 @@ bool Region::tqcontains(const TQPoint& point, Sheet* sheet) const
for (ConstIterator it = d->cells.constBegin(); it != endOfList; ++it)
{
Element *element = *it;
- if (element->tqcontains(point))
+ if (element->contains(point))
{
if (sheet && element->sheet() != sheet)
{
@@ -691,7 +691,7 @@ void Region::operator=(const Region& other)
Sheet* Region::filterSheetName(TQString& sRegion)
{
Sheet* sheet = 0;
- int delimiterPos = sRegion.tqfind( '!' );
+ int delimiterPos = sRegion.find( '!' );
if (delimiterPos > -1)
{
TQString sheetName = sRegion.left(delimiterPos);
@@ -801,7 +801,7 @@ Region::Point::Point(const TQString& sCell)
//default is error
int x = -1;
//search for the first character != text
- int result = string.tqfind( TQRegExp("[^A-Za-z]+"), p );
+ int result = string.find( TQRegExp("[^A-Za-z]+"), p );
//get the colomn number for the character between actual position and the first non text charakter
if ( result != -1 )
@@ -885,12 +885,12 @@ TQString Region::Point::name(Sheet* originSheet) const
return name + Cell::name(m_point.x(), m_point.y());
}
-bool Region::Point::tqcontains(const TQPoint& point) const
+bool Region::Point::contains(const TQPoint& point) const
{
return (m_point == point);
}
-bool Region::Point::tqcontains(const TQRect& range) const
+bool Region::Point::contains(const TQRect& range) const
{
return (range.width() == 1) && (range.height() == 1) && (range.topLeft() == m_point);
}
@@ -910,7 +910,7 @@ Region::Range::Range(const TQString& sRange)
: Region::Element(),
m_range()
{
- int delimiterPos = sRange.tqfind(':');
+ int delimiterPos = sRange.find(':');
if (delimiterPos == -1)
{
return;
@@ -943,14 +943,14 @@ TQString Region::Range::name(Sheet* originSheet) const
Cell::name(m_range.right(), m_range.bottom() );
}
-bool Region::Range::tqcontains(const TQPoint& point) const
+bool Region::Range::contains(const TQPoint& point) const
{
- return m_range.normalize().tqcontains(point);
+ return m_range.normalize().contains(point);
}
-bool Region::Range::tqcontains(const TQRect& range) const
+bool Region::Range::contains(const TQRect& range) const
{
- return m_range.normalize().tqcontains(range.normalize());
+ return m_range.normalize().contains(range.normalize());
}
} // namespace KSpread
diff --git a/kspread/region.h b/kspread/region.h
index 2459dc8e..35972683 100644
--- a/kspread/region.h
+++ b/kspread/region.h
@@ -184,7 +184,7 @@ public:
* @param sheet the sheet the point belongs to
* @return @c true, if the region contains the point @p point
*/
- bool tqcontains(const TQPoint& point, Sheet* sheet = 0) const;
+ bool contains(const TQPoint& point, Sheet* sheet = 0) const;
@@ -334,8 +334,8 @@ public:
virtual bool isColumn() const { return false; }
virtual bool isRow() const { return false; }
- virtual bool tqcontains(const TQPoint&) const { return false; }
- virtual bool tqcontains(const TQRect&) const { return false; }
+ virtual bool contains(const TQPoint&) const { return false; }
+ virtual bool contains(const TQRect&) const { return false; }
virtual TQString name(Sheet* = 0) const { return TQString(""); }
virtual TQRect rect() const { return TQRect(); }
@@ -379,8 +379,8 @@ public:
virtual bool isColumn() const { return false; }
virtual bool isRow() const { return false; }
- virtual bool tqcontains(const TQPoint&) const;
- virtual bool tqcontains(const TQRect&) const;
+ virtual bool contains(const TQPoint&) const;
+ virtual bool contains(const TQRect&) const;
virtual TQString name(Sheet* originSheet = 0) const;
@@ -419,8 +419,8 @@ public:
virtual bool isColumn() const { return (m_range.normalize().top() == 1 && m_range.normalize().bottom() == KS_rowMax); }
virtual bool isRow() const { return (m_range.normalize().left() == 1 && m_range.normalize().right() == KS_colMax); }
- virtual bool tqcontains(const TQPoint&) const;
- virtual bool tqcontains(const TQRect&) const;
+ virtual bool contains(const TQPoint&) const;
+ virtual bool contains(const TQRect&) const;
virtual TQString name(Sheet* originSheet = 0) const;
diff --git a/kspread/selection.cc b/kspread/selection.cc
index 3a0346b6..f05a6db5 100644
--- a/kspread/selection.cc
+++ b/kspread/selection.cc
@@ -952,7 +952,7 @@ Selection::Point::Point(const TQString& string)
}
//search for the first character != text
- int result = string.tqfind( TQRegExp("[^A-Za-z]+"), p );
+ int result = string.find( TQRegExp("[^A-Za-z]+"), p );
if (string[result] == '$')
{
m_rowFixed = true;
@@ -986,7 +986,7 @@ Selection::Range::Range(const TQString& string)
return;
}
- int delimiterPos = string.tqfind(':');
+ int delimiterPos = string.find(':');
if (delimiterPos == -1)
{
return;
diff --git a/kspread/tests/generate-openformula-tests b/kspread/tests/generate-openformula-tests
index 39b93811..f39ce2aa 100755
--- a/kspread/tests/generate-openformula-tests
+++ b/kspread/tests/generate-openformula-tests
@@ -4,7 +4,7 @@
# Requires an open instance of KSpread, with openformula-test.ods loaded.
#
-KSPREAD=`dcoptqfind 'kspread*'`
+KSPREAD=`dcopfind 'kspread*'`
KSPREAD=`echo $KSPREAD | sed s/DCOPRef\(// | sed s/,\)//`
for i in `seq 51 514`
do
diff --git a/kspread/tests/inspector.cc b/kspread/tests/inspector.cc
index 72410f53..17179793 100644
--- a/kspread/tests/inspector.cc
+++ b/kspread/tests/inspector.cc
@@ -98,7 +98,7 @@ void Inspector::Private::handleCell()
new TQListViewItem( cellView, "Style Properties", longAsHexstring( static_cast<long>( cell->format()->style()->features() ) ) );
new TQListViewItem( cellView, "Text", cell->text() );
new TQListViewItem( cellView, "Text (Displayed)",
- cell->strOutText().tqreplace( TQChar('\n'), "\\n" ) );
+ cell->strOutText().replace( TQChar('\n'), "\\n" ) );
TQTextStream ts( &str, IO_WriteOnly );
ts << cell->value();
diff --git a/kspread/tests/testrunner.cc b/kspread/tests/testrunner.cc
index 71d3fcdb..53fe60b3 100644
--- a/kspread/tests/testrunner.cc
+++ b/kspread/tests/testrunner.cc
@@ -104,7 +104,7 @@ void TestRunner::addTester( Tester* tester )
void TestRunner::runTest()
{
TQString testName = d->testType->currentText();
- Tester* tester = d->testers.tqfind( testName );
+ Tester* tester = d->testers.find( testName );
if( tester )
{
d->logView->clear();
diff --git a/kspread/valueconverter.cc b/kspread/valueconverter.cc
index 1aeb25db..8dda86d1 100644
--- a/kspread/valueconverter.cc
+++ b/kspread/valueconverter.cc
@@ -197,8 +197,8 @@ Value ValueConverter::asString (const Value &value) const
//convert the number, change decimal point from English to local
s = TQString::number (value.asFloat(), 'g', 10);
decimal_point = parser->locale()->decimalSymbol()[0];
- if (decimal_point && ((pos = s.tqfind ('.')) != -1))
- s = s.tqreplace (pos, 1, decimal_point);
+ if (decimal_point && ((pos = s.find ('.')) != -1))
+ s = s.replace (pos, 1, decimal_point);
if (fmt == Value::fmt_Percent)
s += " %";
val.setValue (s);
diff --git a/kspread/valueformatter.cc b/kspread/valueformatter.cc
index 1bef11e2..9e3c57da 100644
--- a/kspread/valueformatter.cc
+++ b/kspread/valueformatter.cc
@@ -201,18 +201,18 @@ FormatType ValueFormatter::determineFormatting (const Value &value,
void ValueFormatter::removeTrailingZeros (TQString &str, TQChar decimal_point)
{
- if (str.tqfind (decimal_point) < 0)
+ if (str.find (decimal_point) < 0)
//no decimal point -> nothing to do
return;
int start = 0;
int cslen = converter->locale()->currencySymbol().length();
- if (str.tqfind ('%') != -1)
+ if (str.find ('%') != -1)
start = 2;
- else if (str.tqfind (converter->locale()->currencySymbol()) ==
+ else if (str.find (converter->locale()->currencySymbol()) ==
((int) (str.length() - cslen)))
start = cslen + 1;
- else if ((start = str.tqfind ('E')) != -1)
+ else if ((start = str.find ('E')) != -1)
start = str.length() - start;
else
start = 0;
@@ -277,8 +277,8 @@ TQString ValueFormatter::createNumberFormat ( double value, int precision,
case Scientific_format:
decimal_point = converter->locale()->decimalSymbol()[0];
localizedNumber = TQString::number (value, 'E', p);
- if ((pos = localizedNumber.tqfind ('.')) != -1)
- localizedNumber = localizedNumber.tqreplace (pos, 1, decimal_point);
+ if ((pos = localizedNumber.find ('.')) != -1)
+ localizedNumber = localizedNumber.replace (pos, 1, decimal_point);
break;
default :
//other formatting?
diff --git a/kspread/valueparser.cc b/kspread/valueparser.cc
index 9acd3705..ff5b4b8c 100644
--- a/kspread/valueparser.cc
+++ b/kspread/valueparser.cc
@@ -202,7 +202,7 @@ Value ValueParser::tryParseBool (const TQString& str, bool *ok)
double ValueParser::readNumber(const TQString &_str, bool * ok, bool * isInt)
{
TQString str = _str.stripWhiteSpace();
- bool neg = str.tqfind(parserLocale->negativeSign()) == 0;
+ bool neg = str.find(parserLocale->negativeSign()) == 0;
if (neg)
str.remove( 0, parserLocale->negativeSign().length() );
@@ -212,7 +212,7 @@ double ValueParser::readNumber(const TQString &_str, bool * ok, bool * isInt)
TQString exponentialPart;
int EPos;
- EPos = str.tqfind('E', 0, false);
+ EPos = str.find('E', 0, false);
if (EPos != -1)
{
@@ -220,7 +220,7 @@ double ValueParser::readNumber(const TQString &_str, bool * ok, bool * isInt)
str = str.left(EPos);
}
- int pos = str.tqfind(parserLocale->decimalSymbol());
+ int pos = str.find(parserLocale->decimalSymbol());
TQString major;
TQString minor;
if ( pos == -1 )
@@ -238,7 +238,7 @@ double ValueParser::readNumber(const TQString &_str, bool * ok, bool * isInt)
// Remove thousand separators
int thlen = parserLocale->thousandsSeparator().length();
int lastpos = 0;
- while ( ( pos = major.tqfind( parserLocale->thousandsSeparator() ) ) > 0 )
+ while ( ( pos = major.find( parserLocale->thousandsSeparator() ) ) > 0 )
{
// e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N
int fromEnd = major.length() - pos;
@@ -290,7 +290,7 @@ Value ValueParser::tryParseNumber (const TQString& str, bool *ok)
if (!(*ok))
{
val = str2.toDouble(ok);
- if (str.tqcontains('.'))
+ if (str.contains('.'))
isInt = false;
else
isInt = true;
@@ -315,7 +315,7 @@ Value ValueParser::tryParseNumber (const TQString& str, bool *ok)
else
value.setValue (val);
- if ( str2.tqcontains('E') || str2.tqcontains('e') )
+ if ( str2.contains('E') || str2.contains('e') )
fmtType = Scientific_format;
else
{
@@ -342,7 +342,7 @@ Value ValueParser::tryParseDate (const TQString& str, bool *ok)
// If the year is in the middle, say %m-%Y/%d, we'll remove the sep.
// before it (%m/%d).
TQString fmt = parserLocale->dateFormatShort();
- int yearPos = fmt.tqfind ("%Y", 0, false);
+ int yearPos = fmt.find ("%Y", 0, false);
if ( yearPos > -1 )
{
if ( yearPos == 0 )
@@ -370,7 +370,7 @@ Value ValueParser::tryParseDate (const TQString& str, bool *ok)
// The following fixes the problem, 3/4/1955 will always be 1955
TQString fmt = parserLocale->dateFormatShort();
- if( ( fmt.tqcontains( "%y" ) == 1 ) && ( tmpDate.year() > 2999 ) )
+ if( ( fmt.contains( "%y" ) == 1 ) && ( tmpDate.year() > 2999 ) )
tmpDate = tmpDate.addYears( -1900 );
// this is another HACK !
@@ -388,8 +388,8 @@ Value ValueParser::tryParseDate (const TQString& str, bool *ok)
// if year is 2045, check to see if "2045" isn't there --> actual
// input is "45"
- if( ( str.tqcontains( yearTwoDigits ) >= 1 ) &&
- ( str.tqcontains( yearFourDigits ) == 0 ) )
+ if( ( str.contains( yearTwoDigits ) >= 1 ) &&
+ ( str.contains( yearFourDigits ) == 0 ) )
tmpDate = tmpDate.addYears( -100 );
}
@@ -436,7 +436,7 @@ Value ValueParser::tryParseTime (const TQString& str, bool *ok)
TQString stringPm = parserLocale->translate("pm");
TQString stringAm = parserLocale->translate("am");
int pos=0;
- if((pos=str.tqfind(stringPm))!=-1)
+ if((pos=str.find(stringPm))!=-1)
{
TQString tmp=str.mid(0,str.length()-stringPm.length());
tmp=tmp.simplifyWhiteSpace();
@@ -444,7 +444,7 @@ Value ValueParser::tryParseTime (const TQString& str, bool *ok)
if (!valid)
tm = parserLocale->readTime(tmp+":00 "+stringPm, &valid);
}
- else if((pos=str.tqfind(stringAm))!=-1)
+ else if((pos=str.find(stringAm))!=-1)
{
TQString tmp = str.mid(0,str.length()-stringAm.length());
tmp = tmp.simplifyWhiteSpace();
@@ -482,7 +482,7 @@ TQDateTime ValueParser::readTime (const TQString & intstr, bool withSeconds,
TQString format = parserLocale->timeFormat().simplifyWhiteSpace();
if ( !withSeconds )
{
- int n = format.tqfind("%S");
+ int n = format.find("%S");
format = format.left( n - 1 );
}