diff options
Diffstat (limited to 'filters/kspread/gnumeric')
-rw-r--r-- | filters/kspread/gnumeric/gnumericexport.cc | 18 | ||||
-rw-r--r-- | filters/kspread/gnumeric/gnumericimport.cc | 40 |
2 files changed, 29 insertions, 29 deletions
diff --git a/filters/kspread/gnumeric/gnumericexport.cc b/filters/kspread/gnumeric/gnumericexport.cc index beb78879f..cccfcc9fc 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 ad97a5487..249258b3d 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, ";" ); } } |