[Libreoffice-commits] core.git: sc/source

Henry Castro hcastro at collabora.com
Fri May 8 16:19:21 PDT 2015


 sc/source/ui/view/viewfun2.cxx |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

New commits:
commit 4048311aae6993357c2d0be1f1968a8c57dd4e85
Author: Henry Castro <hcastro at collabora.com>
Date:   Wed May 6 21:20:06 2015 -0400

    sc tiled editing: Highlight the search result
    
    Change-Id: Ib46e3d484f931cbdebf21ea38488313748942b3b

diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 070b109..5b5ec3b 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 )
         {


More information about the Libreoffice-commits mailing list