summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_functions_conversion.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kspread/kspread_functions_conversion.cc
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspread/kspread_functions_conversion.cc')
-rw-r--r--kspread/kspread_functions_conversion.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/kspread/kspread_functions_conversion.cc b/kspread/kspread_functions_conversion.cc
index 902033ac..42246838 100644
--- a/kspread/kspread_functions_conversion.cc
+++ b/kspread/kspread_functions_conversion.cc
@@ -158,17 +158,17 @@ Value func_sexdec (valVector args, ValueCalc *calc, FuncExtra *)
// Function: ROMAN
Value func_roman (valVector args, ValueCalc *calc, FuncExtra *)
{
- const QCString RNUnits[] = {"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"};
- const QCString RNTens[] = {"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"};
- const QCString RNHundreds[] = {"", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"};
- const QCString RNThousands[] = {"", "M", "MM", "MMM"};
+ const TQCString RNUnits[] = {"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"};
+ const TQCString RNTens[] = {"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"};
+ const TQCString RNHundreds[] = {"", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"};
+ const TQCString RNThousands[] = {"", "M", "MM", "MMM"};
// precision loss is not a problem here, as we only use the 0-3999 range
long value = calc->conv()->asInteger (args[0]).asInteger ();
if ((value < 0) || (value > 3999))
return Value::errorNA();
- QString result;
- result = QString::fromLatin1 (RNThousands[(value / 1000)] +
+ TQString result;
+ result = TQString::tqfromLatin1 (RNThousands[(value / 1000)] +
RNHundreds[(value / 100) % 10] +
RNTens[(value / 10 ) % 10] +
RNUnits[(value) % 10]);
@@ -177,9 +177,9 @@ Value func_roman (valVector args, ValueCalc *calc, FuncExtra *)
// convert single roman character to decimal
// return < 0 if invalid
-int func_arabic_helper (QChar c)
+int func_arabic_helper (TQChar c)
{
- switch (c.upper().unicode())
+ switch (c.upper().tqunicode())
{
case 'M': return 1000;
case 'D': return 500;
@@ -195,7 +195,7 @@ int func_arabic_helper (QChar c)
// Function: ARABIC
Value func_arabic (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString roman = calc->conv()->asString (args[0]).asString();
+ TQString roman = calc->conv()->asString (args[0]).asString();
if( roman.isEmpty() ) return Value::errorVALUE();
int val = 0, lastd = 0, d = 0;
@@ -215,7 +215,7 @@ Value func_arabic (valVector args, ValueCalc *calc, FuncExtra *)
}
// helper for AsciiToChar
-void func_a2c_helper (ValueCalc *calc, QString &s, Value val)
+void func_a2c_helper (ValueCalc *calc, TQString &s, Value val)
{
if (val.isArray()) {
for (unsigned int row = 0; row < val.rows(); ++row)
@@ -224,7 +224,7 @@ void func_a2c_helper (ValueCalc *calc, QString &s, Value val)
} else {
int v = calc->conv()->asInteger (val).asInteger();
if (v == 0) return;
- QChar c (v);
+ TQChar c (v);
s = s + c;
}
}
@@ -232,7 +232,7 @@ void func_a2c_helper (ValueCalc *calc, QString &s, Value val)
// Function: AsciiToChar
Value func_AsciiToChar (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString str;
+ TQString str;
for (unsigned int i = 0; i < args.count(); i++)
func_a2c_helper (calc, str, args[i]);
return Value (str);
@@ -241,9 +241,9 @@ Value func_AsciiToChar (valVector args, ValueCalc *calc, FuncExtra *)
// Function: CharToAscii
Value func_CharToAscii (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString val = calc->conv()->asString (args[0]).asString ();
+ TQString val = calc->conv()->asString (args[0]).asString ();
if (val.length() == 1)
- return Value (QString (val[0]));
+ return Value (TQString (val[0]));
return Value::errorVALUE();
}