[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - formula/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 22 18:50:57 UTC 2020
formula/source/ui/dlg/formula.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 175143c819d6043bc3e986c90ec137c462da1eb0
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Tue Apr 21 18:06:52 2020 +0200
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Wed Apr 22 20:50:25 2020 +0200
tdf#131169: Retrieve right category in function wizard
m_xFuncPage->GetCategory() takes into account "Last Used" + "All" so 13 categories (0 -> 12)
whereas m_pFuncDesc->getCategory()->getNumber() doesn't take into account the 2 first (so only 0->10)
So it's not +1 but +2
Change-Id: I4d37575a3b6615c76bfa173402191a8661714e95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92652
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 4048ddc65a36fe0b8940019ded4fd1d58f907bcc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92541
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 5f9a94f42699..3fb389f45401 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -826,8 +826,10 @@ void FormulaDlg_Impl::FillListboxes()
if ( m_pFuncDesc && m_pFuncDesc->getCategory() )
{
// We'll never have more than int32 max categories so this is safe ...
- if ( m_xFuncPage->GetCategory() != static_cast<sal_Int32>(m_pFuncDesc->getCategory()->getNumber() + 1) )
- m_xFuncPage->SetCategory(m_pFuncDesc->getCategory()->getNumber() + 1);
+ // m_xFuncPage->GetCategory() takes into account "Last Used" + "All" so 13 categories (0 -> 12)
+ // whereas m_pFuncDesc->getCategory()->getNumber() doesn't take into account the 2 first (so only 0->10)
+ if ( m_xFuncPage->GetCategory() != static_cast<sal_Int32>(m_pFuncDesc->getCategory()->getNumber() + 2) )
+ m_xFuncPage->SetCategory(m_pFuncDesc->getCategory()->getNumber() + 2);
sal_Int32 nPos = m_xFuncPage->GetFuncPos(m_pFuncDesc);
@@ -1389,7 +1391,6 @@ void FormulaDlg_Impl::FormulaCursor()
nStartPos = 1;
m_xMEdit->select_region(nStartPos, nEndPos);
}
-
if (nStartPos != aString.getLength())
{
sal_Int32 nPos = nStartPos;
More information about the Libreoffice-commits
mailing list