Kaydet (Commit) 5a31258d authored tarafından Johnny_M's avatar Johnny_M Kaydeden (comit) Eike Rathke

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=GDA&sfields=target&soptions=exact,case

Change-Id: I58be84b37e045ac15bcdf15032def7591be53de7
Reviewed-on: https://gerrit.libreoffice.org/43078Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
üst 6518bea2
...@@ -1647,7 +1647,7 @@ void ScInterpreter::ScSYD() ...@@ -1647,7 +1647,7 @@ void ScInterpreter::ScSYD()
double ScInterpreter::ScGetGDA(double fValue, double fRest, double fTimeLength, double ScInterpreter::ScGetGDA(double fValue, double fRest, double fTimeLength,
double fPeriod, double fFactor) double fPeriod, double fFactor)
{ {
double fGda, fInterest, fOldValue, fNewValue; double fDdb, fInterest, fOldValue, fNewValue;
fInterest = fFactor / fTimeLength; fInterest = fFactor / fTimeLength;
if (fInterest >= 1.0) if (fInterest >= 1.0)
{ {
...@@ -1662,12 +1662,12 @@ double ScInterpreter::ScGetGDA(double fValue, double fRest, double fTimeLength, ...@@ -1662,12 +1662,12 @@ double ScInterpreter::ScGetGDA(double fValue, double fRest, double fTimeLength,
fNewValue = fValue * pow(1.0 - fInterest, fPeriod); fNewValue = fValue * pow(1.0 - fInterest, fPeriod);
if (fNewValue < fRest) if (fNewValue < fRest)
fGda = fOldValue - fRest; fDdb = fOldValue - fRest;
else else
fGda = fOldValue - fNewValue; fDdb = fOldValue - fNewValue;
if (fGda < 0.0) if (fDdb < 0.0)
fGda = 0.0; fDdb = 0.0;
return fGda; return fDdb;
} }
void ScInterpreter::ScDDB() void ScInterpreter::ScDDB()
...@@ -1718,9 +1718,9 @@ void ScInterpreter::ScDB() ...@@ -1718,9 +1718,9 @@ void ScInterpreter::ScDB()
double nOffRate = 1.0 - pow(nRest / nValue, 1.0 / nTimeLength); double nOffRate = 1.0 - pow(nRest / nValue, 1.0 / nTimeLength);
nOffRate = ::rtl::math::approxFloor((nOffRate * 1000.0) + 0.5) / 1000.0; nOffRate = ::rtl::math::approxFloor((nOffRate * 1000.0) + 0.5) / 1000.0;
double nFirstOffRate = nValue * nOffRate * nMonths / 12.0; double nFirstOffRate = nValue * nOffRate * nMonths / 12.0;
double nGda2 = 0.0; double nDb = 0.0;
if (::rtl::math::approxFloor(nPeriod) == 1) if (::rtl::math::approxFloor(nPeriod) == 1)
nGda2 = nFirstOffRate; nDb = nFirstOffRate;
else else
{ {
double nSumOffRate = nFirstOffRate; double nSumOffRate = nFirstOffRate;
...@@ -1729,13 +1729,13 @@ void ScInterpreter::ScDB() ...@@ -1729,13 +1729,13 @@ void ScInterpreter::ScDB()
sal_uInt16 iMax = (sal_uInt16)::rtl::math::approxFloor(nMin); sal_uInt16 iMax = (sal_uInt16)::rtl::math::approxFloor(nMin);
for (sal_uInt16 i = 2; i <= iMax; i++) for (sal_uInt16 i = 2; i <= iMax; i++)
{ {
nGda2 = (nValue - nSumOffRate) * nOffRate; nDb = (nValue - nSumOffRate) * nOffRate;
nSumOffRate += nGda2; nSumOffRate += nDb;
} }
if (nPeriod > nTimeLength) if (nPeriod > nTimeLength)
nGda2 = ((nValue - nSumOffRate) * nOffRate * (12.0 - nMonths)) / 12.0; nDb = ((nValue - nSumOffRate) * nOffRate * (12.0 - nMonths)) / 12.0;
} }
PushDouble(nGda2); PushDouble(nDb);
} }
double ScInterpreter::ScInterVDB(double fValue,double fRest,double fTimeLength, double ScInterpreter::ScInterVDB(double fValue,double fRest,double fTimeLength,
...@@ -1745,34 +1745,34 @@ double ScInterpreter::ScInterVDB(double fValue,double fRest,double fTimeLength, ...@@ -1745,34 +1745,34 @@ double ScInterpreter::ScInterVDB(double fValue,double fRest,double fTimeLength,
double fIntEnd = ::rtl::math::approxCeil(fPeriod); double fIntEnd = ::rtl::math::approxCeil(fPeriod);
sal_uLong nLoopEnd = (sal_uLong) fIntEnd; sal_uLong nLoopEnd = (sal_uLong) fIntEnd;
double fTerm, fLia; double fTerm, fSln; // SLN: Straight-Line Depreciation
double fSalvageValue = fValue - fRest; double fSalvageValue = fValue - fRest;
bool bNowLia = false; bool bNowSln = false;
double fGda; double fDdb;
sal_uLong i; sal_uLong i;
fLia=0; fSln=0;
for ( i = 1; i <= nLoopEnd; i++) for ( i = 1; i <= nLoopEnd; i++)
{ {
if(!bNowLia) if(!bNowSln)
{ {
fGda = ScGetGDA(fValue, fRest, fTimeLength, (double) i, fFactor); fDdb = ScGetGDA(fValue, fRest, fTimeLength, (double) i, fFactor);
fLia = fSalvageValue/ (fTimeLength1 - (double) (i-1)); fSln = fSalvageValue/ (fTimeLength1 - (double) (i-1));
if (fLia > fGda) if (fSln > fDdb)
{ {
fTerm = fLia; fTerm = fSln;
bNowLia = true; bNowSln = true;
} }
else else
{ {
fTerm = fGda; fTerm = fDdb;
fSalvageValue -= fGda; fSalvageValue -= fDdb;
} }
} }
else else
{ {
fTerm = fLia; fTerm = fSln;
} }
if ( i == nLoopEnd) if ( i == nLoopEnd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment