[Libreoffice-commits] core.git: sc/source
Mert Tumer (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 15 18:05:42 UTC 2020
sc/source/ui/drawfunc/fudraw.cxx | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 2e6753fc764c9c5f36c623e4bdf0f3dfc7229391
Author: Mert Tumer <mert.tumer at collabora.com>
AuthorDate: Thu Apr 9 19:36:53 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Apr 15 20:05:05 2020 +0200
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 at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
(cherry picked from commit d09a35bc10251ef0b66e06c6ffbb2d16332b318b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92291
Tested-by: Jenkins
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;
}
More information about the Libreoffice-commits
mailing list