Blame SOURCES/0189-sc-tiled-rendering-fix-showing-all-search-results.patch

135360
From c8beb0f19a10c8dc2d73c8d7440cf48c51552191 Mon Sep 17 00:00:00 2001
135360
From: Miklos Vajna <vmiklos@collabora.co.uk>
135360
Date: Wed, 7 Oct 2015 17:19:26 +0200
135360
Subject: [PATCH 189/398] sc tiled rendering: fix showing all search results
135360
135360
Calc can have multiple cells selected, but there is only one cell which
135360
has the black border around the cell. Code in
135360
ScViewFunc::SearchAndReplace() assumed that the two are always the same,
135360
and that's how find-all always highlighted the first match only.
135360
135360
Fix this by avoiding emitting LOK_CALLBACK_TEXT_SELECTION two times, at
135360
least in the find-all case.
135360
135360
Change-Id: Ifce789c7f5f11e94fb2445846279823096ecb2dd
135360
(cherry picked from commit a31f95b180728c1c671930913b4b4ad96ebcda5f)
135360
---
135360
 sc/source/ui/view/viewfun2.cxx | 3 ++-
135360
 1 file changed, 2 insertions(+), 1 deletion(-)
135360
135360
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
135360
index 47b0ace1ccef..295d3dbcbf44 100644
135360
--- a/sc/source/ui/view/viewfun2.cxx
135360
+++ b/sc/source/ui/view/viewfun2.cxx
135360
@@ -1837,7 +1837,8 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
135360
         AlignToCursor( nCol, nRow, SC_FOLLOW_JUMP );
135360
         SetCursor( nCol, nRow, true );
135360
 
135360
-        if (rDoc.GetDrawLayer()->isTiledRendering())
135360
+        // Don't move cell selection handles for find-all: selection of all but the first result would be lost.
135360
+        if (rDoc.GetDrawLayer()->isTiledRendering() && nCommand == SvxSearchCmd::FIND)
135360
         {
135360
             Point aCurPos = GetViewData().GetScrPos(nCol, nRow, GetViewData().GetActivePart());
135360
 
135360
-- 
135360
2.12.0
135360