summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorIlhan Yesil <ilhanyesil@gmx.de>2021-05-31 15:10:47 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2021-09-03 11:45:21 +0200
commite72a7368b368a822d2400ee7db60312226ad3195 (patch)
tree6ca2bc8fffc68e219bb27cfe530c4817ecc69c02 /sc
parent7e48bcea73a8eceacd708cb7fdeb66264eb602d6 (diff)
tdf#131548 Android: jump to cell
Added LOK_CALLBACK_SC_FOLLOW_JUMP: fire this signal to jump to cell cursor in android viewer. Payload format same as LOK_CALLBACK_INVALIDATE_TILES. Change-Id: Ic896baccf1327d6ccdf104811446e3454a42679e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116448 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/inc/gridwin.hxx3
-rw-r--r--sc/source/ui/view/gridwin.cxx7
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx2
3 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 50109106aa5d..e5de1d02100c 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -483,6 +483,9 @@ public:
void updateKitOtherCursors() const;
void updateOtherKitSelections() const;
+ void notifyKitCellFollowJump() const;
+
+
/// Same as MouseButtonDown(), but coordinates are in logic unit.
virtual void LogicMouseButtonDown(const MouseEvent& rMouseEvent) override;
/// Same as MouseButtonUp(), but coordinates are in logic unit.
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 0e527601e10d..2ef44c4f33ab 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4870,6 +4870,13 @@ void ScGridWindow::updateLOKValListButton( bool bVisible, const ScAddress& rPos
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_VALIDITY_LIST_BUTTON, ss.str().c_str());
}
+void ScGridWindow::notifyKitCellFollowJump( ) const
+{
+ ScTabViewShell* pViewShell = mrViewData.GetViewShell();
+
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_SC_FOLLOW_JUMP, getCellCursor().getStr());
+}
+
void ScGridWindow::UpdateListValPos( bool bVisible, const ScAddress& rPos )
{
bool bOldButton = bListValButton;
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index e0b5a6e2d44a..ec1cee97633b 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -472,6 +472,8 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
// align to cursor even if the cursor position hasn't changed,
// because the cursor may be set outside the visible area.
AlignToCursor( nCol, nRow, SC_FOLLOW_JUMP );
+ if ( nSlot == SID_JUMPTOMARK && comphelper::LibreOfficeKit::isActive() )
+ rViewData.GetActiveWin()->notifyKitCellFollowJump();
}
rReq.SetReturnValue( SfxStringItem( SID_CURRENTCELL, aAddress ) );