sd tiled rendering: avoid passing explicit 0 vcl::Window

Seen as dereferenced in svx for Impress table handling, and doing some
logic <-> pixel conversion -- and mpActiveWindow not being 0 in that
case.

Change-Id: I7f7c41a7d366704f6f8b9a7971f763c6661c8799
This commit is contained in:
Miklos Vajna 2015-09-28 09:05:18 +02:00
parent b54966401d
commit 6a9f985ea6

View File

@ -506,7 +506,7 @@ void ViewShell::LogicMouseButtonDown(const MouseEvent& rMouseEvent)
Point aPoint = mpActiveWindow->GetPointerPosPixel();
mpActiveWindow->SetLastMousePos(rMouseEvent.GetPosPixel());
MouseButtonDown(rMouseEvent, 0);
MouseButtonDown(rMouseEvent, mpActiveWindow);
mpActiveWindow->SetPointerPosPixel(aPoint);
}
@ -519,7 +519,7 @@ void ViewShell::LogicMouseButtonUp(const MouseEvent& rMouseEvent)
Point aPoint = mpActiveWindow->GetPointerPosPixel();
mpActiveWindow->SetLastMousePos(rMouseEvent.GetPosPixel());
MouseButtonUp(rMouseEvent, 0);
MouseButtonUp(rMouseEvent, mpActiveWindow);
mpActiveWindow->SetPointerPosPixel(aPoint);
}
@ -532,7 +532,7 @@ void ViewShell::LogicMouseMove(const MouseEvent& rMouseEvent)
Point aPoint = mpActiveWindow->GetPointerPosPixel();
mpActiveWindow->SetLastMousePos(rMouseEvent.GetPosPixel());
MouseMove(rMouseEvent, 0);
MouseMove(rMouseEvent, mpActiveWindow);
mpActiveWindow->SetPointerPosPixel(aPoint);
}
@ -616,16 +616,16 @@ void ViewShell::SetGraphicMm100Position(bool bStart, const Point& rPosition)
if (bStart)
{
MouseEvent aClickEvent(rPosition, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT);
MouseButtonDown(aClickEvent, 0);
MouseButtonDown(aClickEvent, mpActiveWindow);
MouseEvent aMoveEvent(Point(rPosition.getX(), rPosition.getY()), 0, MouseEventModifiers::SIMPLEMOVE, MOUSE_LEFT);
MouseMove(aMoveEvent, 0);
MouseMove(aMoveEvent, mpActiveWindow);
}
else
{
MouseEvent aMoveEvent(Point(rPosition.getX(), rPosition.getY()), 0, MouseEventModifiers::SIMPLEMOVE, MOUSE_LEFT);
MouseMove(aMoveEvent, 0);
MouseMove(aMoveEvent, mpActiveWindow);
MouseEvent aClickEvent(rPosition, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT);
MouseButtonUp(aClickEvent, 0);
MouseButtonUp(aClickEvent, mpActiveWindow);
}
}