tdf#123637 sw_redlinehide: fix iteration in SwCursorShell::GotoNextOutline()

If nStartPos == size() and !bUseFirst.

(regression from d0e9cc832d)

Change-Id: I571d24ec5e9d4f2780e7c6d5c8cee09baeaffcc1
Reviewed-on: https://gerrit.libreoffice.org/68821
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
This commit is contained in:
Michael Stahl
2019-03-06 18:38:37 +01:00
parent ac7de9a54d
commit dfdb7f9fcf

View File

@@ -1033,14 +1033,14 @@ bool SwCursorShell::GotoNextOutline()
do
{
if (nPos == rNds.GetOutLineNds().size())
{
nPos = 0;
}
else if (!bUseFirst)
if (!bUseFirst)
{
++nPos;
}
if (rNds.GetOutLineNds().size() <= nPos)
{
nPos = 0;
}
if (bUseFirst)
{