diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kspread/valueconverter.cc | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-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/valueconverter.cc')
-rw-r--r-- | kspread/valueconverter.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kspread/valueconverter.cc b/kspread/valueconverter.cc index ec60ee05..1aeb25db 100644 --- a/kspread/valueconverter.cc +++ b/kspread/valueconverter.cc @@ -157,13 +157,13 @@ Value ValueConverter::asString (const Value &value) const // as we sometimes want to generate the string differently ... Value val; - QString s; + TQString s; Value::Format fmt; - QChar decimal_point; + TQChar decimal_point; int pos; switch (value.type()) { case Value::Empty: - val = QString::null; + val = TQString(); break; case Value::Boolean: val.setValue (value.asBoolean() ? parser->locale()->translate ("True") : @@ -173,7 +173,7 @@ Value ValueConverter::asString (const Value &value) const { fmt = value.format(); if (fmt == Value::fmt_Percent) - val = QString::number (value.asInteger() * 100) + " %"; + val = TQString::number (value.asInteger() * 100) + " %"; else if (fmt == Value::fmt_DateTime) val = parser->locale()->formatDateTime (value.asDateTime()); else if (fmt == Value::fmt_Date) @@ -181,7 +181,7 @@ Value ValueConverter::asString (const Value &value) const else if (fmt == Value::fmt_Time) val = parser->locale()->formatTime (value.asTime()); else - val = QString::number (value.asInteger()); + val = TQString::number (value.asInteger()); } break; case Value::Float: @@ -195,10 +195,10 @@ Value ValueConverter::asString (const Value &value) const else { //convert the number, change decimal point from English to local - s = QString::number (value.asFloat(), 'g', 10); + s = TQString::number (value.asFloat(), 'g', 10); decimal_point = parser->locale()->decimalSymbol()[0]; - if (decimal_point && ((pos = s.find ('.')) != -1)) - s = s.replace (pos, 1, decimal_point); + if (decimal_point && ((pos = s.tqfind ('.')) != -1)) + s = s.tqreplace (pos, 1, decimal_point); if (fmt == Value::fmt_Percent) s += " %"; val.setValue (s); @@ -228,11 +228,11 @@ Value ValueConverter::asDateTime (const Value &value) const switch (value.type()) { case Value::Empty: - val.setValue (QDateTime::currentDateTime()); + val.setValue (TQDateTime::tqcurrentDateTime()); break; case Value::Boolean: //ignore the bool value... any better idea? ;) - val.setValue (QDateTime::currentDateTime()); + val.setValue (TQDateTime::tqcurrentDateTime()); break; case Value::Integer: val.setValue (value.asFloat()); @@ -269,11 +269,11 @@ Value ValueConverter::asDate (const Value &value) const switch (value.type()) { case Value::Empty: - val.setValue (QDate::currentDate()); + val.setValue (TQDate::tqcurrentDate()); break; case Value::Boolean: //ignore the bool value... any better idea? ;) - val.setValue (QDate::currentDate()); + val.setValue (TQDate::tqcurrentDate()); break; case Value::Integer: val.setValue (value.asFloat()); @@ -308,11 +308,11 @@ Value ValueConverter::asTime (const Value &value) const switch (value.type()) { case Value::Empty: - val.setValue (QTime::currentTime()); + val.setValue (TQTime::currentTime()); break; case Value::Boolean: //ignore the bool value... any better idea? ;) - val.setValue (QTime::currentTime()); + val.setValue (TQTime::currentTime()); break; case Value::Integer: val.setValue (value.asInteger()); |