summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2020-04-09 19:36:53 +0300
committerAndras Timar <andras.timar@collabora.com>2020-05-17 11:46:16 +0200
commit1a2db42562feec95af98e43d76107058e8e68102 (patch)
tree534451db28b3162733db5734f18da9a24795435e /sc
parent458d8a48be21c06cfad6e99b9aa0732c8fceaa92 (diff)
mobile: fix double tap on chart doesn't get into editmode
Sometimes double tapping on a chart when it is not selected in the beginning, starts the input mode instead of chart editing. Change-Id: Iee2a01c1ac909ac4060e91cdacfa9161dc4f1c3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91992 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit d09a35bc10251ef0b66e06c6ffbb2d16332b318b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92291 Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index bd6ac3c96c09..eb05faccc730 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -25,6 +25,7 @@
#include <svx/ImageMapInfo.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
+#include <sfx2/lokhelper.hxx>
#include <sc.hrc>
#include <fudraw.hxx>
@@ -34,6 +35,7 @@
#include <userdat.hxx>
#include <docsh.hxx>
#include <drawview.hxx>
+#include <comphelper/lok.hxx>
// base class for draw module specific functions
FuDraw::FuDraw(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
@@ -244,6 +246,15 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() )
{
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
+ bool isMobilePhone = comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView());
+ // Double tapping on charts on phone may result in activating the edit mode which is not wanted.
+ // It happens due to the delay of selection message of the object from kit to javascript
+ // in that case F2 is sent instead of double click
+ if (isMobilePhone && ScDocument::IsChart(pObj))
+ {
+ rViewShell.ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 0 );
+ break;
+ }
if ( lcl_KeyEditMode( pObj, rViewShell, nullptr ) ) // start text edit for suitable object
bReturn = true;
}