summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-06-16 15:55:38 +0200
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:22:54 +0200
commit0b60be575abb1bd7f3919987dd6e6c5f50abd785 (patch)
tree683540c442ecd254965ce4daaf2cf80687a33ae0 /sd
parentb9ec2b7d55ce274cbe7b39bbf306bebdbce13682 (diff)
tdf#91887 handle LOK_MOUSEEVENT_MOUSEMOVE in SdXImpressDocument
Change-Id: If6948e523fd681dbe289909df68364806628ead6 (cherry picked from commit 56f5a402287e735f5a9c1f84931dcbc9e7b579e7)
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/inc/ViewShell.hxx2
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx3
-rw-r--r--sd/source/ui/view/viewshel.cxx13
3 files changed, 18 insertions, 0 deletions
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 343651569226..bc962ca59810 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -447,6 +447,8 @@ public:
void LogicMouseButtonDown(const MouseEvent& rMouseEvent);
/// Same as MouseButtonUp(), but coordinates are in logic unit.
void LogicMouseButtonUp(const MouseEvent& rMouseEvent);
+ /// Same as MouseMove(), but coordinates are in logic unit.
+ void LogicMouseMove(const MouseEvent& rMouseEvent);
/// Allows adjusting the point or mark of the selection to a document coordinate.
void SetCursorMm100Position(const Point& rPosition, bool bPoint, bool bClearMark);
/// Gets the currently selected text.
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index a50f95e96f75..3b460bfb6cf2 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2430,6 +2430,9 @@ void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount)
case LOK_MOUSEEVENT_MOUSEBUTTONUP:
pViewShell->LogicMouseButtonUp(aEvent);
break;
+ case LOK_MOUSEEVENT_MOUSEMOVE:
+ pViewShell->LogicMouseMove(aEvent);
+ break;
default:
assert(false);
break;
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 6978288fc848..51a049e4d66d 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -539,6 +539,19 @@ void ViewShell::LogicMouseButtonUp(const MouseEvent& rMouseEvent)
mpActiveWindow->SetPointerPosPixel(aPoint);
}
+void ViewShell::LogicMouseMove(const MouseEvent& rMouseEvent)
+{
+ // When we're not doing tiled rendering, then positions must be passed as pixels.
+ assert(GetDoc()->isTiledRendering());
+
+ Point aPoint = mpActiveWindow->GetPointerPosPixel();
+ mpActiveWindow->SetLastMousePos(rMouseEvent.GetPosPixel());
+
+ MouseMove(rMouseEvent, 0);
+
+ mpActiveWindow->SetPointerPosPixel(aPoint);
+}
+
void ViewShell::SetCursorMm100Position(const Point& rPosition, bool bPoint, bool bClearMark)
{
if (SdrView* pSdrView = GetView())