cui/source/dialogs/SpellDialog.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit a370107d86c32c1631b00422e2e35ff4b867ce57 Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Tue Sep 17 19:34:01 2019 +0200 Commit: Michael Stahl <michael.st...@cib.de> CommitDate: Wed Sep 18 13:56:47 2019 +0200 cui: infinite loop in SentenceEditWindow_Impl::MarkNextError() Looks like previously the aCursor never moved backwards so try to ensure the same for nCursor. (regression from 5261417cbb3051b812164838d19c0f748573df45) Change-Id: I7d2f04bbc6d1274ec4feff57927494f2eb5d665c Reviewed-on: https://gerrit.libreoffice.org/79071 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@cib.de> diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index ab03a51c4e15..d5043281cfac 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1530,7 +1530,7 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError, const css //create a cursor behind the end of the last error //- or at 0 at the start of the sentence - int nCursor(m_nErrorEnd ? m_nErrorEnd + 1 : 0); + sal_Int32 nCursor(m_nErrorEnd ? m_nErrorEnd + 1 : 0); //search for SpellErrorDescription SpellErrorDescription aSpellErrorDescription; @@ -1569,7 +1569,7 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError, const css pSpellErrorDescription = &aSpellErrorDescription; } - nCursor = nMinPos; + nCursor = std::max(nCursor, nMinPos); // move forward if possible // maybe the error found here is already in the ChangeAllList and has to be replaced Reference<XDictionary> xChangeAll = LinguMgr::GetChangeAllList(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits