From b6edfe41c9395f2e20784cbf0e630af6426950a3 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: 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 --- filters/kspread/applixspread/applixspreadimport.cc | 36 ++++---- filters/kspread/csv/csvdialog.cpp | 2 +- filters/kspread/csv/csvexport.cc | 12 +-- filters/kspread/csv/csvimport.cc | 4 +- filters/kspread/excel/import/excelimport.cc | 2 +- filters/kspread/excel/sidewinder/excel.cpp | 20 ++--- filters/kspread/excel/sidewinder/excel.h | 2 +- filters/kspread/excel/sidewinder/ustring.cpp | 2 +- filters/kspread/excel/sidewinder/ustring.h | 2 +- filters/kspread/gnumeric/gnumericexport.cc | 18 ++-- filters/kspread/gnumeric/gnumericimport.cc | 40 ++++----- filters/kspread/html/htmlexport.cc | 10 +-- filters/kspread/opencalc/opencalcexport.cc | 4 +- filters/kspread/opencalc/opencalcimport.cc | 98 +++++++++++----------- filters/kspread/qpro/libqpro/src/formula.cc | 4 +- 15 files changed, 128 insertions(+), 128 deletions(-) (limited to 'filters/kspread') diff --git a/filters/kspread/applixspread/applixspreadimport.cc b/filters/kspread/applixspread/applixspreadimport.cc index 16ea0d8f..ab3201c8 100644 --- a/filters/kspread/applixspread/applixspreadimport.cc +++ b/filters/kspread/applixspread/applixspreadimport.cc @@ -181,7 +181,7 @@ KoFilter::ConversiontqStatus APPLIXSPREADImport::convert( const TQCString& from, // Search for ')' - pos = mystr.tqfind (')'); + pos = mystr.find (')'); typestr = mystr.left (pos); @@ -190,7 +190,7 @@ KoFilter::ConversiontqStatus APPLIXSPREADImport::convert( const TQCString& from, // alllenght = alllenght - pos - 1; // Search for ':' - pos = mystr.tqfind (':'); + pos = mystr.find (':'); // Copy cellnumber informations cellnostr = mystr.left (pos); @@ -201,7 +201,7 @@ KoFilter::ConversiontqStatus APPLIXSPREADImport::convert( const TQCString& from, // Split Table and Cell Number - pos = cellnostr.tqfind ('!'); + pos = cellnostr.find ('!'); // Copy tabnumber informations tabnostr = cellnostr.left (pos); @@ -215,7 +215,7 @@ KoFilter::ConversiontqStatus APPLIXSPREADImport::convert( const TQCString& from, - pos = cellnostr.tqfind (TQRegExp ("[0-9]")); + pos = cellnostr.find (TQRegExp ("[0-9]")); kdDebug()<<" findpos :"<, & - mystr.tqreplace (TQRegExp ("&"), "&"); - mystr.tqreplace (TQRegExp ("<"), "<"); - mystr.tqreplace (TQRegExp (">"), ">"); + mystr.replace (TQRegExp ("&"), "&"); + mystr.replace (TQRegExp ("<"), "<"); + mystr.replace (TQRegExp (">"), ">"); // Replace part for Applix Characters @@ -265,7 +265,7 @@ KoFilter::ConversiontqStatus APPLIXSPREADImport::convert( const TQCString& from, // initialize foundSpecialCharakter = false; - pos = mystr.tqfind ("^"); + pos = mystr.find ("^"); // is there a special character ? if (pos > -1 ) @@ -277,7 +277,7 @@ KoFilter::ConversiontqStatus APPLIXSPREADImport::convert( const TQCString& from, newchar = specCharfind (mystr[pos+1], mystr[pos+2]); // replace the character - mystr.tqreplace (pos, 3, newchar); + mystr.replace (pos, 3, newchar); } } @@ -290,8 +290,8 @@ KoFilter::ConversiontqStatus APPLIXSPREADImport::convert( const TQCString& from, TQString typeCharStr; TQString typeCellStr; - int pos1 = typestr.tqfind ("|"); - int pos2 = typestr.tqfindRev ("|"); + int pos1 = typestr.find ("|"); + int pos2 = typestr.findRev ("|"); typeFormStr = typestr.left (pos1); @@ -313,7 +313,7 @@ KoFilter::ConversiontqStatus APPLIXSPREADImport::convert( const TQCString& from, tabctr = tabnostr; // Searching for the rowcol part and adding to the hole string - pos = my_rc.tabname.tqfindIndex (tabnostr); + pos = my_rc.tabname.findIndex (tabnostr); if (pos > -1) str += my_rc.rc[pos]; } @@ -936,12 +936,12 @@ APPLIXSPREADImport::readColormap (TQTextStream &stream, TQPtrList &m kdDebug()<<" -> "<< mystr<%s<- -<%c><%d> \n", (*it).latin1(), ccolumn, colwidth); @@ -1120,7 +1120,7 @@ APPLIXSPREADImport::filterSHFGBG (TQString it, int *style, int *bgcolor, int m2=0, m3=0; // filter SH = Brushstyle Background - pos = it.tqfind ("SH"); + pos = it.find ("SH"); if (pos > -1) { tmpstr = it; @@ -1134,7 +1134,7 @@ APPLIXSPREADImport::filterSHFGBG (TQString it, int *style, int *bgcolor, // filter FG = FGCOLOR - pos = it.tqfind ("FG"); + pos = it.find ("FG"); if (pos > -1) { tmpstr = it; @@ -1148,7 +1148,7 @@ APPLIXSPREADImport::filterSHFGBG (TQString it, int *style, int *bgcolor, // filter BG = BGCOLOR - pos = it.tqfind ("BG"); + pos = it.find ("BG"); if (pos > -1) { tmpstr = it; diff --git a/filters/kspread/csv/csvdialog.cpp b/filters/kspread/csv/csvdialog.cpp index f6fae839..47cb19fe 100644 --- a/filters/kspread/csv/csvdialog.cpp +++ b/filters/kspread/csv/csvdialog.cpp @@ -351,7 +351,7 @@ void CSVDialog::fillTable( ) for (column = 0; column < m_dialog->m_sheet->numCols(); ++column) { const TQString header = m_dialog->m_sheet->horizontalHeader()->label(column); - if ( m_formatList.tqfind( header ) == m_formatList.end() ) + if ( m_formatList.find( header ) == m_formatList.end() ) m_dialog->m_sheet->horizontalHeader()->setLabel(column, i18n("Text")); m_dialog->m_sheet->adjustColumn(column); diff --git a/filters/kspread/csv/csvexport.cc b/filters/kspread/csv/csvexport.cc index 4e54a071..9961d218 100644 --- a/filters/kspread/csv/csvexport.cc +++ b/filters/kspread/csv/csvexport.cc @@ -93,18 +93,18 @@ TQString CSVExport::exportCSVCell( Sheet const * const sheet, int col, int row, bool quote = false; if ( !text.isEmpty() ) { - if ( text.tqfind( textQuote ) != -1 ) + if ( text.find( textQuote ) != -1 ) { TQString doubleTextQuote(textQuote); doubleTextQuote.append(textQuote); - text.tqreplace(textQuote, doubleTextQuote); + text.replace(textQuote, doubleTextQuote); quote = true; } else if ( text[0].isSpace() || text[text.length()-1].isSpace() ) quote = true; - else if ( text.tqfind( csvDelimiter ) != -1 ) + else if ( text.find( csvDelimiter ) != -1 ) quote = true; - else if ( text.tqfind( "\n" ) != -1 || text.tqfind( "\r" ) != -1 ) + else if ( text.find( "\n" ) != -1 || text.find( "\r" ) != -1 ) quote = true; } @@ -308,10 +308,10 @@ KoFilter::ConversiontqStatus CSVExport::convert( const TQCString & from, const T else name = "****************"; const TQString tname( i18n("") ); - int pos = name.tqfind( tname ); + int pos = name.find( tname ); if ( pos != -1 ) { - name.tqreplace( pos, tname.length(), sheet->sheetName() ); + name.replace( pos, tname.length(), sheet->sheetName() ); } str += name; str += m_eol; diff --git a/filters/kspread/csv/csvimport.cc b/filters/kspread/csv/csvimport.cc index c05c075c..cd93017b 100644 --- a/filters/kspread/csv/csvimport.cc +++ b/filters/kspread/csv/csvimport.cc @@ -193,7 +193,7 @@ KoFilter::ConversiontqStatus CSVFilter::convert( const TQCString& from, const TQ bool ok = false; TQString tmp ( text ); tmp.remove ( TQRegExp( "[^0-9,Ee+-]" ) ); // Keep only 0 to 9, comma, E, e, plus, minus - tmp.tqreplace ( ',', '.' ); + tmp.replace ( ',', '.' ); kdDebug(30501) << "Comma: " << text << " => " << tmp << endl; const double d = tmp.toDouble( &ok ); if ( !ok ) @@ -214,7 +214,7 @@ KoFilter::ConversiontqStatus CSVFilter::convert( const TQCString& from, const TQ bool ok = false; TQString tmp ( text ); tmp.remove ( TQRegExp( "[^0-9\\.EeD+-]" ) ); // Keep only 0 to 9, dot, E, e, D, plus, minus - tmp.tqreplace ( 'D', 'E' ); // double from FORTRAN use D instead of E + tmp.replace ( 'D', 'E' ); // double from FORTRAN use D instead of E kdDebug(30501) << "Point: " << text << " => " << tmp << endl; const double d = tmp.toDouble( &ok ); if ( !ok ) diff --git a/filters/kspread/excel/import/excelimport.cc b/filters/kspread/excel/import/excelimport.cc index 88a20e33..f1bade9e 100644 --- a/filters/kspread/excel/import/excelimport.cc +++ b/filters/kspread/excel/import/excelimport.cc @@ -692,7 +692,7 @@ void ExcelImport::Private::processCellForStyle( Cell* cell, KoXmlWriter* xmlWrit if( !xmlWriter ) return; // only IF automatic style for this format has not been already created yet - if( !styleFormats.tqcontains( cell->formatIndex() ) ) + if( !styleFormats.contains( cell->formatIndex() ) ) { styleFormats[ cell->formatIndex() ] = true; diff --git a/filters/kspread/excel/sidewinder/excel.cpp b/filters/kspread/excel/sidewinder/excel.cpp index 7d128a5b..c201ea27 100644 --- a/filters/kspread/excel/sidewinder/excel.cpp +++ b/filters/kspread/excel/sidewinder/excel.cpp @@ -5520,11 +5520,11 @@ void ExcelReader::handleFooter( FooterRecord* record ) int pos = -1, len = 0; // left part - pos = footer.tqfind( UString("&L") ); + pos = footer.find( UString("&L") ); if( pos >= 0 ) { pos += 2; - len = footer.tqfind( UString("&C") ) - pos; + len = footer.find( UString("&C") ) - pos; if( len > 0 ) { left = footer.substr( pos, len ); @@ -5533,11 +5533,11 @@ void ExcelReader::handleFooter( FooterRecord* record ) } // center part - pos = footer.tqfind( UString("&C") ); + pos = footer.find( UString("&C") ); if( pos >= 0 ) { pos += 2; - len = footer.tqfind( UString("&R") ) - pos; + len = footer.find( UString("&R") ) - pos; if( len > 0 ) { center = footer.substr( pos, len ); @@ -5546,7 +5546,7 @@ void ExcelReader::handleFooter( FooterRecord* record ) } // right part - pos = footer.tqfind( UString("&R") ); + pos = footer.find( UString("&R") ); if( pos >= 0 ) { pos += 2; @@ -5569,11 +5569,11 @@ void ExcelReader::handleHeader( HeaderRecord* record ) int pos = -1, len = 0; // left part of the header - pos = header.tqfind( UString("&L") ); + pos = header.find( UString("&L") ); if( pos >= 0 ) { pos += 2; - len = header.tqfind( UString("&C") ) - pos; + len = header.find( UString("&C") ) - pos; if( len > 0 ) { left = header.substr( pos, len ); @@ -5582,11 +5582,11 @@ void ExcelReader::handleHeader( HeaderRecord* record ) } // center part of the header - pos = header.tqfind( UString("&C") ); + pos = header.find( UString("&C") ); if( pos >= 0 ) { pos += 2; - len = header.tqfind( UString("&R") ) - pos; + len = header.find( UString("&R") ) - pos; if( len > 0 ) { center = header.substr( pos, len ); @@ -5595,7 +5595,7 @@ void ExcelReader::handleHeader( HeaderRecord* record ) } // right part of the header - pos = header.tqfind( UString("&R") ); + pos = header.find( UString("&R") ); if( pos >= 0 ) { pos += 2; diff --git a/filters/kspread/excel/sidewinder/excel.h b/filters/kspread/excel/sidewinder/excel.h index 8450d643..c114aa80 100644 --- a/filters/kspread/excel/sidewinder/excel.h +++ b/filters/kspread/excel/sidewinder/excel.h @@ -1838,7 +1838,7 @@ private: /** - Class MergedCellsRecord represents MergedCells record, which tqcontains + Class MergedCellsRecord represents MergedCells record, which contains a list of all merged cells in the current sheets. Each entry in this list define the range of cells that should be merged, namely firstRow, lastRow, firstColumn and lastColumn. diff --git a/filters/kspread/excel/sidewinder/ustring.cpp b/filters/kspread/excel/sidewinder/ustring.cpp index 497bc586..b26ee196 100644 --- a/filters/kspread/excel/sidewinder/ustring.cpp +++ b/filters/kspread/excel/sidewinder/ustring.cpp @@ -492,7 +492,7 @@ UString UString::substr(int pos, int len) const return result; } -int UString::tqfind(const UString &f, int pos) const +int UString::find(const UString &f, int pos) const { if (isNull()) return -1; diff --git a/filters/kspread/excel/sidewinder/ustring.h b/filters/kspread/excel/sidewinder/ustring.h index 0643400d..1c4f2bc5 100644 --- a/filters/kspread/excel/sidewinder/ustring.h +++ b/filters/kspread/excel/sidewinder/ustring.h @@ -333,7 +333,7 @@ namespace Swinder { * @return Position of first occurence of f starting at position pos. * -1 if the search was not successful. */ - int tqfind(const UString &f, int pos = 0) const; + int find(const UString &f, int pos = 0) const; /** * Static instance of a null string. diff --git a/filters/kspread/gnumeric/gnumericexport.cc b/filters/kspread/gnumeric/gnumericexport.cc index beb78879..cccfcc9f 100644 --- a/filters/kspread/gnumeric/gnumericexport.cc +++ b/filters/kspread/gnumeric/gnumericexport.cc @@ -1340,8 +1340,8 @@ KoFilter::ConversiontqStatus GNUMERICExport::convert( const TQCString& from, con if ( cell->isFormula() ) { TQString tmp = cell->text(); - if ( tmp.tqcontains( "==" ) ) - tmp=tmp.tqreplace( "==", "=" ); + if ( tmp.contains( "==" ) ) + tmp=tmp.replace( "==", "=" ); text = tmp; isLink = false; } @@ -1406,7 +1406,7 @@ KoFilter::ConversiontqStatus GNUMERICExport::convert( const TQCString& from, con isLink = false; TQString tmp = cell->text(); if ( tmp =="==" ) - tmp=tqreplace( "==", "=" ); + tmp=replace( "==", "=" ); /* cell->calc( TRUE ); // Incredible, cells are not calculated if the document was just opened text = cell->valueString(); */ text = tmp; break; @@ -1561,12 +1561,12 @@ TQString GNUMERICExport::convertRefToBase( const TQString & table, const TQRect TQString GNUMERICExport::convertVariable( TQString headerFooter ) { - headerFooter = headerFooter.tqreplace( "", "&[TAB]" ); - headerFooter = headerFooter.tqreplace( "", "&[DATE]" ); - headerFooter = headerFooter.tqreplace( "", "&[PAGE]" ); - headerFooter = headerFooter.tqreplace( "", "&[PAGES]" ); - headerFooter = headerFooter.tqreplace( "