summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_functions_financial.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_financial.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_financial.cc')
-rw-r--r--kspread/kspread_functions_financial.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/kspread/kspread_functions_financial.cc b/kspread/kspread_functions_financial.cc
index 3f90d2fc..a9479efc 100644
--- a/kspread/kspread_functions_financial.cc
+++ b/kspread/kspread_functions_financial.cc
@@ -210,8 +210,8 @@ static Value getPrinc (ValueCalc *calc, Value start,
Value func_coupnum (valVector args, ValueCalc *calc, FuncExtra *)
{
// dates and integers only - don't need high-precision for this
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
int frequency = calc->conv()->asInteger (args[2]).asInteger();
int basis = 0;
bool eom = true;
@@ -225,7 +225,7 @@ Value func_coupnum (valVector args, ValueCalc *calc, FuncExtra *)
return Value::errorVALUE();
double result;
- QDate cDate( maturity );
+ TQDate cDate( maturity );
int months = maturity.month() - settlement.month()
+ 12 * ( maturity.year() - settlement.year() );
@@ -249,9 +249,9 @@ Value func_coupnum (valVector args, ValueCalc *calc, FuncExtra *)
// Function: ACCRINT
Value func_accrint (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate maturity = calc->conv()->asDate (args[0]).asDate();
- QDate firstInterest = calc->conv()->asDate (args[1]).asDate();
- QDate settlement = calc->conv()->asDate (args[2]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[0]).asDate();
+ TQDate firstInterest = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[2]).asDate();
Value rate = args[3];
Value par = args[4];
@@ -285,8 +285,8 @@ Value func_accrint (valVector args, ValueCalc *calc, FuncExtra *)
// Function: ACCRINTM
Value func_accrintm (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate issue = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate issue = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value rate = args[2];
Value par = 1000;
@@ -310,8 +310,8 @@ Value func_accrintm (valVector args, ValueCalc *calc, FuncExtra *)
// Function: DISC
Value func_disc (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value par = args[2];
Value redemp = args[3];
@@ -334,8 +334,8 @@ Value func_disc (valVector args, ValueCalc *calc, FuncExtra *)
// Function: TBILLPRICE
Value func_tbillprice (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value discount = args[2];
@@ -353,8 +353,8 @@ Value func_tbillprice (valVector args, ValueCalc *calc, FuncExtra *)
// Function: TBILLYIELD
Value func_tbillyield (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value rate = args[2];
@@ -371,8 +371,8 @@ Value func_tbillyield (valVector args, ValueCalc *calc, FuncExtra *)
// Function: TBILLEQ
Value func_tbilleq (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value discount = args[2];
@@ -394,8 +394,8 @@ Value func_tbilleq (valVector args, ValueCalc *calc, FuncExtra *)
Value func_received (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value investment = args[2];
Value discount = args[3];
@@ -471,8 +471,8 @@ Value func_dollarfr (valVector args, ValueCalc *calc, FuncExtra *)
// Function: INTRATE
Value func_intrate (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value invest = args[2];
Value redemption = args[3];
@@ -885,7 +885,7 @@ Value func_ddb (valVector args, ValueCalc *calc, FuncExtra *)
// Function: EURO
Value func_euro (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString currency = calc->conv()->asString (args[0]).asString().upper();
+ TQString currency = calc->conv()->asString (args[0]).asString().upper();
double result = -1;
if( currency == "ATS" ) result = 13.7603; // Austria