From 58f29c4f1de3e116aec62d69b0921f2ee44b8c70 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 17 Mar 2022 07:24:32 +0100 Subject: 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 --- cui/source/dialogs/SpellDialog.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'cui') 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); -- cgit