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

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