Kaydet (Commit) 0b60be57 authored tarafından Miklos Vajna's avatar Miklos Vajna Kaydeden (comit) Andras Timar

tdf#91887 handle LOK_MOUSEEVENT_MOUSEMOVE in SdXImpressDocument

Change-Id: If6948e523fd681dbe289909df68364806628ead6
(cherry picked from commit 56f5a402)
üst b9ec2b7d
...@@ -447,6 +447,8 @@ public: ...@@ -447,6 +447,8 @@ public:
void LogicMouseButtonDown(const MouseEvent& rMouseEvent); void LogicMouseButtonDown(const MouseEvent& rMouseEvent);
/// Same as MouseButtonUp(), but coordinates are in logic unit. /// Same as MouseButtonUp(), but coordinates are in logic unit.
void LogicMouseButtonUp(const MouseEvent& rMouseEvent); 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. /// Allows adjusting the point or mark of the selection to a document coordinate.
void SetCursorMm100Position(const Point& rPosition, bool bPoint, bool bClearMark); void SetCursorMm100Position(const Point& rPosition, bool bPoint, bool bClearMark);
/// Gets the currently selected text. /// Gets the currently selected text.
......
...@@ -2430,6 +2430,9 @@ void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount) ...@@ -2430,6 +2430,9 @@ void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount)
case LOK_MOUSEEVENT_MOUSEBUTTONUP: case LOK_MOUSEEVENT_MOUSEBUTTONUP:
pViewShell->LogicMouseButtonUp(aEvent); pViewShell->LogicMouseButtonUp(aEvent);
break; break;
case LOK_MOUSEEVENT_MOUSEMOVE:
pViewShell->LogicMouseMove(aEvent);
break;
default: default:
assert(false); assert(false);
break; break;
......
...@@ -539,6 +539,19 @@ void ViewShell::LogicMouseButtonUp(const MouseEvent& rMouseEvent) ...@@ -539,6 +539,19 @@ void ViewShell::LogicMouseButtonUp(const MouseEvent& rMouseEvent)
mpActiveWindow->SetPointerPosPixel(aPoint); 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) void ViewShell::SetCursorMm100Position(const Point& rPosition, bool bPoint, bool bClearMark)
{ {
if (SdrView* pSdrView = GetView()) if (SdrView* pSdrView = GetView())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment