formula manager: wrong category returned by ScFuncDesc::getCategory

In the function manager the index associated to each category starts
from 0 while in ScFuncDesc starts from 1 (data member
ScFuncDesc::nCategory)

Change-Id: I92d0cd2a1a2871785e45faafd797dcf3a500bec7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89198
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90072
Tested-by: Jenkins
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
This commit is contained in:
Marco Cecchetti 2020-02-20 14:47:13 +01:00
parent 234a15d788
commit de81e89b25

View file

@ -283,7 +283,7 @@ OUString ScFuncDesc::getFunctionName() const
const formula::IFunctionCategory* ScFuncDesc::getCategory() const
{
return ScGlobal::GetStarCalcFunctionMgr()->getCategory(nCategory);
return ScGlobal::GetStarCalcFunctionMgr()->getCategory(nCategory - 1);
}
OUString ScFuncDesc::getDescription() const