summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_functions_financial.cc
diff options
context:
space:
mode:
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