summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-04-09 09:56:48 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-04-09 10:29:38 +0200
commit1d4c7274961c5cebfaaea801708f7ac67c663ae6 (patch)
tree83e289d1d005b2918b70d3d99c9e76e64d2e4732
parent9d725554bf4c7784baa2df91b9865ccc32b10ff8 (diff)
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
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index a05430a03036..42c41f368086 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;