[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sw/source

Oliver Specht oliver.specht at cib.de
Tue May 10 08:46:00 UTC 2016


 sw/source/core/crsr/swcrsr.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a7435316873335b2d637abff93ffabc9451b5379
Author: Oliver Specht <oliver.specht at cib.de>
Date:   Thu Mar 3 08:56:50 2016 +0100

    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.
    
    Reviewed-on: https://gerrit.libreoffice.org/22851
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 83dccbadc2c6caa804039199915d4a8c1f3f2d5a)
    
    Change-Id: I4a10ddf2dc547572ebb55b6355439d6e320bc980
    Reviewed-on: https://gerrit.libreoffice.org/24805
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index dfba8e3..6d759be 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -850,7 +850,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();


More information about the Libreoffice-commits mailing list