summaryrefslogtreecommitdiff
path: root/scaddins
diff options
context:
space:
mode:
authorWinfried Donkers <winfrieddonkers@libreoffice.org>2016-07-07 12:13:30 +0200
committerEike Rathke <erack@redhat.com>2016-07-12 12:16:21 +0000
commit897049ef655d09f477c4c766221a5b1b42087d63 (patch)
tree95728c4e0458dfd40531f8bd22fa49d023f23443 /scaddins
parent2fd00e59ad6cf55c4fc621724de863947ef6dcf6 (diff)
tdf#100729 ODDLYIELD : apply constraints in compliance with ODFF1.2
(and Excel). Change-Id: I1cc40494fb2451a06864f770af7c33d26013dcaa Reviewed-on: https://gerrit.libreoffice.org/27002 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 052f8b564525..a5f38d11b544 100644
--- a/scaddins/source/analysis/financial.cxx
+++ b/scaddins/source/analysis/financial.cxx
@@ -452,7 +452,7 @@ double SAL_CALL AnalysisAddIn::getOddlyield( const css::uno::Reference< css::bea
sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastInterest,
double fRate, double fPrice, double fRedemp, sal_Int32 nFreq, const css::uno::Any& rOB ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException, std::exception )
{
- if( fRate < 0.0 || fPrice <= 0.0 || CHK_Freq || nMat <= nSettle || nSettle <= nLastInterest )
+ if( fRate <= 0.0 || fPrice <= 0.0 || fRedemp <= 0.0 || CHK_Freq || nMat <= nSettle || nSettle <= nLastInterest )
throw css::lang::IllegalArgumentException();
double fRet = GetOddlyield( GetNullDate( xOpt ), nSettle, nMat, nLastInterest, fRate, fPrice, fRedemp, nFreq,