summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2016-03-03 08:56:50 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-03-03 11:31:50 +0000
commit83dccbadc2c6caa804039199915d4a8c1f3f2d5a (patch)
tree5576b8bfd6caae877bc85b43ec2a0ef020c1f5c4
parent1f182f130edeb8282f0e7e325fb823200f2db34a (diff)
tdf#98224: endless loop in replace all stopped
If a drawing in the document contains the search text then the selection of that object removes a selection (SwShellCursor) that marks the end of the search. This is now fixed for that special case. Replacing text in drawing doesn't work - as before and also not all occurrences of the searched text are found. Change-Id: I4a10ddf2dc547572ebb55b6355439d6e320bc980 Reviewed-on: https://gerrit.libreoffice.org/22851 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r--sw/source/core/crsr/swcrsr.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index b8ecf1ece81f..edd72bfc9965 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -851,7 +851,7 @@ static sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurrentCurso
pPHdl->NextPos( ++pPHdl->nActPos );
}
- } while( pTmpCursor != pSaveCursor );
+ } while( pTmpCursor != pSaveCursor && pTmpCursor->GetNext() != pTmpCursor);
if( nFound && !pFndRing ) // if no ring should be created
pFndRing = pCurrentCursor->Create();