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 /kspread/kspread_functions_text.cc | |
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 'kspread/kspread_functions_text.cc')
-rw-r--r-- | kspread/kspread_functions_text.cc | 30 |
1 files changed, 15 insertions, 15 deletions
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--; } |