[Libreoffice-commits] core.git: scaddins/source

Winfried Donkers winfrieddonkers at libreoffice.org
Tue Jul 12 12:18:20 UTC 2016


 scaddins/source/analysis/financial.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0759f31172253d6c5be3b938446ff1b8313adebd
Author: Winfried Donkers <winfrieddonkers at libreoffice.org>
Date:   Thu Jul 7 14:01:58 2016 +0200

    tdf100766 : ODDLPRICE apply constraints to comply with ODFF1.2
    
    Change-Id: I7706a950b904603b6d87306e4a8faa0c4f0cc8d8
    Reviewed-on: https://gerrit.libreoffice.org/27006
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/scaddins/source/analysis/financial.cxx b/scaddins/source/analysis/financial.cxx
index a5f38d1..6b4a6fd 100644
--- a/scaddins/source/analysis/financial.cxx
+++ b/scaddins/source/analysis/financial.cxx
@@ -439,7 +439,7 @@ double SAL_CALL AnalysisAddIn::getOddlprice( const css::uno::Reference< css::bea
     sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastInterest,
     double fRate, double fYield, double fRedemp, sal_Int32 nFreq, const css::uno::Any& rOB ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException, std::exception )
 {
-    if( fRate < 0.0 || fYield < 0.0 || CHK_Freq || nMat <= nSettle || nSettle <= nLastInterest )
+    if( fRate <= 0.0 || fYield < 0.0 || fRedemp <= 0.0 || CHK_Freq || nMat <= nSettle || nSettle <= nLastInterest )
         throw css::lang::IllegalArgumentException();
 
     double fRet = GetOddlprice( GetNullDate( xOpt ), nSettle, nMat, nLastInterest, fRate, fYield, fRedemp, nFreq,


More information about the Libreoffice-commits mailing list