From de81e89b25c710173852b1bdebc1d6f96fcd2812 Mon Sep 17 00:00:00 2001 From: Marco Cecchetti Date: Thu, 20 Feb 2020 14:47:13 +0100 Subject: [PATCH] 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 Reviewed-by: Dennis Francis Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90072 Tested-by: Jenkins Reviewed-by: Marco Cecchetti --- sc/source/core/data/funcdesc.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx index 89e07465ea67..2a3f4219eae1 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -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