summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uno
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-01-21 12:52:30 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-01-26 10:27:42 +0100
commit752d15176fe6c3361288f3939508cd9d4497115d (patch)
tree5078beb005b2704972c485e8dc42252399b0ef93 /sw/source/uibase/uno
parentbb0b878b9d8a63e43c5063b65b1b2381621a18f6 (diff)
Add SwXTextDocument::postMouseEvent()
Change-Id: Ic2e6343288e87e23026b2f0c17338ecf5f1bed99
Diffstat (limited to 'sw/source/uibase/uno')
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 08fd4a49caa9..cd4b4bc330fb 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -129,6 +129,7 @@
#include <swatrset.hxx>
#include <view.hxx>
#include <srcview.hxx>
+#include <edtwin.hxx>
#include <svtools/langtab.hxx>
#include <map>
@@ -3172,6 +3173,25 @@ void SwXTextDocument::registerCallback(LibreOfficeKitCallback pCallback, void* p
pViewShell->registerLibreOfficeKitCallback(pCallback, pData);
}
+void SwXTextDocument::postMouseEvent(int nType, int nX, int nY)
+{
+ SwEditWin& rEditWin = pDocShell->GetView()->GetEditWin();
+ MouseEvent aEvent(Point(nX, nY), 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT);
+
+ switch (nType)
+ {
+ case LOK_MOUSEEVENT_MOUSEBUTTONDOWN:
+ rEditWin.LogicMouseButtonDown(aEvent);
+ break;
+ case LOK_MOUSEEVENT_MOUSEBUTTONUP:
+ rEditWin.LogicMouseButtonUp(aEvent);
+ break;
+ default:
+ assert(false);
+ break;
+ }
+}
+
void * SAL_CALL SwXTextDocument::operator new( size_t t) throw()
{
return SwXTextDocumentBaseClass::operator new(t);