summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-04-07 21:27:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-04-08 13:23:04 +0200
commit396dfdd2164d095e4ec182956b31aca8c3908655 (patch)
treecce590ec29f535896d09203b051f79883c808618 /toolkit
parentf4c66a2272d890eaa7a6d7429e5bfa7bdb1f7162 (diff)
move set/get Pointer to VCLUnoHelper
Change-Id: I7dadc7bc881e0b892720b3eb89fdc60c8d87c541 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113776 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/helper/vclunohelper.cxx26
1 files changed, 22 insertions, 4 deletions
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx
index 3ef71e8aab07..3a7cc7446c1f 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -18,10 +18,13 @@
*/
#include <tools/stream.hxx>
+#include <vcl/dibtools.hxx>
#include <vcl/event.hxx>
-#include <vcl/window.hxx>
-#include <vcl/unohelp.hxx>
+#include <vcl/graph.hxx>
#include <vcl/metric.hxx>
+#include <vcl/ptrstyle.hxx>
+#include <vcl/unohelp.hxx>
+#include <vcl/window.hxx>
#include <com/sun/star/util/MeasureUnit.hpp>
#include <com/sun/star/awt/XBitmap.hpp>
#include <com/sun/star/awt/XWindow.hpp>
@@ -42,13 +45,11 @@
#include <toolkit/awt/vclxfont.hxx>
#include <controls/unocontrolcontainer.hxx>
#include <controls/unocontrolcontainermodel.hxx>
-#include <vcl/graph.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/awt/Toolkit.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/awt/Point.hpp>
-#include <vcl/dibtools.hxx>
using namespace ::com::sun::star;
@@ -587,4 +588,21 @@ awt::KeyEvent VCLUnoHelper::createKeyEvent( const ::KeyEvent& _rVclEvent, const
}
+::PointerStyle VCLUnoHelper::getMousePointer(const css::uno::Reference<css::awt::XWindowPeer>& rWindowPeer)
+{
+ ::PointerStyle eType = ::PointerStyle::Arrow; // default ?
+ VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(rWindowPeer);
+ if (pWindow)
+ eType = pWindow->GetPointer();
+ return eType;
+}
+
+void VCLUnoHelper::setMousePointer(const css::uno::Reference<css::awt::XWindowPeer>& rWindowPeer, ::PointerStyle ePointer)
+{
+ VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(rWindowPeer);
+ if (!pWindow)
+ return;
+ pWindow->SetPointer(ePointer);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */