diff options
author | Winfried Donkers <winfrieddonkers@libreoffice.org> | 2017-11-12 11:47:11 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-11-13 18:28:10 +0100 |
commit | 76c2e3efe751d42f7b352bebdddfe33bd37d9e06 (patch) | |
tree | 005fa1bb103ccf71a47d20f707998e305375ed33 /sc/source | |
parent | 3dee7948c732faf488846d4d3d1237e89afde28c (diff) |
tdf#113768 Fix opposite argument description for Calc function VDB.
Also, use self-explaining variable name for argument NoSwitch.
Added use of argument NoSwitch to unit test document.
Change-Id: I801d4dbd489898b28543e0eb46f74717671ea03a
Reviewed-on: https://gerrit.libreoffice.org/44647
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/opencl/opinlinefun_finacial.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/core/opencl/opinlinefun_finacial.cxx b/sc/source/core/opencl/opinlinefun_finacial.cxx index 38eb41db02db..6093583dc87c 100644 --- a/sc/source/core/opencl/opinlinefun_finacial.cxx +++ b/sc/source/core/opencl/opinlinefun_finacial.cxx @@ -1532,18 +1532,18 @@ std::string ScInterVDB= std::string VDBImplementDecl= "double VDBImplement(double fCost, double fSalvage, double fLife, double fStart" -", double fEnd, double fFactor, int nType);\n"; +", double fEnd, double fFactor, bool bNoSwitch);\n"; std::string VDBImplement= "double VDBImplement(double fCost, double fSalvage, double fLife, double fStart" -", double fEnd, double fFactor, int nType)\n" +", double fEnd, double fFactor, bool bNoSwitch)\n" "{\n" " double result=0;\n" " double fIntStart = floor(fStart);\n" " double fIntEnd = ceil(fEnd);\n" " int nLoopStart = (int) fIntStart;\n" " int nLoopEnd = (int) fIntEnd;\n" -" if (nType)\n" +" if (bNoSwitch)\n" " {\n" " for (int i = nLoopStart + 1; i <= nLoopEnd; i++)\n" " {\n" diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index d4c27a4d0fd5..67573f5ab9c1 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -1795,11 +1795,11 @@ void ScInterpreter::ScVDB() if ( MustHaveParamCount( nParamCount, 5, 7 ) ) { double fCost, fSalvage, fLife, fStart, fEnd, fFactor, fVdb = 0.0; - bool bType; + bool bNoSwitch; if (nParamCount == 7) - bType = GetBool(); + bNoSwitch = GetBool(); else - bType = false; + bNoSwitch = false; if (nParamCount >= 6) fFactor = GetDouble(); else @@ -1820,7 +1820,7 @@ void ScInterpreter::ScVDB() sal_uLong nLoopEnd = (sal_uLong) fIntEnd; fVdb = 0.0; - if (bType) + if (bNoSwitch) { for (sal_uLong i = nLoopStart + 1; i <= nLoopEnd; i++) { |