cui/source/dialogs/SpellDialog.cxx |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

New commits:
commit 58f29c4f1de3e116aec62d69b0921f2ee44b8c70
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Mar 17 07:24:32 2022 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Mar 17 09:59:30 2022 +0100

    cui: Use range-based for in SentenceEditWindow_Impl
    
    Change-Id: I0e324d6b961f632130974d90f22345122650b666
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131687
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 11ed7225cc32..1eba79a15a0c 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -2059,15 +2059,10 @@ void SentenceEditWindow_Impl::SetUndoEditMode(bool bSet)
         pSpellDialog->m_xLanguageLB->get_widget(),
         pSpellDialog->m_xAddToDictMB.get(),
         pSpellDialog->m_xAddToDictPB.get(),
-        pSpellDialog->m_xAutoCorrPB.get(),
-        nullptr
+        pSpellDialog->m_xAutoCorrPB.get()
     };
-    sal_Int32 nIdx = 0;
-    do
-    {
-        aControls[nIdx]->set_sensitive(false);
-    }
-    while(aControls[++nIdx]);
+    for (weld::Widget* pWidget : aControls)
+        pWidget->set_sensitive(false);
 
     //remove error marks
     ESelection aAll(0, 0, 0, EE_TEXTPOS_ALL);

Reply via email to