whitespace cleanup in scaddins

Change-Id: I05d0ee9db5a243631a8568dfc967328520e0799a
This commit is contained in:
Markus Mohrhard 2014-04-06 17:19:16 +02:00
parent 4b243d2201
commit f170367642
11 changed files with 0 additions and 190 deletions

View File

@ -234,8 +234,6 @@ public:
virtual double SAL_CALL getFvschedule( double fPrinc, const css::uno::Sequence< css::uno::Sequence< double > >& rSchedule ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException, std::exception ) SAL_OVERRIDE;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -30,8 +30,6 @@
using namespace ::com::sun::star;
#define UNIQUE sal_False // function name does not exist in Calc
#define DOUBLE sal_True // function name exists in Calc
@ -1265,12 +1263,8 @@ double GetZw( double fZins, double fZzr, double fRmz, double fBw, sal_Int32 nF )
return -fZw;
}
// financial functions COUP***
// COUPPCD: find last coupon date before settlement (can be equal to settlement)
static void lcl_GetCouppcd( ScaDate& rDate, const ScaDate& rSettle, const ScaDate& rMat, sal_Int32 nFreq )
throw( lang::IllegalArgumentException )
@ -1294,8 +1288,6 @@ double GetCouppcd( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_I
return aDate.getDate( nNullDate );
}
// COUPNCD: find first coupon date after settlement (is never equal to settlement)
static void lcl_GetCoupncd( ScaDate& rDate, const ScaDate& rSettle, const ScaDate& rMat, sal_Int32 nFreq )
throw( lang::IllegalArgumentException )
@ -1319,8 +1311,6 @@ double GetCoupncd( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_I
return aDate.getDate( nNullDate );
}
// COUPDAYBS: get day count: coupon date before settlement <-> settlement
double GetCoupdaybs( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase )
throw( uno::RuntimeException, lang::IllegalArgumentException )
@ -1334,8 +1324,6 @@ double GetCoupdaybs( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal
return ScaDate::getDiff( aDate, aSettle );
}
// COUPDAYSNC: get day count: settlement <-> coupon date after settlement
double GetCoupdaysnc( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase )
throw( uno::RuntimeException, lang::IllegalArgumentException )
@ -1353,8 +1341,6 @@ double GetCoupdaysnc( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sa
return GetCoupdays( nNullDate, nSettle, nMat, nFreq, nBase ) - GetCoupdaybs( nNullDate, nSettle, nMat, nFreq, nBase );
}
// COUPDAYS: get day count: coupon date before settlement <-> coupon date after settlement
double GetCoupdays( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase )
throw( uno::RuntimeException, lang::IllegalArgumentException )
@ -1373,8 +1359,6 @@ double GetCoupdays( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_
return static_cast< double >( GetDaysInYear( 0, 0, nBase ) ) / nFreq;
}
// COUPNUM: get count of coupon dates
double GetCoupnum( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase )
throw( uno::RuntimeException, lang::IllegalArgumentException )
@ -1391,10 +1375,6 @@ double GetCoupnum( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_I
class AnalysisRscStrArrLoader : public Resource
{
private:
@ -1411,8 +1391,6 @@ public:
};
FuncData::FuncData( const FuncDataBase& r, ResMgr& rResMgr ) :
aIntName( OUString::createFromAscii( r.pIntName ) ),
nUINameID( r.nUINameID ),
@ -1451,8 +1429,6 @@ sal_uInt16 FuncData::GetStrIndex( sal_uInt16 nParamNum ) const
}
FuncDataList::FuncDataList( ResMgr& rResMgr )
{
for( sal_uInt16 n = 0 ; n < SAL_N_ELEMENTS(pFuncDatas) ; n++ )
@ -1495,8 +1471,6 @@ AnalysisResId::AnalysisResId( sal_uInt16 nId, ResMgr& rResMgr ) : ResId( nId, rR
}
SortedIndividualInt32List::SortedIndividualInt32List()
{
}
@ -1612,8 +1586,6 @@ void SortedIndividualInt32List::InsertHolidayList(
void ScaDoubleList::Append(
const uno::Sequence< uno::Sequence< double > >& rValueSeq ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
@ -1641,8 +1613,6 @@ void ScaDoubleList::Append(
}
}
void ScaDoubleList::Append(
const ScaAnyConverter& rAnyConv,
const uno::Any& rAny,
@ -1682,8 +1652,6 @@ void ScaDoubleList::Append(
Append( rAnyConv, pArray[ nIndex ], bIgnoreEmpty );
}
void ScaDoubleList::Append(
ScaAnyConverter& rAnyConv,
const uno::Reference< beans::XPropertySet >& xOpt,
@ -1702,8 +1670,6 @@ sal_Bool ScaDoubleList::CheckInsert( double ) const throw( uno::RuntimeException
sal_Bool ScaDoubleListGT0::CheckInsert( double fValue ) const throw( uno::RuntimeException, lang::IllegalArgumentException )
{
if( fValue < 0.0 )
@ -1713,8 +1679,6 @@ sal_Bool ScaDoubleListGT0::CheckInsert( double fValue ) const throw( uno::Runtim
sal_Bool ScaDoubleListGE0::CheckInsert( double fValue ) const throw( uno::RuntimeException, lang::IllegalArgumentException )
{
if( fValue < 0.0 )
@ -1724,8 +1688,6 @@ sal_Bool ScaDoubleListGE0::CheckInsert( double fValue ) const throw( uno::Runtim
Complex::Complex( const OUString& rStr ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
if( !ParseString( rStr, *this ) )
@ -2223,8 +2185,6 @@ void ComplexList::Append( const uno::Sequence< uno::Any >& aMultPars, ComplListA
}
ConvertData::ConvertData( const sal_Char p[], double fC, ConvertDataClass e, sal_Bool bPrefSupport ) : aName( p, strlen( p ), RTL_TEXTENCODING_MS_1252 )
{
fConst = fC;
@ -2387,8 +2347,6 @@ double ConvertData::ConvertFromBase( double f, sal_Int16 n ) const
return ::rtl::math::pow10Exp( f * fConst, -n );
}
ConvertDataLinear::~ConvertDataLinear()
{
}
@ -2426,8 +2384,6 @@ double ConvertDataLinear::ConvertFromBase( double f, sal_Int16 n ) const
}
ConvertDataList::ConvertDataList( void )
{
#define NEWD(str,unit,cl) maVector.push_back(new ConvertData(str,unit,cl))
@ -2677,8 +2633,6 @@ double ConvertDataList::Convert( double fVal, const OUString& rFrom, const OUStr
ScaDate::ScaDate() :
nOrigDay( 1 ),
nDay( 1 ),
@ -2876,8 +2830,6 @@ sal_Bool ScaDate::operator<( const ScaDate& rCmp ) const
ScaAnyConverter::ScaAnyConverter( const uno::Reference< uno::XComponentContext >& xContext ) :
bHasValidFormat( sal_False )
{
@ -3014,6 +2966,4 @@ sal_Int32 ScaAnyConverter::getInt32(
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -144,10 +144,6 @@ double GetCoupdays( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int
enum FDCategory
{
FDCat_AddIn,
@ -172,8 +168,6 @@ struct FuncDataBase
};
class FuncData
{
private:
@ -206,8 +200,6 @@ public:
};
class FuncDataList
{
OUString aLastName;
@ -225,8 +217,6 @@ public:
const FuncData* Get( const OUString& aProgrammaticName ) const;
};
class AnalysisResId : public ResId
{
public:
@ -234,8 +224,6 @@ class AnalysisResId : public ResId
};
class AnalysisRscStrLoader : public Resource
{
private:
@ -254,8 +242,6 @@ public:
/// sorted list with unique sal_Int32 values
class SortedIndividualInt32List
{
@ -300,8 +286,6 @@ public:
};
class ScaDoubleList
{
private:
@ -359,8 +343,6 @@ public:
};
/// stores double values >0.0, throws exception for double values <0.0, does nothing for 0.0
class ScaDoubleListGT0 : public ScaDoubleList
{
@ -370,8 +352,6 @@ public:
};
/// stores double values >=0.0, throws exception for double values <0.0
class ScaDoubleListGE0 : public ScaDoubleList
{
@ -381,8 +361,6 @@ public:
};
class Complex
{
double r;
@ -430,8 +408,6 @@ public:
};
enum ComplListAppendHandl
{
AH_EmptyAsErr,
@ -460,8 +436,6 @@ public:
};
enum ConvertDataClass
{
CDC_Mass, CDC_Length, CDC_Time, CDC_Pressure, CDC_Force, CDC_Energy, CDC_Power, CDC_Magnetism,
@ -475,8 +449,6 @@ enum ConvertDataClass
class ConvertDataList;
class ConvertData
{
protected:
@ -513,8 +485,6 @@ public:
};
class ConvertDataLinear : public ConvertData
{
protected:
@ -538,8 +508,6 @@ public:
};
class ConvertDataList
{
private:
@ -552,8 +520,6 @@ public:
};
inline sal_Bool IsLeapYear( sal_uInt16 n )
{
return ( (( ( n % 4 ) == 0 ) && ( ( n % 100 ) != 0)) || ( ( n % 400 ) == 0 ) );
@ -706,8 +672,6 @@ inline void Complex::Add( const Complex& rAdd )
}
inline const Complex* ComplexList::Get( sal_uInt32 n ) const
{
return maVector[n];
@ -720,15 +684,11 @@ inline void ComplexList::Append( Complex* p )
}
inline ConvertDataClass ConvertData::Class( void ) const
{
return eClass;
}
inline sal_Bool ConvertData::IsPrefixSupport( void ) const
{
return bPrefixSupport;
@ -744,8 +704,6 @@ inline ConvertDataLinear::ConvertDataLinear( const sal_Char* p, double fC, doubl
/// Helper class for date calculation for various financial functions
class ScaDate
{
@ -836,8 +794,6 @@ inline void ScaDate::addYears( sal_Int32 nYearCount ) throw( css::lang::IllegalA
}
/// Helper class for Any->double conversion, using current language settings
class ScaAnyConverter
{
@ -925,8 +881,6 @@ public:
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -28,8 +28,6 @@ using ::com::sun::star::sheet::NoConvergenceException;
namespace sca {
namespace analysis {
const double f_PI = 3.1415926535897932385;
const double f_PI_DIV_2 = f_PI / 2.0;
const double f_PI_DIV_4 = f_PI / 4.0;
@ -57,8 +55,6 @@ const double f_2_DIV_PI = 2.0 / f_PI;
alpha_k=1 for k=N and alpha_k=0 otherwise
*/
double BesselJ( double x, sal_Int32 N ) throw (IllegalArgumentException, NoConvergenceException)
{
@ -171,8 +167,6 @@ double BesselJ( double x, sal_Int32 N ) throw (IllegalArgumentException, NoConve
No asymptotic approximation used, see issue 43040.
*/
double BesselI( double x, sal_Int32 n ) throw( IllegalArgumentException, NoConvergenceException )
{
const sal_Int32 nMaxIteration = 2000;
@ -229,8 +223,6 @@ double BesselI( double x, sal_Int32 n ) throw( IllegalArgumentException, NoConve
}
double Besselk0( double fNum ) throw( IllegalArgumentException, NoConvergenceException )
{
double fRet;
@ -464,8 +456,6 @@ double BesselY( double fNum, sal_Int32 nOrder ) throw( IllegalArgumentException,
}
}
} // namespace analysis
} // namespace sca

View File

@ -43,8 +43,6 @@ double BesselY( double x, sal_Int32 n ) throw( ::com::sun::star::lang::IllegalAr
/** Returns the result for the modified BESSEL function of second kind (K), n-th order, at point x. */
double BesselK( double x, sal_Int32 n ) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sheet::NoConvergenceException );
} // namespace analysis
} // namespace sca

View File

@ -457,8 +457,6 @@ double SAL_CALL AnalysisAddIn::getOddlyield( const css::uno::Reference< css::bea
RETURN_FINITE( fRet );
}
// XIRR helper functions
#define V_(i) (rValues.Get(i))
@ -518,8 +516,6 @@ static double lcl_sca_XirrResult_Deriv1( const ScaDoubleList& rValues, const Sca
#undef V_
#undef D_
// XIRR calculation
double SAL_CALL AnalysisAddIn::getXirr(
@ -562,8 +558,6 @@ double SAL_CALL AnalysisAddIn::getXirr(
}
double SAL_CALL AnalysisAddIn::getXnpv(
double fRate, const css::uno::Sequence< css::uno::Sequence< double > >& rValues, const css::uno::Sequence< css::uno::Sequence< sal_Int32 > >& rDates ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException, std::exception )
{

View File

@ -17,12 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
// date functions add in
#ifndef _SCA_DATEFUNC_HXX
#define _SCA_DATEFUNC_HXX
@ -38,8 +34,6 @@
#include <tools/rc.hxx>
#include <tools/resary.hxx>
class ScaList
{
private:
@ -83,8 +77,6 @@ inline void ScaList::Append( void* pNew )
}
class ScaStringList : protected ScaList
{
public:
@ -130,8 +122,6 @@ inline void ScaStringList::Append( const OUString& rNew )
}
class ScaResId : public ResId
{
public:
@ -139,8 +129,6 @@ public:
};
class ScaResStringLoader : public Resource
{
private:
@ -162,8 +150,6 @@ inline ScaResStringLoader::ScaResStringLoader( sal_uInt16 nResId, sal_uInt16 nSt
}
class ScaResStringArrLoader : public Resource
{
private:
@ -175,8 +161,6 @@ public:
inline const ResStringArray& GetStringArray() const { return aStrArray; }
};
inline ScaResStringArrLoader::ScaResStringArrLoader( sal_uInt16 nResId, sal_uInt16 nArrayId, ResMgr& rResMgr ) :
Resource( ScaResId( nResId, rResMgr ) ),
aStrArray( ScaResId( nArrayId, rResMgr ) )
@ -185,8 +169,6 @@ inline ScaResStringArrLoader::ScaResStringArrLoader( sal_uInt16 nResId, sal_uInt
}
class ScaResPublisher : public Resource
{
public:
@ -199,8 +181,6 @@ public:
};
class ScaFuncRes : public Resource
{
public:
@ -208,8 +188,6 @@ public:
};
enum ScaCategory
{
ScaCat_AddIn,
@ -264,8 +242,6 @@ public:
};
class ScaFuncDataList : private ScaList
{
OUString aLastName;
@ -304,8 +280,6 @@ inline ScaFuncData* ScaFuncDataList::Next()
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DateFunctionAddIn_CreateInstance(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
@ -413,8 +387,6 @@ public:
throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException, std::exception ) SAL_OVERRIDE;
};
#endif // _SCA_DATEFUNC_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -100,8 +100,6 @@ inline double pnorm(double x) {
return 0.5 * ::rtl::math::erfc(-x * 0.7071067811865475);
}
// binary option cash (domestic)
// call - pays 1 if S_T is above strike K
// put - pays 1 if S_T is below strike K
@ -192,8 +190,6 @@ double bincash(double S, double vol, double rd, double rf,
return exp(-rd*tau)*val;
}
// binary option asset (foreign)
// call - pays S_T if S_T is above strike K
// put - pays S_T if S_T is below strike K
@ -354,8 +350,6 @@ double binary(double S, double vol, double rd, double rf,
return val;
}
// vanilla put/call option
// call pays (S_T-K)^+
// put pays (K-S_T)^+
@ -539,8 +533,6 @@ double vanilla_trunc(double S, double vol, double rd, double rf,
} // namespace internal
// path dependent options
@ -831,8 +823,6 @@ double barrier(double S, double vol, double rd, double rf,
} // namespace internal
// touch/no-touch options (cash/asset or nothing payoff profile)
double touch(double S, double vol, double rd, double rf,
double tau, double B1, double B2, types::ForDom fd,
@ -885,8 +875,6 @@ double barrier(double S, double vol, double rd, double rf,
return val;
}
// probability of hitting a barrier
// this is almost the same as the price of a touch option (domestic)
// as it pays one if a barrier is hit; we only have to offset the
@ -949,8 +937,6 @@ double prob_in_money(double S, double vol, double mu,
return val;
}
} // namespace bs
} // namespace pricing

View File

@ -78,8 +78,6 @@ double binasset(double S, double vol, double rd, double rf,
double tau, double K,
types::PutCall pc, types::Greeks greeks);
// vanilla put/call option
// call pays (S_T-K)^+
// put pays (K-S_T)^+
@ -109,8 +107,6 @@ double putcalltrunc(double S, double vol, double rd, double rf,
double tau, double K, double B1, double B2,
types::PutCall pc, types::Greeks greek);
// barrier
// touch/no-touch options (cash/asset or nothing payoff profile)
double touch(double S, double vol, double rd, double rf,

View File

@ -160,8 +160,6 @@ const ScaFuncData* ScaFuncDataList::Get( const OUString& rProgrammaticName ) con
return NULL;
}
ScaFuncRes::ScaFuncRes( ResId& rResId, ResMgr& rResMgr, sal_uInt16 nIndex, OUString& rRet ) :
Resource( rResId )
{

View File

@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
// option pricing functions add in
// most parts of this files are technical UNO details which are
@ -26,8 +24,6 @@
// to avoid having to rename all classes to do with UNO
// technicalities we use our own namespace
#ifndef _SCA_PRICING_HXX
#define _SCA_PRICING_HXX
@ -47,8 +43,6 @@
namespace sca {
namespace pricing {
@ -95,8 +89,6 @@ inline void ScaList::Append( void* pNew )
}
class ScaStringList : protected ScaList
{
public:
@ -142,8 +134,6 @@ inline void ScaStringList::Append( const OUString& rNew )
}
class ScaResId : public ResId
{
public:
@ -151,8 +141,6 @@ public:
};
class ScaResStringLoader : public Resource
{
private:
@ -174,8 +162,6 @@ inline ScaResStringLoader::ScaResStringLoader( sal_uInt16 nResId, sal_uInt16 nSt
}
class ScaResStringArrLoader : public Resource
{
private:
@ -187,8 +173,6 @@ public:
inline const ResStringArray& GetStringArray() const { return aStrArray; }
};
inline ScaResStringArrLoader::ScaResStringArrLoader( sal_uInt16 nResId, sal_uInt16 nArrayId, ResMgr& rResMgr ) :
Resource( ScaResId( nResId, rResMgr ) ),
aStrArray( ScaResId( nArrayId, rResMgr ) )
@ -197,8 +181,6 @@ inline ScaResStringArrLoader::ScaResStringArrLoader( sal_uInt16 nResId, sal_uInt
}
class ScaResPublisher : public Resource
{
public:
@ -211,8 +193,6 @@ public:
};
class ScaFuncRes : public Resource
{
public:
@ -220,8 +200,6 @@ public:
};
enum ScaCategory
{
ScaCat_AddIn,
@ -276,8 +254,6 @@ public:
};
class ScaFuncDataList : private ScaList
{
OUString aLastName;
@ -320,8 +296,6 @@ inline ScaFuncData* ScaFuncDataList::Next()
css::uno::Reference< css::uno::XInterface > SAL_CALL PricingFunctionAddIn_CreateInstance(
const css::uno::Reference< css::lang::XMultiServiceFactory >& );