diff options
author | Mert Tumer <mert.tumer@collabora.com> | 2020-04-09 19:36:53 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-04-15 20:05:05 +0200 |
commit | 2e6753fc764c9c5f36c623e4bdf0f3dfc7229391 (patch) | |
tree | 113e0924b766fb73001064be03bef2941ed29b7a /sc/source/ui/drawfunc/fudraw.cxx | |
parent | 1c94842e053a20a739a181d38a35c324df3e62a7 (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/source/ui/drawfunc/fudraw.cxx')
-rw-r--r-- | sc/source/ui/drawfunc/fudraw.cxx | 11 |
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; } |