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

Miklos Vajna vmiklos at collabora.co.uk
Wed Oct 7 08:20:35 PDT 2015


 libreofficekit/source/gtk/lokdocview.cxx |    1 +
 sc/source/ui/view/viewfun2.cxx           |    3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit a31f95b180728c1c671930913b4b4ad96ebcda5f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Oct 7 17:19:26 2015 +0200

    sc tiled rendering: fix showing all search results
    
    Calc can have multiple cells selected, but there is only one cell which
    has the black border around the cell. Code in
    ScViewFunc::SearchAndReplace() assumed that the two are always the same,
    and that's how find-all always highlighted the first match only.
    
    Fix this by avoiding emitting LOK_CALLBACK_TEXT_SELECTION two times, at
    least in the find-all case.
    
    Change-Id: Ifce789c7f5f11e94fb2445846279823096ecb2dd

diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index eeddce7..3bd8543 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1836,7 +1836,8 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
         AlignToCursor( nCol, nRow, SC_FOLLOW_JUMP );
         SetCursor( nCol, nRow, true );
 
-        if (rDoc.GetDrawLayer()->isTiledRendering())
+        // Don't move cell selection handles for find-all: selection of all but the first result would be lost.
+        if (rDoc.GetDrawLayer()->isTiledRendering() && nCommand == SvxSearchCmd::FIND)
         {
             Point aCurPos = GetViewData().GetScrPos(nCol, nRow, GetViewData().GetActivePart());
 
commit c5ceddf3445f7d56ea4f044366e4a797703bdd0c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Oct 7 16:01:43 2015 +0200

    lokdocview: invalidate after selection change
    
    Without this e.g. Calc search does not show the selection rectangle
    correctly.
    
    Change-Id: I5bc20a93ee861d3353bc2e1c1ed7ea8d0e6c8ed4

diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 1f77c11..f6eec2e 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -619,6 +619,7 @@ callback (gpointer pData)
         }
         else
             memset(&priv->m_aHandleMiddleRect, 0, sizeof(priv->m_aHandleMiddleRect));
+        gtk_widget_queue_draw(GTK_WIDGET(pDocView));
     }
     break;
     case LOK_CALLBACK_TEXT_SELECTION_START:


More information about the Libreoffice-commits mailing list