summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2022-02-23 14:42:03 -0400
committerHenry Castro <hcastro@collabora.com>2022-07-05 19:54:33 +0200
commited3270a522c487e172f78eab5ee449fd68591bed (patch)
treeb40a3777e5f10a8d93cba822404c01e83b5d38f3 /vcl
parent5e9f1f1bf905987c172299eb82f4a1f0f5682ee8 (diff)
lok: vcl: introduce set_cursor_data method
The ScEditWindow requires to assign a cursor, so the child widget can send cursor invalidation to client side. Change-Id: I429d484a311f217f2419e38d50f8d9a422640221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130446 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136829 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/salvtables.hxx2
-rw-r--r--vcl/source/app/salvtables.cxx9
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx2
3 files changed, 13 insertions, 0 deletions
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 4fab7dfe2bb9..f0ed09273753 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -305,6 +305,8 @@ public:
virtual OUString get_tooltip_text() const override;
+ virtual void set_cursor_data(void* pData) override;
+
virtual void connect_focus_in(const Link<Widget&, void>& rLink) override;
virtual void connect_mnemonic_activate(const Link<Widget&, bool>& rLink) override;
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 6cd499a1dcc7..c034b88bc285 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -451,6 +451,15 @@ void SalInstanceWidget::set_tooltip_text(const OUString& rTip)
OUString SalInstanceWidget::get_tooltip_text() const { return m_xWidget->GetQuickHelpText(); }
+void SalInstanceWidget::set_cursor_data(void* pData)
+{
+ vcl::Cursor* pCursor = static_cast<vcl::Cursor*>(pData);
+ if (!pCursor)
+ return;
+
+ m_xWidget->SetCursor(pCursor);
+}
+
void SalInstanceWidget::connect_focus_in(const Link<Widget&, void>& rLink)
{
ensure_event_listener();
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 9abde0981326..1b4809fb57a2 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -3895,6 +3895,8 @@ public:
return OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8);
}
+ virtual void set_cursor_data(void * /*pData*/) override {};
+
virtual std::unique_ptr<weld::Container> weld_parent() const override;
virtual OString get_buildable_name() const override