[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - sw/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Apr 9 01:02:04 PDT 2015


 sw/source/uibase/docvw/edtwin.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 668606a384c35ce43b4c73645d80518333c86b67
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Apr 9 09:56:48 2015 +0200

    SwEditWin tiled rendering: do word selection even if the cursor was corrected
    
    When tiled rendering, we always want to create some kind of selection
    when long pushing on a table cell. If there is at least one word in the
    cell, then we want to select the nearest cell, and when it's empty, then
    we want to select the cell itself.
    
    In case there is a table with 1 rows and 2 columns, and A1 is empty, but
    A2 has multiple lines, then in A1 there is an area that's outside the
    text frame of the empty paragraph, but inside the A1 cell frame. When
    clicking on that area, the cursor position gets corrected. With this
    change, we get a proper selection on long push even when pushing on that
    "outside text, inside cell" area, too.
    
    Change-Id: Ic61743014708f127087243cb7b129f8abd72edaa

diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index a05430a..42c41f3 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -3283,8 +3283,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
                         }
 
                         // if the cursor position was corrected or if a Fly
-                        // was selected in ReadOnlyMode, no word selection.
-                        if ( !g_bValidCrsrPos || rSh.IsFrmSelected() )
+                        // was selected in ReadOnlyMode, no word selection, except when tiled rendering.
+                        if ((!g_bValidCrsrPos || rSh.IsFrmSelected()) && !rSh.isTiledRendering())
                             return;
 
                         SwField *pFld;


More information about the Libreoffice-commits mailing list