[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sd/source
Miklos Vajna
vmiklos at collabora.co.uk
Tue Jun 16 08:29:38 PDT 2015
sd/source/ui/inc/ViewShell.hxx | 2 ++
sd/source/ui/unoidl/unomodel.cxx | 3 +++
sd/source/ui/view/viewshel.cxx | 13 +++++++++++++
3 files changed, 18 insertions(+)
New commits:
commit 2f0f6960e7e6cd88c6a8da8d0d4b172286c5b9df
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Jun 16 15:55:38 2015 +0200
tdf#91887 handle LOK_MOUSEEVENT_MOUSEMOVE in SdXImpressDocument
Change-Id: If6948e523fd681dbe289909df68364806628ead6
(cherry picked from commit 56f5a402287e735f5a9c1f84931dcbc9e7b579e7)
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 49417b6..97ed710 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);
/// Allows starting or ending a graphic move or resize action.
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 5190351..dc40917 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 402c9a0..66c28b4 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -538,6 +538,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())
More information about the Libreoffice-commits
mailing list