diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | b6edfe41c9395f2e20784cbf0e630af6426950a3 (patch) | |
tree | 56ed9b871d4296e6c15949c24e16420be1b28697 /filters/kspread | |
parent | ef39e8e4178a8f98cf5f154916ba0f03e4855206 (diff) | |
download | koffice-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 'filters/kspread')
-rw-r--r-- | filters/kspread/applixspread/applixspreadimport.cc | 36 | ||||
-rw-r--r-- | filters/kspread/csv/csvdialog.cpp | 2 | ||||
-rw-r--r-- | filters/kspread/csv/csvexport.cc | 12 | ||||
-rw-r--r-- | filters/kspread/csv/csvimport.cc | 4 | ||||
-rw-r--r-- | filters/kspread/excel/import/excelimport.cc | 2 | ||||
-rw-r--r-- | filters/kspread/excel/sidewinder/excel.cpp | 20 | ||||
-rw-r--r-- | filters/kspread/excel/sidewinder/excel.h | 2 | ||||
-rw-r--r-- | filters/kspread/excel/sidewinder/ustring.cpp | 2 | ||||
-rw-r--r-- | filters/kspread/excel/sidewinder/ustring.h | 2 | ||||
-rw-r--r-- | filters/kspread/gnumeric/gnumericexport.cc | 18 | ||||
-rw-r--r-- | filters/kspread/gnumeric/gnumericimport.cc | 40 | ||||
-rw-r--r-- | filters/kspread/html/htmlexport.cc | 10 | ||||
-rw-r--r-- | filters/kspread/opencalc/opencalcexport.cc | 4 | ||||
-rw-r--r-- | filters/kspread/opencalc/opencalcimport.cc | 98 | ||||
-rw-r--r-- | filters/kspread/qpro/libqpro/src/formula.cc | 4 |
15 files changed, 128 insertions, 128 deletions
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 :"<<pos<<endl; @@ -251,9 +251,9 @@ KoFilter::ConversiontqStatus APPLIXSPREADImport::convert( const TQCString& from, // Replace part for this characters: <, >, & - 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<t_mycolor> &m kdDebug()<<" -> "<< mystr<<endl; // Count the number of whitespaces - contcount = mystr.tqcontains (' '); + contcount = mystr.contains (' '); kdDebug()<< "contcount: "<< contcount<<endl; contcount -= 5; // Begin off interest - pos = mystr.tqfind (" 0 "); + pos = mystr.find (" 0 "); // get colorname colstr = mystr.left (pos); @@ -1035,7 +1035,7 @@ APPLIXSPREADImport::readView (TQTextStream &stream, TQString instr, t_rc &rc) sscanf ((*it).latin1(), "%c:%d", &ccolumn, &colwidth); int len = (*it).length (); - int pos = (*it).tqfind (":"); + int pos = (*it).find (":"); (*it).remove (pos, len-pos); printf( " >%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 = "********<SHEETNAME>********"; const TQString tname( i18n("<SHEETNAME>") ); - 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( "<sheet>", "&[TAB]" ); - headerFooter = headerFooter.tqreplace( "<date>", "&[DATE]" ); - headerFooter = headerFooter.tqreplace( "<page>", "&[PAGE]" ); - headerFooter = headerFooter.tqreplace( "<pages>", "&[PAGES]" ); - headerFooter = headerFooter.tqreplace( "<time>", "&[TIME]" ); - headerFooter = headerFooter.tqreplace( "<file>", "&[FILE]" ); + headerFooter = headerFooter.replace( "<sheet>", "&[TAB]" ); + headerFooter = headerFooter.replace( "<date>", "&[DATE]" ); + headerFooter = headerFooter.replace( "<page>", "&[PAGE]" ); + headerFooter = headerFooter.replace( "<pages>", "&[PAGES]" ); + headerFooter = headerFooter.replace( "<time>", "&[TIME]" ); + headerFooter = headerFooter.replace( "<file>", "&[FILE]" ); return headerFooter; } diff --git a/filters/kspread/gnumeric/gnumericimport.cc b/filters/kspread/gnumeric/gnumericimport.cc index ad97a548..249258b3 100644 --- a/filters/kspread/gnumeric/gnumericimport.cc +++ b/filters/kspread/gnumeric/gnumericimport.cc @@ -176,8 +176,8 @@ void convert_string_to_qcolor(TQString color_string, TQColor * color) bool number_ok; - first_col_pos = color_string.tqfind(":", 0); - second_col_pos = color_string.tqfind(":", first_col_pos + 1); + first_col_pos = color_string.find(":", 0); + second_col_pos = color_string.find(":", first_col_pos + 1); /* Fore="0:0:FF00" */ /* If GNUmeric kicks out some invalid colors, we could crash. */ @@ -196,30 +196,30 @@ void areaNames( Doc * ksdoc, const TQString &_name, TQString _zone ) { //Sheet2!$A$2:$D$8 TQString tableName; - int pos = _zone.tqfind( '!' ); + int pos = _zone.find( '!' ); if ( pos != -1 ) { tableName = _zone.left( pos ); _zone = _zone.right( _zone.length()-pos-1 ); - pos = _zone.tqfind( ':' ); + pos = _zone.find( ':' ); TQRect rect; if ( pos != -1 ) { TQString left = _zone.mid( 1, pos-1 ); TQString right = _zone.mid( pos+2, _zone.length()-pos-2 ); - int pos = left.tqfind( '$' ); + int pos = left.find( '$' ); rect.setLeft( util_decodeColumnLabelText(left.left(pos ) ) ); rect.setTop( left.right( left.length()-pos-1 ).toInt() ); - pos = right.tqfind( '$' ); + pos = right.find( '$' ); rect.setRight( util_decodeColumnLabelText(right.left(pos ) ) ); rect.setBottom( right.right( right.length()-pos-1 ).toInt() ); } else { TQString left = _zone; - int pos = left.tqfind( '$' ); + int pos = left.find( '$' ); int leftPos = util_decodeColumnLabelText(left.left(pos ) ); rect.setLeft( leftPos ); rect.setRight( leftPos ); @@ -814,15 +814,15 @@ TQString GNUMERICFilter::convertVars( TQString const & str, Sheet * table ) cons for ( uint i = 0; i < count; ++i ) { - int n = result.tqfind( list1[i] ); + int n = result.find( list1[i] ); if ( n != -1 ) { kdDebug(30521) << "Found var: " << list1[i] << endl; if ( i == 0 ) - result = result.tqreplace( list1[i], table->tableName() ); + result = result.replace( list1[i], table->tableName() ); else - result = result.tqreplace( list1[i], list2[i] ); + result = result.replace( list1[i], list2[i] ); } } @@ -926,7 +926,7 @@ void GNUMERICFilter::ParsePrintInfo( TQDomNode const & printInfo, Sheet * table if ( !repeate.isEmpty() ) { //fix row too high - repeate = repeate.tqreplace( "65536", "32500" ); + repeate = repeate.replace( "65536", "32500" ); Range range(repeate); //kdDebug()<<" repeate :"<<repeate<<"range. ::start row : "<<range.startRow ()<<" start col :"<<range.startCol ()<<" end row :"<<range.endRow ()<<" end col :"<<range.endCol ()<<endl; table->print()->setPrintRepeatColumns( tqMakePair( range.startCol (),range.endCol ()) ); @@ -983,7 +983,7 @@ void GNUMERICFilter::ParseFormat(TQString const & formatString, Cell * kspread_c { if ((formatString[0] == '[') && (formatString[1] == '$')) { - int n = formatString.tqfind(']'); + int n = formatString.find(']'); if (n != -1) { TQString currency = formatString.mid(2, n - 2); @@ -992,7 +992,7 @@ void GNUMERICFilter::ParseFormat(TQString const & formatString, Cell * kspread_c } lastPos = ++n; } - else if (formatString.tqfind("E+0") != -1) + else if (formatString.find("E+0") != -1) { kspread_cell->format()->setFormatType(Scientific_format); } @@ -1004,7 +1004,7 @@ void GNUMERICFilter::ParseFormat(TQString const & formatString, Cell * kspread_c if ( setType(kspread_cell, formatString, content) ) return; - if (formatString.tqfind("?/?") != -1) + if (formatString.find("?/?") != -1) { // TODO: fixme! kspread_cell->format()->setFormatType( fraction_three_digits ); @@ -1035,7 +1035,7 @@ void GNUMERICFilter::ParseFormat(TQString const & formatString, Cell * kspread_c while (formatString[lastPos] == ' ') ++lastPos; - int n = formatString.tqfind( '.', lastPos ); + int n = formatString.find( '.', lastPos ); if ( n != -1) { lastPos = n + 1; @@ -1051,12 +1051,12 @@ void GNUMERICFilter::ParseFormat(TQString const & formatString, Cell * kspread_c } bool red = false; - if (formatString.tqfind("[RED]", lastPos) != -1) + if (formatString.find("[RED]", lastPos) != -1) { red = true; kspread_cell->format()->setFloatColor( Format::NegRed ); } - if ( formatString.tqfind('(', lastPos) != -1 ) + if ( formatString.find('(', lastPos) != -1 ) { if ( red ) kspread_cell->format()->setFloatColor( Format::NegRedBrackets ); @@ -1067,11 +1067,11 @@ void GNUMERICFilter::ParseFormat(TQString const & formatString, Cell * kspread_c void GNUMERICFilter::convertFormula( TQString & formula ) const { - int n = formula.tqfind( '=', 1 ); + int n = formula.find( '=', 1 ); // TODO: check if we do not screw something up here... if ( n != -1 ) - formula = formula.tqreplace( n, 1, "==" ); + formula = formula.replace( n, 1, "==" ); bool inQuote1 = false; bool inQuote2 = false; @@ -1083,7 +1083,7 @@ void GNUMERICFilter::convertFormula( TQString & formula ) const else if ( formula[i] == '"' ) inQuote2 = !inQuote2; else if ( formula[i] == ',' && !inQuote1 && !inQuote2 ) - formula = formula.tqreplace( i, 1, ";" ); + formula = formula.replace( i, 1, ";" ); } } diff --git a/filters/kspread/html/htmlexport.cc b/filters/kspread/html/htmlexport.cc index 3360c593..54711d8d 100644 --- a/filters/kspread/html/htmlexport.cc +++ b/filters/kspread/html/htmlexport.cc @@ -105,7 +105,7 @@ KoFilter::ConversiontqStatus HTMLExport::convert( const TQCString& from, const T Sheet *sheet = ksdoc->map()->firstSheet(); TQString filenameBase = m_chain->outputFile(); - filenameBase = filenameBase.left( filenameBase.tqfindRev( '.' ) ); + filenameBase = filenameBase.left( filenameBase.findRev( '.' ) ); TQStringList sheets; while( sheet != 0 ) @@ -345,10 +345,10 @@ void HTMLExport::convertSheet( Sheet *sheet, TQString &str, int iMaxUsedRow, int text = text.right(text.length()-1); } else if ( !link ) { // Escape HTML characters. - text.tqreplace ('&' , strAmp) - .tqreplace ('<' , strLt) - .tqreplace ('>' , strGt) - .tqreplace (' ' , nbsp); + text.replace ('&' , strAmp) + .replace ('<' , strLt) + .replace ('>' , strGt) + .replace (' ' , nbsp); } line += ">\n"; diff --git a/filters/kspread/opencalc/opencalcexport.cc b/filters/kspread/opencalc/opencalcexport.cc index f38b0bb8..6a0376f4 100644 --- a/filters/kspread/opencalc/opencalcexport.cc +++ b/filters/kspread/opencalc/opencalcexport.cc @@ -474,14 +474,14 @@ bool OpenCalcExport::exportBody( TQDomDocument & doc, TQDomElement & content, co TQString name( sheet->tableName() ); - int n = name.tqfind( ' ' ); + int n = name.find( ' ' ); if ( n != -1 ) { kdDebug(30518) << "Sheet name converting: " << name << endl; name[n] == '_'; kdDebug(30518) << "Sheet name converted: " << name << endl; } - name = name.tqreplace( ' ', "_" ); + name = name.replace( ' ', "_" ); TQRect _printRange = sheet->print()->printRange(); if ( _printRange != ( TQRect( TQPoint( 1, 1 ), TQPoint( KS_colMax, KS_rowMax ) ) ) ) diff --git a/filters/kspread/opencalc/opencalcimport.cc b/filters/kspread/opencalc/opencalcimport.cc index 5316749e..f52ffd0f 100644 --- a/filters/kspread/opencalc/opencalcimport.cc +++ b/filters/kspread/opencalc/opencalcimport.cc @@ -80,7 +80,7 @@ OpenCalcImport::OpenCalcPoint::OpenCalcPoint( TQString const & str ) int colonPos = -1; TQString range; - // tqreplace '.' with '!' + // replace '.' with '!' for ( int i = 0; i < l; ++i ) { if ( str[i] == '$' ) @@ -261,9 +261,9 @@ void OpenCalcImport::checkForNamedAreas( TQString & formula ) const } if ( word.length() > 0 ) { - if ( m_namedAreas.tqfind( word ) != m_namedAreas.end() ) + if ( m_namedAreas.find( word ) != m_namedAreas.end() ) { - formula = formula.tqreplace( start, word.length(), "'" + word + "'" ); + formula = formula.replace( start, word.length(), "'" + word + "'" ); l = formula.length(); ++i; kdDebug(30518) << "Formula: " << formula << ", L: " << l << ", i: " << i + 1 <<endl; @@ -276,9 +276,9 @@ void OpenCalcImport::checkForNamedAreas( TQString & formula ) const } if ( word.length() > 0 ) { - if ( m_namedAreas.tqfind( word ) != m_namedAreas.end() ) + if ( m_namedAreas.find( word ) != m_namedAreas.end() ) { - formula = formula.tqreplace( start, word.length(), "'" + word + "'" ); + formula = formula.replace( start, word.length(), "'" + word + "'" ); l = formula.length(); ++i; kdDebug(30518) << "Formula: " << formula << ", L: " << l << ", i: " << i + 1 <<endl; @@ -635,13 +635,13 @@ bool OpenCalcImport::readCells( TQDomElement & rowNode, Sheet * table, int row, int year=0, month=0, day=0; ok = false; - int p1 = value.tqfind( '-' ); + int p1 = value.find( '-' ); if ( p1 > 0 ) year = value.left( p1 ).toInt( &ok ); kdDebug(30518) << "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 ); @@ -807,14 +807,14 @@ void OpenCalcImport::loadOasisCondition(Cell*cell,const TQDomElement &property ) void OpenCalcImport::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( ")" ); @@ -822,7 +822,7 @@ void OpenCalcImport::loadOasisConditionValue( const TQString &styleCondition, Co 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( ")" ); @@ -837,33 +837,33 @@ void OpenCalcImport::loadOasisConditionValue( const TQString &styleCondition, Co void OpenCalcImport::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; @@ -1135,9 +1135,9 @@ bool OpenCalcImport::readColLayouts( TQDomElement & content, Sheet * table ) void replaceMacro( TQString & text, TQString const & old, TQString const & 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 ); } TQString getPart( TQDomNode const & part ) @@ -1332,35 +1332,35 @@ void OpenCalcImport::loadOasisMasterLayoutPage( Sheet * table,KoStyleStack &styl TQString str = styleStack.attributeNS( ooNS::style, "print" ); kdDebug(30518)<<" 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" ) ) { table->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" ) ) { table->setShowFormula(true); } - if ( str.tqcontains( "zero-values" ) ) + if ( str.contains( "zero-values" ) ) { //todo it's not implemented } @@ -1624,11 +1624,11 @@ void OpenCalcImport::loadOasisAreaName( const TQDomElement&body ) TQString range( point.translation ); - if ( point.translation.tqfind( ':' ) == -1 ) + if ( point.translation.find( ':' ) == -1 ) { Point p( point.translation ); - int n = range.tqfind( '!' ); + int n = range.find( '!' ); if ( n > 0 ) range = range + ":" + range.right( range.length() - n - 1); @@ -2001,7 +2001,7 @@ void OpenCalcImport::loadBorder( Format * tqlayout, TQString const & borderDef, if ( borderDef == "none" ) return; - int p = borderDef.tqfind( ' ' ); + int p = borderDef.find( ' ' ); if ( p < 0 ) return; @@ -2011,7 +2011,7 @@ void OpenCalcImport::loadBorder( Format * tqlayout, TQString const & borderDef, ++p; - int p2 = borderDef.tqfind( ' ', p ); + int p2 = borderDef.find( ' ', p ); TQString s = borderDef.mid( p, p2 - p ); kdDebug(30518) << "Borderstyle: " << s << endl; @@ -2031,7 +2031,7 @@ void OpenCalcImport::loadBorder( Format * tqlayout, TQString const & borderDef, } ++p2; - p = borderDef.tqfind( ' ', p2 ); + p = borderDef.find( ' ', p2 ); if ( p == -1 ) p = borderDef.length(); @@ -2224,7 +2224,7 @@ void OpenCalcImport::readInStyle( Format * tqlayout, TQDomElement const & style if ( style.hasAttributeNS( ooNS::style, "tqparent-style-name" ) ) { Format * cp - = m_defaultStyles.tqfind( style.attributeNS( ooNS::style, "tqparent-style-name", TQString() ) ); + = m_defaultStyles.find( style.attributeNS( ooNS::style, "tqparent-style-name", TQString() ) ); kdDebug(30518) << "Copying tqlayout from " << style.attributeNS( ooNS::style, "tqparent-style-name", TQString() ) << endl; if ( cp != 0 ) @@ -2233,7 +2233,7 @@ void OpenCalcImport::readInStyle( Format * tqlayout, TQDomElement const & style else if ( style.hasAttributeNS( ooNS::style, "family") ) { TQString name = style.attribute( "style-family" ) + "default"; - Format * cp = m_defaultStyles.tqfind( name ); + Format * cp = m_defaultStyles.find( name ); kdDebug(30518) << "Copying tqlayout from " << name << ", " << !cp << endl; @@ -2440,7 +2440,7 @@ void OpenCalcImport::loadOasisValidation( Validity* val, const TQString& validat //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("cell-content-text-length()" ); @@ -2450,7 +2450,7 @@ void OpenCalcImport::loadOasisValidation( Validity* val, const TQString& validat loadOasisValidationCondition( val, valExpression ); } //cell-content-text-length-is-between(Value, Value) | cell-content-text-length-is-not-between(Value, Value) - else if ( valExpression.tqcontains( "cell-content-text-length-is-between" ) ) + else if ( valExpression.contains( "cell-content-text-length-is-between" ) ) { val->m_restriction = Restriction::TextLength; val->m_cond = Conditional::Between; @@ -2460,7 +2460,7 @@ void OpenCalcImport::loadOasisValidation( Validity* val, const TQString& validat TQStringList listVal = TQStringList::split( ",", valExpression ); loadOasisValidationValue( val, listVal ); } - else if ( valExpression.tqcontains( "cell-content-text-length-is-not-between" ) ) + else if ( valExpression.contains( "cell-content-text-length-is-not-between" ) ) { val->m_restriction = Restriction::TextLength; val->m_cond = Conditional::Different; @@ -2475,36 +2475,36 @@ void OpenCalcImport::loadOasisValidation( Validity* val, const TQString& validat //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()" ) ) { val->m_restriction = Restriction::Number; valExpression = valExpression.remove( "cell-content-is-whole-number() and " ); } - else if (valExpression.tqcontains( "cell-content-is-decimal-number()" ) ) + else if (valExpression.contains( "cell-content-is-decimal-number()" ) ) { val->m_restriction = Restriction::Integer; valExpression = valExpression.remove( "cell-content-is-decimal-number() and " ); } - else if (valExpression.tqcontains( "cell-content-is-date()" ) ) + else if (valExpression.contains( "cell-content-is-date()" ) ) { val->m_restriction = Restriction::Date; valExpression = valExpression.remove( "cell-content-is-date() and " ); } - else if (valExpression.tqcontains( "cell-content-is-time()" ) ) + else if (valExpression.contains( "cell-content-is-time()" ) ) { val->m_restriction = Restriction::Time; valExpression = valExpression.remove( "cell-content-is-time() and " ); } kdDebug(30518)<<"valExpression :"<<valExpression<<endl; - if ( valExpression.tqcontains( "cell-content()" ) ) + if ( valExpression.contains( "cell-content()" ) ) { valExpression = valExpression.remove( "cell-content()" ); loadOasisValidationCondition( val, 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( ")" ); @@ -2513,7 +2513,7 @@ void OpenCalcImport::loadOasisValidation( Validity* val, const TQString& validat val->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( ")" ); @@ -2623,33 +2623,33 @@ void OpenCalcImport::loadOasisValidationValue( Validity* val, const TQStringList void OpenCalcImport::loadOasisValidationCondition( Validity* val,TQString &valExpression ) { TQString value; - if (valExpression.tqcontains( "<=" ) ) + if (valExpression.contains( "<=" ) ) { value = valExpression.remove( "<=" ); val->m_cond = Conditional::InferiorEqual; } - else if (valExpression.tqcontains( ">=" ) ) + else if (valExpression.contains( ">=" ) ) { value = valExpression.remove( ">=" ); val->m_cond = Conditional::SuperiorEqual; } - else if (valExpression.tqcontains( "!=" ) ) + else if (valExpression.contains( "!=" ) ) { //add Differentto attribute value = valExpression.remove( "!=" ); val->m_cond = Conditional::DifferentTo; } - else if ( valExpression.tqcontains( "<" ) ) + else if ( valExpression.contains( "<" ) ) { value = valExpression.remove( "<" ); val->m_cond = Conditional::Inferior; } - else if(valExpression.tqcontains( ">" ) ) + else if(valExpression.contains( ">" ) ) { value = valExpression.remove( ">" ); val->m_cond = Conditional::Superior; } - else if (valExpression.tqcontains( "=" ) ) + else if (valExpression.contains( "=" ) ) { value = valExpression.remove( "=" ); val->m_cond = Conditional::Equal; diff --git a/filters/kspread/qpro/libqpro/src/formula.cc b/filters/kspread/qpro/libqpro/src/formula.cc index bd250048..13e3a457 100644 --- a/filters/kspread/qpro/libqpro/src/formula.cc +++ b/filters/kspread/qpro/libqpro/src/formula.cc @@ -214,7 +214,7 @@ static const QpFormulaConv gConv[] = {73, QpFormula::func3, "@mid("}, {74, QpFormula::func1, "@char("}, {75, QpFormula::func1, "@code("}, - {76, QpFormula::func3, "@tqfind("}, + {76, QpFormula::func3, "@find("}, {77, QpFormula::func1, "@dateVal("}, {78, QpFormula::func1, "@timeVal("}, {79, QpFormula::func1, "@cellPtr("}, @@ -244,7 +244,7 @@ static const QpFormulaConv gConv[] = {103, QpFormula::func1, "@lower("}, {104, QpFormula::func2, "@left("}, {105, QpFormula::func2, "@right("}, - {106, QpFormula::func4, "@tqreplace("}, + {106, QpFormula::func4, "@replace("}, {107, QpFormula::func1, "@proper("}, {108, QpFormula::func2, "@cell("}, {109, QpFormula::func1, "@trim("}, |