[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sc/source
Mert Tumer (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 15 13:38:18 UTC 2020
sc/source/ui/drawfunc/fudraw.cxx | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit d09a35bc10251ef0b66e06c6ffbb2d16332b318b
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 15:37:42 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>
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index 65a3f0b843da..c60890c23c15 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -28,6 +28,7 @@
#include <svx/svdundo.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
+#include <sfx2/lokhelper.hxx>
#include <sc.hrc>
#include <fudraw.hxx>
@@ -38,6 +39,7 @@
#include <docsh.hxx>
#include <postit.hxx>
#include <drawview.hxx>
+#include <comphelper/lok.hxx>
// base class for draw module specific functions
FuDraw::FuDraw(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
@@ -248,6 +250,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