sc/source/core/data/funcdesc.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 968fe71f654937727e0708d1070ffabf90b9e527
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Thu Feb 20 14:47:13 2020 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Tue Feb 25 09:28:45 2020 +0100

    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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Dennis Francis <dennis.fran...@collabora.com>

diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 15a2e22d8811..a7a62d2d8568 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -284,7 +284,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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to