summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-10-23 09:35:18 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2022-10-23 19:06:00 +0200
commit825242b48843d7d8e03e3dd41a58d6d93afb443e (patch)
treedaf6ec27bc664e733b7ffaa5f403d80de1ad1189 /sw/source/uibase/docvw
parentcf429e79367775a03c2ca89ed57d3de88bd2c6dc (diff)
Simplify SwEditWin::LogicMouse* and sd::Window::LogicMouse*
These are intended to be called in LibreOfficeKit case. Setting pointer position appeared in commits b780822f5afbf8cd6c2a8c756251a7edf248f55e Author Miklos Vajna <vmiklos@collabora.co.uk> Date Tue Feb 24 14:30:41 2015 +0100 Introduce SdXImpressDocument::postMouseEvent() override and cc7d10c04fe3047f18b6d5271a5f46a31b80d360 Author Miklos Vajna <vmiklos@collabora.co.uk> Date Tue Mar 03 12:09:04 2015 +0100 SwEditWin: disable map mode in LogicMouseButtonUp/Down The only effect of Window::SetPointerPosPixel is realized by a call to SalFrame::SetPointerPos; and in SVP case, which is used in case of LibreOfficeKit on Linux, it is a noop (see SvpSalFrame::SetPointerPos in vcl/headless/svpframe.cxx). But e.g. when running gtktiledviewer on Windows, WinSalFrame::SetPointerPos is called, which actually sets system cursor position, causing unexpected jumps. And it is unclear why the mouse actions should restore previous mouse positions after executing their functions in the first place. The other overrides (vcl/source/control/ctrl.cxx, sc/source/ui/view/gridwin.cxx, chart2/source/controller/main/ChartWindow.cxx) don't do that. So remove these SetPointerPosPixel calls altogether. The question remains: if these LogicMouse* are still needed, or if they may be replaced with respective Window::Mouse* calls. Change-Id: Id6103f8eaaddafc72fe5e4264532dbc8a658d240 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141696 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/uibase/docvw')
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx12
1 files changed, 0 insertions, 12 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 584d715b9cb8..5095370a16f2 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -6740,12 +6740,8 @@ void SwEditWin::LogicMouseButtonDown(const MouseEvent& rMouseEvent)
// When we're not doing tiled rendering, then positions must be passed as pixels.
assert(comphelper::LibreOfficeKit::isActive());
- Point aPoint = GetPointerPosPixel();
SetLastMousePos(rMouseEvent.GetPosPixel());
-
MouseButtonDown(rMouseEvent);
-
- SetPointerPosPixel(aPoint);
}
void SwEditWin::LogicMouseButtonUp(const MouseEvent& rMouseEvent)
@@ -6753,12 +6749,8 @@ void SwEditWin::LogicMouseButtonUp(const MouseEvent& rMouseEvent)
// When we're not doing tiled rendering, then positions must be passed as pixels.
assert(comphelper::LibreOfficeKit::isActive());
- Point aPoint = GetPointerPosPixel();
SetLastMousePos(rMouseEvent.GetPosPixel());
-
MouseButtonUp(rMouseEvent);
-
- SetPointerPosPixel(aPoint);
}
void SwEditWin::LogicMouseMove(const MouseEvent& rMouseEvent)
@@ -6766,12 +6758,8 @@ void SwEditWin::LogicMouseMove(const MouseEvent& rMouseEvent)
// When we're not doing tiled rendering, then positions must be passed as pixels.
assert(comphelper::LibreOfficeKit::isActive());
- Point aPoint = GetPointerPosPixel();
SetLastMousePos(rMouseEvent.GetPosPixel());
-
MouseMove(rMouseEvent);
-
- SetPointerPosPixel(aPoint);
}
void SwEditWin::SetCursorTwipPosition(const Point& rPosition, bool bPoint, bool bClearMark)