diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-19 17:52:10 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-19 18:03:15 +0100 |
commit | 8870dec9a431eeff5045efd4ba12a2a70bad5e24 (patch) | |
tree | 513815d05326b7f24f67f61dc2757becffca098d /scaddins | |
parent | 7b79e23260db34f2bb0a2994a5e64dd39117228c (diff) |
New loplugin:dynexcspec: Add @throws documentation, scaddins
Change-Id: I8b78ab7ac34cace1a6aad8807f4964e4414c9ac3
Diffstat (limited to 'scaddins')
-rw-r--r-- | scaddins/source/analysis/analysis.hxx | 7 | ||||
-rw-r--r-- | scaddins/source/analysis/analysishelper.cxx | 2 | ||||
-rw-r--r-- | scaddins/source/analysis/analysishelper.hxx | 142 | ||||
-rw-r--r-- | scaddins/source/analysis/bessel.cxx | 10 | ||||
-rw-r--r-- | scaddins/source/analysis/bessel.hxx | 24 | ||||
-rw-r--r-- | scaddins/source/datefunc/datefunc.cxx | 3 | ||||
-rw-r--r-- | scaddins/source/datefunc/datefunc.hxx | 2 | ||||
-rw-r--r-- | scaddins/source/pricing/pricing.hxx | 2 |
8 files changed, 180 insertions, 12 deletions
diff --git a/scaddins/source/analysis/analysis.hxx b/scaddins/source/analysis/analysis.hxx index 0e6ec65c9fa0..00a86ca47ece 100644 --- a/scaddins/source/analysis/analysis.hxx +++ b/scaddins/source/analysis/analysis.hxx @@ -61,13 +61,18 @@ private: sca::analysis::ScaAnyConverter aAnyConv; + /// @throws css::uno::RuntimeException ResMgr& GetResMgr() throw( css::uno::RuntimeException, std::exception ); + /// @throws css::uno::RuntimeException OUString GetFuncDescrStr( sal_uInt16 nResId, sal_uInt16 nStrIndex ) throw( css::uno::RuntimeException, std::exception ); void InitDefLocales(); inline const css::lang::Locale& GetLocale( sal_uInt32 nInd ); void InitData(); /// Converts an Any to sal_Int32 in the range from 0 to 4 (date calculation mode). + /// + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException sal_Int32 getDateMode( const css::uno::Reference< css::beans::XPropertySet >& xPropSet, const css::uno::Any& rAny ) @@ -78,6 +83,8 @@ public: const css::uno::Reference< css::uno::XComponentContext >& xContext ); virtual ~AnalysisAddIn() override; + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException double FactDouble( sal_Int32 nNum ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); static OUString getImplementationName_Static(); diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx index c7b484315992..5548c31a9f8a 100644 --- a/scaddins/source/analysis/analysishelper.cxx +++ b/scaddins/source/analysis/analysishelper.cxx @@ -1268,6 +1268,7 @@ double GetZw( double fZins, double fZzr, double fRmz, double fBw, sal_Int32 nF ) // financial functions COUP*** // COUPPCD: find last coupon date before settlement (can be equal to settlement) +/// @throws css::lang::IllegalArgumentException static void lcl_GetCouppcd( ScaDate& rDate, const ScaDate& rSettle, const ScaDate& rMat, sal_Int32 nFreq ) throw( lang::IllegalArgumentException ) { @@ -1291,6 +1292,7 @@ double GetCouppcd( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_I } // COUPNCD: find first coupon date after settlement (is never equal to settlement) +/// @throws css::lang::IllegalArgumentException static void lcl_GetCoupncd( ScaDate& rDate, const ScaDate& rSettle, const ScaDate& rMat, sal_Int32 nFreq ) throw( lang::IllegalArgumentException ) { diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx index 2cd8159ce3bb..40565ea50ad7 100644 --- a/scaddins/source/analysis/analysishelper.hxx +++ b/scaddins/source/analysis/analysishelper.hxx @@ -71,7 +71,9 @@ inline bool IsLeapYear( sal_uInt16 nYear ); sal_uInt16 DaysInMonth( sal_uInt16 nMonth, sal_uInt16 nYear ); sal_Int32 DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear ); +/// @throws css::lang::IllegalArgumentException void DaysToDate( sal_Int32 nDays, sal_uInt16& rDay, sal_uInt16& rMonth, sal_uInt16& rYear ) throw( css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException sal_Int32 GetNullDate( const css::uno::Reference< css::beans::XPropertySet >& xOptions ) throw( css::uno::RuntimeException ); sal_Int32 GetDiffDate360( sal_uInt16 nDay1, sal_uInt16 nMonth1, sal_uInt16 nYear1, bool bLeapYear1, @@ -82,19 +84,33 @@ sal_Int32 GetDiffDate360( sal_Int32 nNullDate, sal_Int32 nDate1, sal_I sal_Int32 GetDaysInYears( sal_uInt16 nYear1, sal_uInt16 nYear2 ); inline sal_Int16 GetDayOfWeek( sal_Int32 nDate ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException sal_Int32 GetDiffDate( sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode, sal_Int32* pOptDaysIn1stYear ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetYearDiff( sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException sal_Int32 GetDaysInYear( sal_Int32 nNullDate, sal_Int32 nDate, sal_Int32 nMode ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetYearFrac( sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException inline double GetYearFrac( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nStartDate, sal_Int32 nEndDate, sal_Int32 nMode ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); double BinomialCoefficient( double n, double k ); double GetGcd( double f1, double f2 ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double ConvertToDec( const OUString& rFromNum, sal_uInt16 nBaseFrom, sal_uInt16 nCharLim ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException OUString ConvertFromDec( double fNum, double fMin, double fMax, sal_uInt16 nBase, sal_Int32 nPlaces, sal_Int32 nMaxPlaces, bool bUsePlaces ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); @@ -103,42 +119,74 @@ double Erfc( double fX ); bool ParseDouble( const sal_Unicode*& rpDoubleAsString, double& rReturn ); OUString GetString( double fNumber, bool bLeadingSign, sal_uInt16 nMaxNumOfDigits = 15 ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetAmordegrc( sal_Int32 nNullDate, double fCost, sal_Int32 nDate, sal_Int32 nFirstPer, double fRestVal, double fPer, double fRate, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetAmorlinc( sal_Int32 nNullDate, double fCost, sal_Int32 nDate, sal_Int32 nFirstPer, double fRestVal, double fPer, double fRate, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetDuration( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, double fCoup, double fYield, sal_Int32 nFreq, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetYieldmat( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, double fRate, double fPrice, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetOddfprice( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, sal_Int32 nFirstCoup, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double getYield_( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, double fCoup, double fPrice, double fRedemp, sal_Int32 nFreq, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double getPrice_( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetOddfyield( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, sal_Int32 nFirstCoup, double fRate, double fPrice, double fRedemp, sal_Int32 nFreq, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetOddlprice( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastInterest, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetOddlyield( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastInterest, double fRate, double fPrice, double fRedemp, sal_Int32 nFreq, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); double GetRmz( double fZins, double fZzr, double fBw, double fZw, sal_Int32 nF ); double GetZw( double fZins, double fZzr, double fRmz, double fBw, sal_Int32 nF ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetCouppcd( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetCoupncd( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetCoupdaybs( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetCoupdaysnc( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetCoupnum( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); +/// @throws css::uno::RuntimeException +/// @throws css::lang::IllegalArgumentException double GetCoupdays( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, sal_Int32 nBase ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); @@ -245,11 +293,16 @@ private: void Insert( sal_Int32 nDay ); void Insert( sal_Int32 nDay, sal_Int32 nNullDate, bool bInsertOnWeekend ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Insert( double fDay, sal_Int32 nNullDate, bool bInsertOnWeekend ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); /** @param rAnyConv must be an initialized ScaAnyConmverter - @param bInsertOnWeekend insertion mode: false = holidays on weekend are omitted */ + @param bInsertOnWeekend insertion mode: false = holidays on weekend are omitted + @throws css::uno::RuntimeException + @throws css::lang::IllegalArgumentException + */ void InsertHolidayList( const ScaAnyConverter& rAnyConv, const css::uno::Any& rHolAny, @@ -271,7 +324,10 @@ public: bool Find( sal_Int32 nVal ) const; /** @param rAnyConv is an initialized or uninitialized ScaAnyConverter - holidays on weekend are omitted */ + holidays on weekend are omitted + @throws css::uno::RuntimeException + @throws css::lang::IllegalArgumentException + */ void InsertHolidayList( ScaAnyConverter& rAnyConv, const css::uno::Reference< css::beans::XPropertySet >& xOptions, @@ -287,25 +343,36 @@ private: protected: inline void ListAppend( double fValue ) { maVector.push_back(fValue); } + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException inline void Append( double fValue ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ) { if( CheckInsert( fValue ) ) ListAppend( fValue ); } /** @param rAnyConv must be an initialized ScaAnyConmverter - @param bIgnoreEmpty handling of empty Any's/strings: false = inserted as 0.0; true = omitted */ + @param bIgnoreEmpty handling of empty Any's/strings: false = inserted as 0.0; true = omitted + @throws css::uno::RuntimeException + @throws css::lang::IllegalArgumentException + */ void Append( const ScaAnyConverter& rAnyConv, const css::uno::Any& rAny, bool bIgnoreEmpty ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); /** @param rAnyConv must be an initialized ScaAnyConmverter - @param bIgnoreEmpty handling of empty Any's/strings: false = inserted as 0.0; true = omitted */ + @param bIgnoreEmpty handling of empty Any's/strings: false = inserted as 0.0; true = omitted + @throws css::uno::RuntimeException + @throws css::lang::IllegalArgumentException + */ void Append( const ScaAnyConverter& rAnyConv, const css::uno::Sequence< css::uno::Any >& rAnySeq, bool bIgnoreEmpty ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); /** @param rAnyConv must be an initialized ScaAnyConmverter - @param bIgnoreEmpty handling of empty Any's/strings: false = inserted as 0.0; true = omitted */ + @param bIgnoreEmpty handling of empty Any's/strings: false = inserted as 0.0; true = omitted + @throws css::uno::RuntimeException + @throws css::lang::IllegalArgumentException + */ void Append( const ScaAnyConverter& rAnyConv, const css::uno::Sequence< css::uno::Sequence< css::uno::Any > >& rAnySeq, @@ -319,18 +386,27 @@ public: inline double Get( sal_uInt32 n ) const { return maVector[n]; } + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Append( const css::uno::Sequence< css::uno::Sequence< double > >& rValueArr ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Append( const css::uno::Sequence< css::uno::Sequence< sal_Int32 > >& rValueArr ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); /** @param rAnyConv is an initialized or uninitialized ScaAnyConverter - @param bIgnoreEmpty handling of empty Any's/strings: false = inserted as 0.0; true = omitted */ + @param bIgnoreEmpty handling of empty Any's/strings: false = inserted as 0.0; true = omitted + @throws css::uno::RuntimeException + @throws css::lang::IllegalArgumentException + */ void Append( ScaAnyConverter& rAnyConv, const css::uno::Reference< css::beans::XPropertySet >& xOpt, const css::uno::Sequence< css::uno::Any >& rAnySeq ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException virtual bool CheckInsert( double fValue ) const throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); }; @@ -362,40 +438,76 @@ class Complex public: inline Complex( double fReal, double fImag = 0.0, sal_Unicode cC = '\0' ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException explicit Complex( const OUString& rComplexAsString ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); inline static bool IsImagUnit( sal_Unicode c ); static bool ParseString( const OUString& rComplexAsString, Complex& rReturn ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException OUString GetString() const throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); inline double Real() const; inline double Imag() const; + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException double Arg() const throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); inline double Abs() const; // following functions change the complex number itself to avoid unnecessary copy actions! + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Power( double fPower ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); void Sqrt(); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Sin() throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Cos() throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Div( const Complex& rDivisor ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); void Exp(); inline void Conjugate(); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Ln() throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Log10() throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Log2() throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); inline void Mult( double fFact ); inline void Mult( const Complex& rMult ); inline void Sub( const Complex& rMult ); inline void Add( const Complex& rAdd ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Tan() throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Sec() throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Csc() throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Cot() throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Sinh() throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Cosh() throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Sech() throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Csch() throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); }; @@ -424,7 +536,11 @@ public: { return maVector.size(); } inline void Append( Complex* pNew ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Append( const css::uno::Sequence< css::uno::Sequence< OUString > >& rComplexNumList, ComplListAppendHandl eAH ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException void Append( const css::uno::Sequence< css::uno::Any >& aMultPars,ComplListAppendHandl eAH ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); }; @@ -464,6 +580,8 @@ public: // rest = matches without an assumed prefix of one character // rest gives power for 10 represented by the prefix (e.g. 3 for k or -9 for n + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException virtual double Convert( double fVal, const ConvertData& rTo, sal_Int16 nMatchLevelFrom, sal_Int16 nMatchLevelTo ) const throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); // converts fVal from this unit to rFrom unit @@ -506,6 +624,8 @@ public: ConvertDataList(); ~ConvertDataList(); + /// @throws css::uno::RuntimeException + /// @throws css::lang::IllegalArgumentException double Convert( double fVal, const OUString& rFrom, const OUString& rTo ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); }; @@ -693,6 +813,8 @@ private: sal_Int32 getDaysInYearRange( sal_uInt16 nFrom, sal_uInt16 nTo ) const; /// Adds/subtracts the given count of years, does not adjust day. + /// + /// @throws css::lang::IllegalArgumentException void doAddYears( sal_Int32 nYearCount ) throw( css::lang::IllegalArgumentException ); public: @@ -715,16 +837,22 @@ public: inline sal_uInt16 getYear() const { return nYear; }; /// adds/subtracts the given count of months, adjusts day + /// + /// @throws css::lang::IllegalArgumentException void addMonths( sal_Int32 nMonthCount ) throw( css::lang::IllegalArgumentException ); /// sets the given year, adjusts day inline void setYear( sal_uInt16 nNewYear ); /// adds/subtracts the given count of years, adjusts day + /// + /// @throws css::lang::IllegalArgumentException inline void addYears( sal_Int32 nYearCount ) throw( css::lang::IllegalArgumentException ); /// @return the internal number of the current date sal_Int32 getDate( sal_Int32 nNullDate ) const; /// @return the number of days between the two dates + /// + /// @throws css::lang::IllegalArgumentException static sal_Int32 getDiff( const ScaDate& rFrom, const ScaDate& rTo ) throw( css::lang::IllegalArgumentException ); bool operator<( const ScaDate& rCmp ) const; @@ -779,6 +907,8 @@ public: ~ScaAnyConverter(); /// Initializing with current language settings + /// + /// @throws css::uno::RuntimeException void init( const css::uno::Reference< css::beans::XPropertySet >& xPropSet ) throw( css::uno::RuntimeException ); diff --git a/scaddins/source/analysis/bessel.cxx b/scaddins/source/analysis/bessel.cxx index fb19b1576ca3..b93018cfc1d2 100644 --- a/scaddins/source/analysis/bessel.cxx +++ b/scaddins/source/analysis/bessel.cxx @@ -222,7 +222,8 @@ double BesselI( double x, sal_Int32 n ) throw( IllegalArgumentException, NoConve return fResult; } - +/// @throws IllegalArgumentException +/// @throws NoConvergenceException double Besselk0( double fNum ) throw( IllegalArgumentException, NoConvergenceException ) { double fRet; @@ -248,7 +249,8 @@ double Besselk0( double fNum ) throw( IllegalArgumentException, NoConvergenceExc return fRet; } - +/// @throws IllegalArgumentException +/// @throws NoConvergenceException double Besselk1( double fNum ) throw( IllegalArgumentException, NoConvergenceException ) { double fRet; @@ -319,6 +321,8 @@ double BesselK( double fNum, sal_Int32 nOrder ) throw( IllegalArgumentException, http://www.openoffice.org/nonav/issues/showattachment.cgi/63609/Comments%20to%20the%20implementation%20of%20the%20Bessel%20functions.odt */ +/// @throws IllegalArgumentException +/// @throws NoConvergenceException double Bessely0( double fX ) throw( IllegalArgumentException, NoConvergenceException ) { if (fX <= 0) @@ -371,6 +375,8 @@ double Bessely0( double fX ) throw( IllegalArgumentException, NoConvergenceExcep // See #i31656# for a commented version of this implementation, attachment #desc6 // http://www.openoffice.org/nonav/issues/showattachment.cgi/63609/Comments%20to%20the%20implementation%20of%20the%20Bessel%20functions.odt +/// @throws IllegalArgumentException +/// @throws NoConvergenceException double Bessely1( double fX ) throw( IllegalArgumentException, NoConvergenceException ) { if (fX <= 0) diff --git a/scaddins/source/analysis/bessel.hxx b/scaddins/source/analysis/bessel.hxx index 5f7c8e3d519a..ae49c99059c1 100644 --- a/scaddins/source/analysis/bessel.hxx +++ b/scaddins/source/analysis/bessel.hxx @@ -31,16 +31,32 @@ namespace analysis { // BESSEL functions -/** Returns the result for the unmodified BESSEL function of first kind (J), n-th order, at point x. */ +/** Returns the result for the unmodified BESSEL function of first kind (J), n-th order, at point x. + + @throws css::lang::IllegalArgumentException + @throws css::sheet::NoConvergenceException +*/ double BesselJ( double x, sal_Int32 n ) throw( css::lang::IllegalArgumentException, css::sheet::NoConvergenceException ); -/** Returns the result for the modified BESSEL function of first kind (I), n-th order, at point x. */ +/** Returns the result for the modified BESSEL function of first kind (I), n-th order, at point x. + + @throws css::lang::IllegalArgumentException + @throws css::sheet::NoConvergenceException +*/ double BesselI( double x, sal_Int32 n ) throw( css::lang::IllegalArgumentException, css::sheet::NoConvergenceException ); -/** Returns the result for the unmodified BESSEL function of second kind (Y), n-th order, at point x. */ +/** Returns the result for the unmodified BESSEL function of second kind (Y), n-th order, at point x. + + @throws css::lang::IllegalArgumentException + @throws css::sheet::NoConvergenceException +*/ double BesselY( double x, sal_Int32 n ) throw( css::lang::IllegalArgumentException, css::sheet::NoConvergenceException ); -/** Returns the result for the modified BESSEL function of second kind (K), n-th order, at point x. */ +/** Returns the result for the modified BESSEL function of second kind (K), n-th order, at point x. + + @throws css::lang::IllegalArgumentException + @throws css::sheet::NoConvergenceException +*/ double BesselK( double x, sal_Int32 n ) throw( css::lang::IllegalArgumentException, css::sheet::NoConvergenceException ); } // namespace analysis diff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx index 4baa51962cec..1c8f481b4813 100644 --- a/scaddins/source/datefunc/datefunc.cxx +++ b/scaddins/source/datefunc/datefunc.cxx @@ -449,6 +449,8 @@ sal_Int32 DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear ) * is the number of days between 01/01/0001 and the date * this function converts this internal Date value * to a Day , Month, Year representation of a Date. + * + * @throws lang::IllegalArgumentException */ void DaysToDate( sal_Int32 nDays, @@ -504,6 +506,7 @@ void DaysToDate( sal_Int32 nDays, * is the number of days between 01/01/0001 and the date * this function returns this internal Date value for the document null date * + * @throws uno::RuntimeException */ sal_Int32 GetNullDate( const uno::Reference< beans::XPropertySet >& xOptions ) throw( uno::RuntimeException ) diff --git a/scaddins/source/datefunc/datefunc.hxx b/scaddins/source/datefunc/datefunc.hxx index a2c89fa2486b..f86920a37648 100644 --- a/scaddins/source/datefunc/datefunc.hxx +++ b/scaddins/source/datefunc/datefunc.hxx @@ -190,9 +190,11 @@ private: void InitDefLocales(); const css::lang::Locale& GetLocale( sal_uInt32 nIndex ); + /// @throws css::uno::RuntimeException ResMgr& GetResMgr() throw( css::uno::RuntimeException, std::exception ); void InitData(); + /// @throws css::uno::RuntimeException OUString GetFuncDescrStr( sal_uInt16 nResId, sal_uInt16 nStrIndex ) throw( css::uno::RuntimeException, std::exception ); public: diff --git a/scaddins/source/pricing/pricing.hxx b/scaddins/source/pricing/pricing.hxx index dc6a053c5cf6..f73d3aded419 100644 --- a/scaddins/source/pricing/pricing.hxx +++ b/scaddins/source/pricing/pricing.hxx @@ -202,9 +202,11 @@ private: void InitDefLocales(); const css::lang::Locale& GetLocale( sal_uInt32 nIndex ); + /// @throws css::uno::RuntimeException ResMgr& GetResMgr() throw( css::uno::RuntimeException, std::exception ); void InitData(); + /// @throws css::uno::RuntimeException OUString GetFuncDescrStr( sal_uInt16 nResId, sal_uInt16 nStrIndex ) throw( css::uno::RuntimeException, std::exception ); public: |