From f170367642cf9114c918f965ea966fbb53e12c61 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sun, 6 Apr 2014 17:19:16 +0200 Subject: whitespace cleanup in scaddins Change-Id: I05d0ee9db5a243631a8568dfc967328520e0799a --- scaddins/source/analysis/analysis.hxx | 2 -- scaddins/source/analysis/analysishelper.cxx | 50 ----------------------------- scaddins/source/analysis/analysishelper.hxx | 46 -------------------------- scaddins/source/analysis/bessel.cxx | 10 ------ scaddins/source/analysis/bessel.hxx | 2 -- scaddins/source/analysis/financial.cxx | 6 ---- 6 files changed, 116 deletions(-) (limited to 'scaddins/source/analysis') diff --git a/scaddins/source/analysis/analysis.hxx b/scaddins/source/analysis/analysis.hxx index 61979cb7f9de..017bae1d962c 100644 --- a/scaddins/source/analysis/analysis.hxx +++ b/scaddins/source/analysis/analysis.hxx @@ -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: */ diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx index 575186927469..9a1b6e017fee 100644 --- a/scaddins/source/analysis/analysishelper.cxx +++ b/scaddins/source/analysis/analysishelper.cxx @@ -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: */ diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx index 47a46ac14d1d..89a8a74eb218 100644 --- a/scaddins/source/analysis/analysishelper.hxx +++ b/scaddins/source/analysis/analysishelper.hxx @@ -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: */ diff --git a/scaddins/source/analysis/bessel.cxx b/scaddins/source/analysis/bessel.cxx index 3e1ac2747220..5a4581b2ac15 100644 --- a/scaddins/source/analysis/bessel.cxx +++ b/scaddins/source/analysis/bessel.cxx @@ -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 diff --git a/scaddins/source/analysis/bessel.hxx b/scaddins/source/analysis/bessel.hxx index d4a04925c78f..cd14ed611831 100644 --- a/scaddins/source/analysis/bessel.hxx +++ b/scaddins/source/analysis/bessel.hxx @@ -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 diff --git a/scaddins/source/analysis/financial.cxx b/scaddins/source/analysis/financial.cxx index 4974fcaa1e6e..09b457c54b80 100644 --- a/scaddins/source/analysis/financial.cxx +++ b/scaddins/source/analysis/financial.cxx @@ -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 ) { -- cgit