summaryrefslogtreecommitdiff
path: root/scaddins
diff options
context:
space:
mode:
authorWinfried Donkers <winfrieddonkers@libreoffice.org>2016-07-07 14:01:58 +0200
committerEike Rathke <erack@redhat.com>2016-07-12 12:17:58 +0000
commit0759f31172253d6c5be3b938446ff1b8313adebd (patch)
treeefdcda8ff57cd40ebb5be3d401b96cfe35dcbdd4 /scaddins
parent897049ef655d09f477c4c766221a5b1b42087d63 (diff)
tdf100766 : ODDLPRICE apply constraints to comply with ODFF1.2
Change-Id: I7706a950b904603b6d87306e4a8faa0c4f0cc8d8 Reviewed-on: https://gerrit.libreoffice.org/27006 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'scaddins')
-rw-r--r--scaddins/source/analysis/financial.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/scaddins/source/analysis/financial.cxx b/scaddins/source/analysis/financial.cxx
index a5f38d11b544..6b4a6fdaba16 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,