LibreOffice Module scaddins (master) 1
Namespaces | Macros | Functions | Variables
analysishelper.cxx File Reference
#include <com/sun/star/util/Date.hpp>
#include <com/sun/star/util/XNumberFormatTypes.hpp>
#include <com/sun/star/util/NumberFormatter.hpp>
#include <string.h>
#include <stdio.h>
#include <o3tl/any.hxx>
#include <rtl/math.hxx>
#include <algorithm>
#include <cmath>
#include <memory>
#include "analysisdefs.hxx"
#include "analysishelper.hxx"
#include <analysis.hrc>
#include <strings.hrc>
#include "deffuncname.hxx"
Include dependency graph for analysishelper.cxx:

Go to the source code of this file.

Namespaces

namespace  sca
 
namespace  sca::analysis
 

Macros

#define UNIQUE   false
 
#define DOUBLE   true
 
#define STDPAR   false
 
#define INTPAR   true
 
#define FUNCDATA(FUNCNAME, DBL, OPT, NUMOFPAR, CAT)    { "get" #FUNCNAME, ANALYSIS_FUNCNAME_##FUNCNAME, ANALYSIS_##FUNCNAME, DBL, OPT, ANALYSIS_DEFFUNCNAME_##FUNCNAME, NUMOFPAR, CAT, nullptr }
 
#define FUNCDATAS(FUNCNAME, DBL, OPT, NUMOFPAR, CAT, SUFFIX)    { "get" #FUNCNAME, ANALYSIS_FUNCNAME_##FUNCNAME, ANALYSIS_##FUNCNAME, DBL, OPT, ANALYSIS_DEFFUNCNAME_##FUNCNAME, NUMOFPAR, CAT, SUFFIX }
 
#define NEWD(str, unit, cl)   maVector.emplace_back(new ConvertData(str,unit,cl))
 
#define NEWDP(str, unit, cl)   maVector.emplace_back(new ConvertData(str,unit,cl,true))
 
#define NEWL(str, unit, offs, cl)   maVector.emplace_back(new ConvertDataLinear(str,unit,offs,cl))
 
#define NEWLP(str, unit, offs, cl)   maVector.emplace_back(new ConvertDataLinear(str,unit,offs,cl,true))
 

Functions

sal_uInt16 sca::analysis::DaysInMonth (sal_uInt16 nMonth, sal_uInt16 nYear)
 
sal_Int32 sca::analysis::DateToDays (sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear)
 Convert a date to a count of days starting from 01/01/0001. More...
 
void sca::analysis::DaysToDate (sal_Int32 nDays, sal_uInt16 &rDay, sal_uInt16 &rMonth, sal_uInt16 &rYear)
 Convert a count of days starting from 01/01/0001 to a date. More...
 
sal_Int32 sca::analysis::GetNullDate (const uno::Reference< beans::XPropertySet > &xOpt)
 Get the null date used by the spreadsheet document. More...
 
sal_Int32 sca::analysis::GetDiffDate360 (sal_uInt16 nDay1, sal_uInt16 nMonth1, sal_uInt16 nYear1, bool bLeapYear1, sal_uInt16 nDay2, sal_uInt16 nMonth2, sal_uInt16 nYear2, bool bUSAMethod)
 
sal_Int32 sca::analysis::GetDiffDate360 (sal_Int32 nNullDate, sal_Int32 nDate1, sal_Int32 nDate2, bool bUSAMethod)
 
sal_Int32 sca::analysis::GetDaysInYears (sal_uInt16 nYear1, sal_uInt16 nYear2)
 
sal_Int32 sca::analysis::GetDiffDate (sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode, sal_Int32 *pOptDaysIn1stYear)
 
double sca::analysis::GetYearDiff (sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode)
 
sal_Int32 sca::analysis::GetDaysInYear (sal_Int32 nNullDate, sal_Int32 nDate, sal_Int32 nMode)
 
double sca::analysis::GetYearFrac (sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode)
 Function GetYearFrac implements YEARFRAC as defined in: Open Document Format for Office Applications version 1.2 Part 2, par. More...
 
double sca::analysis::BinomialCoefficient (double n, double k)
 
double sca::analysis::GetGcd (double f1, double f2)
 
double sca::analysis::ConvertToDec (const OUString &aStr, sal_uInt16 nBase, sal_uInt16 nCharLim)
 
static char sca::analysis::GetMaxChar (sal_uInt16 nBase)
 
OUString sca::analysis::ConvertFromDec (double fNum, double fMin, double fMax, sal_uInt16 nBase, sal_Int32 nPlaces, sal_Int32 nMaxPlaces, bool bUsePlaces)
 
double sca::analysis::Erf (double x)
 
double sca::analysis::Erfc (double x)
 
static bool sca::analysis::IsNum (sal_Unicode c)
 
static bool sca::analysis::IsComma (sal_Unicode c)
 
static bool sca::analysis::IsExpStart (sal_Unicode c)
 
static bool sca::analysis::IsImagUnit (sal_Unicode c)
 
static sal_uInt16 sca::analysis::GetVal (sal_Unicode c)
 
