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

Johnny_M klasse at partyheld.de
Mon Oct 23 12:00:22 UTC 2017


 scaddins/source/analysis/analysishelper.cxx |   36 ++++++++++++++--------------
 scaddins/source/analysis/analysishelper.hxx |    4 +--
 2 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit 8ba9dfe27382626e97fb4ab705b7ad056725a800
Author: Johnny_M <klasse at partyheld.de>
Date:   Sun Oct 22 16:10:06 2017 +0200

    Translate German variable names in Calc (financial)
    
    These names of variables correspond to German function names in Calc and were
    translated to their English equivalents. For used translations, see, e.g.,
    https://translations.documentfoundation.org/de/libo54_help/translate/#search=RMZ&sfields=target&soptions=exact,case
    
    Note: The translation here is equal to the translation of variables done
    on https://gerrit.libreoffice.org/43078 , etc.
    
    Change-Id: I1010a3ddf58a0d32e97bfb55090dc7aacc0b91b7
    Reviewed-on: https://gerrit.libreoffice.org/43692
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>

diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index 22328b2d2373..8331565dd0ca 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -1231,39 +1231,39 @@ double GetOddlyield( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal
 }
 
 
-double GetRmz( double fZins, double fZzr, double fBw, double fZw, sal_Int32 nF )
+double GetRmz( double fInterest, double fNper, double fPv, double fFv, sal_Int32 nPayType )
 {
-    double      fRmz;
-    if( fZins == 0.0 )
-        fRmz = ( fBw + fZw ) / fZzr;
+    double      fPmt;
+    if( fInterest == 0.0 )
+        fPmt = ( fPv + fFv ) / fNper;
     else
     {
-        double  fTerm = pow( 1.0 + fZins, fZzr );
-        if( nF > 0 )
-            fRmz = ( fZw * fZins / ( fTerm - 1.0 ) + fBw * fZins / ( 1.0 - 1.0 / fTerm ) ) / ( 1.0 + fZins );
+        double  fTerm = pow( 1.0 + fInterest, fNper );
+        if( nPayType > 0 )
+            fPmt = ( fFv * fInterest / ( fTerm - 1.0 ) + fPv * fInterest / ( 1.0 - 1.0 / fTerm ) ) / ( 1.0 + fInterest );
         else
-            fRmz = fZw * fZins / ( fTerm - 1.0 ) + fBw * fZins / ( 1.0 - 1.0 / fTerm );
+            fPmt = fFv * fInterest / ( fTerm - 1.0 ) + fPv * fInterest / ( 1.0 - 1.0 / fTerm );
     }
 
-    return -fRmz;
+    return -fPmt;
 }
 
 
-double GetZw( double fZins, double fZzr, double fRmz, double fBw, sal_Int32 nF )
+double GetZw( double fInterest, double fNper, double fPmt, double fPv, sal_Int32 nPayType )
 {
-    double      fZw;
-    if( fZins == 0.0 )
-        fZw = fBw + fRmz * fZzr;
+    double      fFv;
+    if( fInterest == 0.0 )
+        fFv = fPv + fPmt * fNper;
     else
     {
-        double  fTerm = pow( 1.0 + fZins, fZzr );
-        if( nF > 0 )
-            fZw = fBw * fTerm + fRmz * ( 1.0 + fZins ) * ( fTerm - 1.0 ) / fZins;
+        double  fTerm = pow( 1.0 + fInterest, fNper );
+        if( nPayType > 0 )
+            fFv = fPv * fTerm + fPmt * ( 1.0 + fInterest ) * ( fTerm - 1.0 ) / fInterest;
         else
-            fZw = fBw * fTerm + fRmz * ( fTerm - 1.0 ) / fZins;
+            fFv = fPv * fTerm + fPmt * ( fTerm - 1.0 ) / fInterest;
     }
 
-    return -fZw;
+    return -fFv;
 }
 
 // financial functions COUP***
diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx
index 280c4a396861..e644d4fa3e72 100644
--- a/scaddins/source/analysis/analysishelper.hxx
+++ b/scaddins/source/analysis/analysishelper.hxx
@@ -155,8 +155,8 @@ double              GetOddlprice( sal_Int32 nNullDate, sal_Int32 nSettle, sal_In
 /// @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 );
-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 );
+double              GetRmz( double fInterest, double fNper, double fPv, double fFv, sal_Int32 nPayType );
+double              GetZw( double fInterest, double fNper, double fPmt, double fPv, sal_Int32 nPayType );
 
 /// @throws css::uno::RuntimeException
 /// @throws css::lang::IllegalArgumentException


More information about the Libreoffice-commits mailing list