summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-03-06 18:38:37 +0100
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2019-03-14 21:04:44 +0100
commit99f750a7c7bbef67dd6479b77d617f94ce8bfa37 (patch)
tree17f8ed3e21673359132213ec385febd80eeba968
parent8fb5909a4ea71f0122c4b57a4312f7b1b3ecae2f (diff)
tdf#123637 sw_redlinehide: fix iteration in SwCursorShell::GotoNextOutline()
If nStartPos == size() and !bUseFirst. (regression from d0e9cc832d19b622532f01580d9cf78ee0b215db) Change-Id: I571d24ec5e9d4f2780e7c6d5c8cee09baeaffcc1 Reviewed-on: https://gerrit.libreoffice.org/68821 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit dfdb7f9fcffe0b8594359c22277b64c7b6cdfd4c) Reviewed-on: https://gerrit.libreoffice.org/68845 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 0308bfd590a5bdf602254491b1a76e055e6c3f85) Reviewed-on: https://gerrit.libreoffice.org/69169 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r--sw/source/core/crsr/crstrvl.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 31aaf8b9374e..42436696840b 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1034,13 +1034,13 @@ bool SwCursorShell::GotoNextOutline()
do
{
- if (nPos == rNds.GetOutLineNds().size())
+ if (!bUseFirst)
{
- nPos = 0;
+ ++nPos;
}
- else if (!bUseFirst)
+ if (rNds.GetOutLineNds().size() <= nPos)
{
- ++nPos;
+ nPos = 0;
}
if (bUseFirst)