bool sca::analysis::ParseDouble (const sal_Unicode *&rp, double &rRet)
 
OUString sca::analysis::GetString (double f, bool bLeadingSign, sal_uInt16 nMaxDig)
 
double sca::analysis::GetAmordegrc (sal_Int32 nNullDate, double fCost, sal_Int32 nDate, sal_Int32 nFirstPer, double fRestVal, double fPer, double fRate, sal_Int32 nBase)
 
double sca::analysis::GetAmorlinc (sal_Int32 nNullDate, double fCost, sal_Int32 nDate, sal_Int32 nFirstPer, double fRestVal, double fPer, double fRate, sal_Int32 nBase)
 
double sca::analysis::GetDuration (sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, double fCoup, double fYield, sal_Int32 nFreq, sal_Int32 nBase)
 
double sca::analysis::GetYieldmat (sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, double fRate, double fPrice, sal_Int32 nBase)
 
double sca::analysis::GetOddfprice (sal_Int32, sal_Int32, sal_Int32, sal_Int32, sal_Int32, double, double, double, sal_Int32, sal_Int32)
 
double sca::analysis::getYield_ (sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, double fCoup, double fPrice, double fRedemp, sal_Int32 nFreq, sal_Int32 nBase)
 
double sca::analysis::getPrice_ (sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, sal_Int32 nBase)
 
double sca::analysis::GetOddfyield (sal_Int32, sal_Int32, sal_Int32, sal_Int32, sal_Int32, double, double, double, sal_Int32, sal_Int32)
 
double sca::analysis::GetOddlprice (sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastCoup, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, sal_Int32 nBase)
 
double sca::analysis::GetOddlyield (sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastCoup, double fRate, double fPrice, double fRedemp, sal_Int32 nFreq, sal_Int32 nBase)
 
double sca::analysis::GetPmt (double fRate, double fNper, double fPv, double fFv, sal_Int32 nPayType)
 
double sca::analysis::GetFv (double fRate, double fNper, double fPmt, double fPv, sal_Int32 nPayType)
 
static void sca::analysis::lcl_GetCouppcd (ScaDate &rDate, const ScaDate &rSettle, const ScaDate &rMat, sal_Int32 nFreq)
 
double sca::analysis::GetCouppcd (sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase)
 
static void sca::analysis::lcl_GetCoupncd (ScaDate &rDate, const ScaDate &rSettle, const ScaDate &rMat, sal_Int32 nFreq)
 
double sca::analysis::GetCoupncd (sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase)
 
double sca::analysis::GetCoupdaybs (sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase)
 
double sca::analysis::GetCoupdaysnc (sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase)
 
double sca::analysis::GetCoupdays (sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase)
 
double sca::analysis::GetCoupnum (sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase)
 
void sca::analysis::InitFuncDataList (FuncDataList &rList)
 

Variables

const FuncDataBase pFuncDatas []
 

Macro Definition Documentation

◆ DOUBLE

#define DOUBLE   true

Definition at line 42 of file analysishelper.cxx.

◆ FUNCDATA

#define FUNCDATA (   FUNCNAME,
  DBL,
  OPT,
  NUMOFPAR,
  CAT 
)     { "get" #FUNCNAME, ANALYSIS_FUNCNAME_##FUNCNAME, ANALYSIS_##FUNCNAME, DBL, OPT, ANALYSIS_DEFFUNCNAME_##FUNCNAME, NUMOFPAR, CAT, nullptr }

Definition at line 47 of file analysishelper.cxx.

◆ FUNCDATAS

#define FUNCDATAS (   FUNCNAME,
  DBL,
  OPT,
  NUMOFPAR,
  CAT,
  SUFFIX 
)     { "get" #FUNCNAME, ANALYSIS_FUNCNAME_##FUNCNAME, ANALYSIS_##FUNCNAME, DBL, OPT, ANALYSIS_DEFFUNCNAME_##FUNCNAME, NUMOFPAR, CAT, SUFFIX }

Definition at line 50 of file analysishelper.cxx.

◆ INTPAR

#define INTPAR   true

Definition at line 45 of file analysishelper.cxx.

◆ NEWD

#define NEWD (   str,
  unit,
  cl 
)    maVector.emplace_back(new ConvertData(str,unit,cl))

◆ NEWDP

#define NEWDP (   str,
  unit,
  cl 
)    maVector.emplace_back(new ConvertData(str,unit,cl,true))

◆ NEWL

#define NEWL (   str,
  unit,
  offs,
  cl 
)    maVector.emplace_back(new ConvertDataLinear(str,unit,offs,cl))

◆ NEWLP

#define NEWLP (   str,
  unit,
  offs,
  cl 
)    maVector.emplace_back(new ConvertDataLinear(str,unit,offs,cl,true))

◆ STDPAR

#define STDPAR   false

Definition at line 44 of file analysishelper.cxx.

◆ UNIQUE

#define UNIQUE   false

Definition at line 41 of file analysishelper.cxx.

Variable Documentation

◆ pFuncDatas

const FuncDataBase pFuncDatas[]

Definition at line 53 of file analysishelper.cxx.

Referenced by sca::analysis::InitFuncDataList().