diff options
author | Andras Timar <atimar@suse.com> | 2012-10-13 17:41:05 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-10-13 17:41:05 +0200 |
commit | e5ce011c3f32f53ef073aec5485450b2588b656a (patch) | |
tree | 8a838a53bcdd70cc3d4cdbca0ebe07504790952e /scaddins | |
parent | c6b26144c93aa5222e4260c5b0ef45ce5bdc18d2 (diff) | |
parent | e74fc93e4aba7887e6a278cc44c4bc0962471065 (diff) |
Merge branch 'master' into feature/killsdf
Conflicts:
Makefile.top
Module_tail_build.mk
RepositoryExternal.mk
RepositoryFixes.mk
accessibility/source/standard/vclxaccessibletoolbox.cxx
basic/source/uno/dlgcont.cxx
connectivity/Library_ado.mk
cross_tail_build/prj/build.lst
desktop/source/offacc/acceptor.cxx
filter/Library_PptImporter.mk
filter/source/t602/filterenv.cxx
i18npool/Library_textconv_dict.mk
ooo.lst.in
saxon/ExternalProject_saxon.mk
saxon/build.xml
sc/sdi/scalc.sdi
sc/source/filter/xml/xmlstyli.cxx
sc/source/ui/condformat/condformatdlg.cxx
sc/source/ui/condformat/condformatmgr.cxx
sc/source/ui/view/cellsh1.cxx
sdext/source/pdfimport/misc/pwdinteract.cxx
shell/qa/zip/makefile.mk
shell/qa/zip/testimpl/makefile.mk
solenv/gbuild/CppunitTest.mk
solenv/gbuild/gbuild.mk
solenv/gbuild/platform/android.mk
solenv/gbuild/platform/com_GCC_defs.mk
solenv/gbuild/platform/macosx.mk
soltools/Executable_adjustvisibility.mk
soltools/Executable_checkdll.mk
soltools/Executable_cpp.mk
soltools/Executable_javadep.mk
soltools/Executable_makedepend.mk
sw/qa/extras/rtfimport/rtfimport.cxx
tail_build/prj/build.lst
tomcat/ExternalProject_tomcat.mk
ucb/source/ucp/webdav/webdavcontent.cxx
xml2cmp/Executable_xml2cmp.mk
Diffstat (limited to 'scaddins')
-rw-r--r-- | scaddins/source/analysis/analysishelper.cxx | 6 | ||||
-rw-r--r-- | scaddins/source/analysis/financial.cxx | 18 |
2 files changed, 12 insertions, 12 deletions
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx index 56064b56f884..b075bafe0148 100644 --- a/scaddins/source/analysis/analysishelper.cxx +++ b/scaddins/source/analysis/analysishelper.cxx @@ -1176,7 +1176,7 @@ double GetZw( double fZins, double fZzr, double fRmz, double fBw, sal_Int32 nF ) //------- // COUPPCD: find last coupon date before settlement (can be equal to settlement) -void lcl_GetCouppcd( ScaDate& rDate, const ScaDate& rSettle, const ScaDate& rMat, sal_Int32 nFreq ) +static void lcl_GetCouppcd( ScaDate& rDate, const ScaDate& rSettle, const ScaDate& rMat, sal_Int32 nFreq ) throw( lang::IllegalArgumentException ) { rDate = rMat; @@ -1201,7 +1201,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) -void lcl_GetCoupncd( ScaDate& rDate, const ScaDate& rSettle, const ScaDate& rMat, sal_Int32 nFreq ) +static void lcl_GetCoupncd( ScaDate& rDate, const ScaDate& rSettle, const ScaDate& rMat, sal_Int32 nFreq ) throw( lang::IllegalArgumentException ) { rDate = rMat; @@ -2535,7 +2535,7 @@ ConvertDataList::ConvertDataList( void ) NEWD( "Humpen", 2.0, CDC_Volume ); // *** NEWD( "ly3", 1.1810108125623799E-51, CDC_Volume ); // *** Cubic light-year NEWD( "MTON", 1.4125866688595436E00, CDC_Volume ); // *** Measurement ton - NEWD( "tspm", 5.0000000000000000E02, CDC_Volume ); // *** Modern teaspoon + NEWD( "tspm", 2.0000000000000000E02, CDC_Volume ); // *** Modern teaspoon NEWD( "uk_gal", 2.1996924829908779E-01, CDC_Volume ); // U.K. / Imperial gallon 1/4.54609 NEWD( "uk_qt", 8.7987699319635115E-01, CDC_Volume ); // U.K. / Imperial quart 1/4 imperial gallon diff --git a/scaddins/source/analysis/financial.cxx b/scaddins/source/analysis/financial.cxx index 18e0f04ca733..eb1cac59a372 100644 --- a/scaddins/source/analysis/financial.cxx +++ b/scaddins/source/analysis/financial.cxx @@ -199,7 +199,7 @@ double SAL_CALL AnalysisAddIn::getPrice( constREFXPS& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, const ANY& rOB ) THROWDEF_RTE_IAE { - if( fYield < 0.0 || fRate < 0.0 || fRedemp <= 0 || CHK_Freq || nSettle >= nMat ) + if( fYield < 0.0 || fRate < 0.0 || fRedemp <= 0.0 || CHK_Freq || nSettle >= nMat ) THROW_IAE; double fRet = getPrice_( GetNullDate( xOpt ), nSettle, nMat, fRate, fYield, fRedemp, nFreq, getDateMode( xOpt, rOB ) ); @@ -210,7 +210,7 @@ double SAL_CALL AnalysisAddIn::getPrice( constREFXPS& xOpt, double SAL_CALL AnalysisAddIn::getPricedisc( constREFXPS& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fDisc, double fRedemp, const ANY& rOB ) THROWDEF_RTE_IAE { - if( fDisc <= 0.0 || fRedemp <= 0 || nSettle >= nMat ) + if( fDisc <= 0.0 || fRedemp <= 0.0 || nSettle >= nMat ) THROW_IAE; double fRet = fRedemp * ( 1.0 - fDisc * GetYearDiff( GetNullDate( xOpt ), nSettle, nMat, getDateMode( xOpt, rOB ) ) ); @@ -336,7 +336,7 @@ double SAL_CALL AnalysisAddIn::getYieldmat( constREFXPS& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, double fRate, double fPrice, const ANY& rOB ) THROWDEF_RTE_IAE { - if( fRate < 0.0 || fRate <= 0.0 || nSettle >= nMat ) + if( fPrice <= 0.0 || fRate <= 0.0 || nSettle >= nMat ) THROW_IAE; double fRet = GetYieldmat( GetNullDate( xOpt ), nSettle, nMat, nIssue, fRate, fPrice, getDateMode( xOpt, rOB ) ); @@ -401,7 +401,7 @@ double SAL_CALL AnalysisAddIn::getOddfprice( constREFXPS& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, sal_Int32 nFirstCoup, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, const ANY& rOB ) THROWDEF_RTE_IAE { - if( fRate < 0 || fYield < 0 || CHK_Freq || nMat <= nFirstCoup || nFirstCoup <= nSettle || nSettle <= nIssue ) + if( fRate < 0.0 || fYield < 0.0 || CHK_Freq || nMat <= nFirstCoup || nFirstCoup <= nSettle || nSettle <= nIssue ) THROW_IAE; double fRet = GetOddfprice( GetNullDate( xOpt ), nSettle, nMat, nIssue, nFirstCoup, fRate, fYield, fRedemp, nFreq, getDateMode( xOpt, rOB ) ); @@ -413,7 +413,7 @@ double SAL_CALL AnalysisAddIn::getOddfyield( constREFXPS& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, sal_Int32 nFirstCoup, double fRate, double fPrice, double fRedemp, sal_Int32 nFreq, const ANY& rOB ) THROWDEF_RTE_IAE { - if( fRate < 0 || fPrice <= 0 || CHK_Freq || nMat <= nFirstCoup || nFirstCoup <= nSettle || nSettle <= nIssue ) + if( fRate < 0.0 || fPrice <= 0.0 || CHK_Freq || nMat <= nFirstCoup || nFirstCoup <= nSettle || nSettle <= nIssue ) THROW_IAE; double fRet = GetOddfyield( GetNullDate( xOpt ), nSettle, nMat, nIssue, nFirstCoup, fRate, fPrice, fRedemp, nFreq, @@ -426,7 +426,7 @@ double SAL_CALL AnalysisAddIn::getOddlprice( constREFXPS& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastInterest, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, const ANY& rOB ) THROWDEF_RTE_IAE { - if( fRate < 0 || fYield < 0 || CHK_Freq || nMat <= nSettle || nSettle <= nLastInterest ) + if( fRate < 0.0 || fYield < 0.0 || CHK_Freq || nMat <= nSettle || nSettle <= nLastInterest ) THROW_IAE; double fRet = GetOddlprice( GetNullDate( xOpt ), nSettle, nMat, nLastInterest, fRate, fYield, fRedemp, nFreq, @@ -439,7 +439,7 @@ double SAL_CALL AnalysisAddIn::getOddlyield( constREFXPS& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastInterest, double fRate, double fPrice, double fRedemp, sal_Int32 nFreq, const ANY& rOB ) THROWDEF_RTE_IAE { - if( fRate < 0 || fPrice <= 0 || CHK_Freq || nMat <= nSettle || nSettle <= nLastInterest ) + if( fRate < 0.0 || fPrice <= 0.0 || CHK_Freq || nMat <= nSettle || nSettle <= nLastInterest ) THROW_IAE; double fRet = GetOddlyield( GetNullDate( xOpt ), nSettle, nMat, nLastInterest, fRate, fPrice, fRedemp, nFreq, @@ -455,7 +455,7 @@ double SAL_CALL AnalysisAddIn::getOddlyield( constREFXPS& xOpt, #define D_(i) (*rDates.Get(i)) /** Calculates the resulting amount for the passed interest rate and the given XIRR parameters. */ -double lcl_sca_XirrResult( const ScaDoubleList& rValues, const ScaDoubleList& rDates, double fRate ) +static double lcl_sca_XirrResult( const ScaDoubleList& rValues, const ScaDoubleList& rDates, double fRate ) { /* V_0 ... V_n = input values. D_0 ... D_n = input dates. @@ -477,7 +477,7 @@ double lcl_sca_XirrResult( const ScaDoubleList& rValues, const ScaDoubleList& rD } /** Calculates the first derivation of lcl_sca_XirrResult(). */ -double lcl_sca_XirrResult_Deriv1( const ScaDoubleList& rValues, const ScaDoubleList& rDates, double fRate ) +static double lcl_sca_XirrResult_Deriv1( const ScaDoubleList& rValues, const ScaDoubleList& rDates, double fRate ) { /* V_0 ... V_n = input values. D_0 ... D_n = input dates. |