cui/source/options/optdict.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit fb8332fd4ac068835ba3a6557e8a67c5a5006559
Author:     Mike Kaganski <[email protected]>
AuthorDate: Wed Oct 8 11:11:28 2025 +0500
Commit:     Xisco Fauli <[email protected]>
CommitDate: Mon Oct 20 14:38:16 2025 +0200

    tdf#167143: set text of the correct row
    
    Regression after commit 00e2762c664614a1b33f54dfc990ba29f0f81a07
    (Drop uses of css::uno::Sequence::getConstArray in cppuhelper ..
    cui, 2024-04-29).
    
    Change-Id: I9544160ee3857c3ef8322c85529f5ff6a4ce0e2c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192055
    Reviewed-by: Mike Kaganski <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit f5cd16a252a73a3e594fc19eba365c52ec987fbb)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192710
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 0b24752691f3..dd1a468d03a6 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -524,7 +524,6 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 
nId )
         });
 
     m_pWordsLB->freeze(); // speed up insert
-    int nRow = 0;
     for (OUString const & rStr : aSortedDicEntries)
     {
         sal_Int32 index = 0;
@@ -532,8 +531,7 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 
nId )
         if (index != -1 && m_pWordsLB == m_xDoubleColumnLB.get())
         {
             OUString sReplace = rStr.getToken(0, '     ', index);
-            m_pWordsLB->set_text(nRow, sReplace, 1);
-            ++nRow;
+            m_pWordsLB->set_text(m_pWordsLB->n_children() - 1, sReplace, 1);
         }
     }
     m_pWordsLB->thaw();

Reply via email to