diff options
author | Henry Castro <hcastro@collabora.com> | 2015-05-06 21:20:06 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2015-05-08 19:18:09 -0400 |
commit | 4048311aae6993357c2d0be1f1968a8c57dd4e85 (patch) | |
tree | 0ddd965e6d1b63a0dc73d25ecd7c201a71949833 /sc | |
parent | 6183a945de03dcd5fe0b967d5814a0add954a8c8 (diff) |
sc tiled editing: Highlight the search result
Change-Id: Ib46e3d484f931cbdebf21ea38488313748942b3b
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
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 <columnspanset.hxx> #include <rowheightcontext.hxx> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <boost/scoped_ptr.hpp> #include <vector> @@ -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 ) { |