summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop/source/lib/init.cxx13
-rw-r--r--include/vcl/layout.hxx20
-rw-r--r--include/vcl/weld.hxx2
-rw-r--r--vcl/inc/salvtables.hxx2
-rw-r--r--vcl/source/app/salvtables.cxx7
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx5
6 files changed, 39 insertions, 10 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 20ec8c0caccf..9dcd1a2e0dac 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3679,6 +3679,19 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
bContinueWithLOKWindow = true;
}
}
+ else if (sControlType == "drawingarea")
+ {
+ auto pArea = dynamic_cast<weld::DrawingArea*>(pWidget);
+ if (pArea)
+ {
+ if (sAction == "click")
+ {
+ pArea->click(Point(10, 10));
+ }
+ else
+ bContinueWithLOKWindow = true;
+ }
+ }
else if (sControlType == "spinfield")
{
auto pSpinField = dynamic_cast<weld::SpinButton*>(pWidget);
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index cee1621f2f3b..ff33f1a107f8 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -666,16 +666,6 @@ private:
if (!m_aMouseMotionHdl.Call(rMEvt))
Control::MouseMove(rMEvt);
}
- virtual void MouseButtonDown(const MouseEvent& rMEvt) override
- {
- if (!m_aMousePressHdl.Call(rMEvt))
- Control::MouseButtonDown(rMEvt);
- }
- virtual void MouseButtonUp(const MouseEvent& rMEvt) override
- {
- if (!m_aMouseReleaseHdl.Call(rMEvt))
- Control::MouseButtonUp(rMEvt);
- }
virtual void KeyInput(const KeyEvent& rKEvt) override
{
if (!m_aKeyPressHdl.Call(rKEvt))
@@ -749,6 +739,16 @@ public:
{
SetBackground();
}
+ virtual void MouseButtonDown(const MouseEvent& rMEvt) override
+ {
+ if (!m_aMousePressHdl.Call(rMEvt))
+ Control::MouseButtonDown(rMEvt);
+ }
+ virtual void MouseButtonUp(const MouseEvent& rMEvt) override
+ {
+ if (!m_aMouseReleaseHdl.Call(rMEvt))
+ Control::MouseButtonUp(rMEvt);
+ }
void SetUITestFactory(FactoryFunction pFactoryFunction, void* pUserData)
{
m_pFactoryFunction = pFactoryFunction;
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 05d5eeeb50d4..6d72135b21ee 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -2107,6 +2107,8 @@ public:
virtual a11yref get_accessible_parent() = 0;
virtual a11yrelationset get_accessible_relation_set() = 0;
virtual Point get_accessible_location() = 0;
+
+ virtual void click(Point pos) = 0;
};
class VCL_DLLPUBLIC Menu
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 3e748bf5a657..53515ad13ac6 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1160,6 +1160,8 @@ public:
virtual ~SalInstanceDrawingArea() override;
virtual OutputDevice& get_ref_device() override;
+
+ virtual void click(Point pos) override;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 6a299156b404..391f2a6dc40a 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5760,6 +5760,13 @@ SalInstanceDrawingArea::~SalInstanceDrawingArea()
OutputDevice& SalInstanceDrawingArea::get_ref_device() { return *m_xDrawingArea; }
+void SalInstanceDrawingArea::click(Point pos)
+{
+ MouseEvent aEvent(pos);
+ m_xDrawingArea->MouseButtonDown(aEvent);
+ m_xDrawingArea->MouseButtonUp(aEvent);
+}
+
IMPL_LINK(SalInstanceDrawingArea, PaintHdl, target_and_area, aPayload, void)
{
m_aDrawHdl.Call(aPayload);
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 804fa0ec7df3..620cc74b5fae 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -12826,6 +12826,11 @@ public:
{
return *m_xDevice;
}
+
+ void click(Point /*pos*/) override
+ {
+ //TODO
+ }
};
}