From 4048311aae6993357c2d0be1f1968a8c57dd4e85 Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Wed, 6 May 2015 21:20:06 -0400 Subject: sc tiled editing: Highlight the search result Change-Id: Ib46e3d484f931cbdebf21ea38488313748942b3b --- sc/source/ui/view/viewfun2.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'sc') diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 070b109ac2ce..5b5ec3bf346e 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -85,6 +85,7 @@ #include "tokenarray.hxx" #include #include +#include #include #include @@ -1815,6 +1816,21 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, AlignToCursor( nCol, nRow, SC_FOLLOW_JUMP ); SetCursor( nCol, nRow, true ); + if (rDoc.GetDrawLayer()->isTiledRendering()) + { + Point aCurPos = GetViewData().GetScrPos(nCol, nRow, GetViewData().GetActivePart()); + + // just update the cell selection + ScGridWindow* pGridWindow = GetViewData().GetActiveWin(); + if (pGridWindow) + { + // move the cell selection handles + pGridWindow->SetCellSelectionPixel(LOK_SETTEXTSELECTION_START, aCurPos.X(), aCurPos.Y()); + pGridWindow->SetCellSelectionPixel(LOK_SETTEXTSELECTION_END, aCurPos.X(), aCurPos.Y()); + pGridWindow->SetCellSelectionPixel(LOK_SETTEXTSELECTION_RESET, aCurPos.X(), aCurPos.Y()); + } + } + if ( nCommand == SvxSearchCmd::REPLACE || nCommand == SvxSearchCmd::REPLACE_ALL ) { -- cgit