cui/source/dialogs/SpellDialog.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
New commits: commit 684502c24b5f0f5e67c189e79d9f3ffa79d1975e Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Wed Mar 16 22:55:10 2022 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Mar 17 09:59:07 2022 +0100 cui: Use range-based for in SpellDialog None of the widgets should be nullptr. Change-Id: Iaaa2528571a7f301c5fab5ddf938494ed1c57f2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131686 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 dae7b92c9155..11ed7225cc32 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -969,15 +969,11 @@ void SpellDialog::InvalidateDialog() m_xChangePB.get(), m_xChangeAllPB.get(), m_xAutoCorrPB.get(), - m_xUndoPB.get(), - nullptr + m_xUndoPB.get() }; - sal_Int16 i = 0; - while(aDisableArr[i]) - { - aDisableArr[i]->set_sensitive(false); - i++; - } + for (weld::Widget* pWidget : aDisableArr) + pWidget->set_sensitive(false); + SfxModelessDialogController::Deactivate(); }