chart2/source/controller/inc/ChartWindow.hxx | 5 ---- chart2/source/controller/main/ChartWindow.cxx | 15 -------------- include/vcl/ctrl.hxx | 4 --- include/vcl/window.hxx | 7 ------ sc/source/ui/inc/gridwin.hxx | 8 ------- sc/source/ui/view/gridwin.cxx | 15 -------------- sd/source/ui/inc/Window.hxx | 6 ----- sd/source/ui/view/sdwindow.cxx | 27 -------------------------- sfx2/source/view/lokhelper.cxx | 9 +++++--- sw/source/uibase/docvw/edtwin.cxx | 27 -------------------------- sw/source/uibase/inc/edtwin.hxx | 6 ----- vcl/source/control/ctrl.cxx | 15 -------------- 12 files changed, 6 insertions(+), 138 deletions(-)
New commits: commit faca390c57841fa15616abdd8a679855971bc6d3 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Mon Oct 24 08:50:15 2022 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Mon Oct 24 12:51:32 2022 +0200 Drop Window::LogicMouse* As mentioned in commit 510bca3d3ab0b2fd21f0083b4e0fe14ff8c903c3, over the time these functions were changed; now they don't take logical coordinates, but pixels, so became true duplicates of corresponding Mouse* functions. The calls to SetLastMousePos are now made from LOKPostAsyncEvent uniformly. Change-Id: I2c8a9095719c0c8e21cf81342a286b00c1d1a41c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141693 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/chart2/source/controller/inc/ChartWindow.hxx b/chart2/source/controller/inc/ChartWindow.hxx index 4ab65ddd959e..413acd968b22 100644 --- a/chart2/source/controller/inc/ChartWindow.hxx +++ b/chart2/source/controller/inc/ChartWindow.hxx @@ -53,11 +53,6 @@ public: virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; virtual void RequestHelp( const HelpEvent& rHEvt ) override; - /// For LibreOfficeKit, we need to route these to the mouse events. - virtual void LogicMouseButtonDown(const MouseEvent&) override; - virtual void LogicMouseButtonUp(const MouseEvent&) override; - virtual void LogicMouseMove(const MouseEvent&) override; - void ForceInvalidate(); virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) override; virtual void Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ) override; diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index 3085f65da43c..00ea3b4d1e78 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -232,21 +232,6 @@ void ChartWindow::RequestHelp( const HelpEvent& rHEvt ) vcl::Window::RequestHelp( rHEvt ); } -void ChartWindow::LogicMouseButtonDown(const MouseEvent& rEvent) -{ - MouseButtonDown(rEvent); -} - -void ChartWindow::LogicMouseButtonUp(const MouseEvent& rEvent) -{ - MouseButtonUp(rEvent); -} - -void ChartWindow::LogicMouseMove(const MouseEvent& rEvent) -{ - MouseMove(rEvent); -} - void ChartWindow::adjustHighContrastMode() { static const DrawModeFlags nContrastMode = diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx index a6797cc734bb..17c40ae66067 100644 --- a/include/vcl/ctrl.hxx +++ b/include/vcl/ctrl.hxx @@ -228,10 +228,6 @@ public: vcl::Font GetUnzoomedControlPointFont() const; void SetShowAccelerator (bool val); - - void LogicMouseButtonDown(const MouseEvent& rMouseEvent) override; - void LogicMouseButtonUp(const MouseEvent& rMouseEvent) override; - void LogicMouseMove(const MouseEvent& rMouseEvent) override; }; #endif // INCLUDED_VCL_CTRL_HXX diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index bc90e6e55fa0..18c590ac9c5c 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1120,13 +1120,6 @@ public: /// Dumps itself and potentially its children to a property tree, to be written easily to JSON. virtual void DumpAsPropertyTree(tools::JsonWriter&); - /// Same as MouseButtonDown(), but coordinates are in logic unit. used for LOK - virtual void LogicMouseButtonDown(const MouseEvent&) {}; - /// Same as MouseButtonUp(), but coordinates are in logic unit. used for LOK - virtual void LogicMouseButtonUp(const MouseEvent&) {}; - /// Same as MouseMove(), but coordinates are in logic unit. used for LOK - virtual void LogicMouseMove(const MouseEvent&) {}; - /** @name Accessibility */ ///@{ diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 93d7abd095a3..5f108525e9ed 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -492,14 +492,6 @@ public: void notifyKitCellFollowJump() const; - - /// Same as MouseButtonDown(), but coordinates are in logic unit. - virtual void LogicMouseButtonDown(const MouseEvent& rMouseEvent) override; - /// Same as MouseButtonUp(), but coordinates are in logic unit. - virtual void LogicMouseButtonUp(const MouseEvent& rMouseEvent) override; - /// Same as MouseMove(), but coordinates are in logic unit. - virtual void LogicMouseMove(const MouseEvent& rMouseEvent) override; - ScViewData& getViewData(); virtual FactoryFunction GetUITestFactory() const override; diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 157f800c08f4..4e620c2c4f12 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1672,21 +1672,6 @@ bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, bool bAction ) return bNewPointer; } -void ScGridWindow::LogicMouseButtonDown(const MouseEvent& rMouseEvent) -{ - MouseButtonDown(rMouseEvent); -} - -void ScGridWindow::LogicMouseButtonUp(const MouseEvent& rMouseEvent) -{ - MouseButtonUp(rMouseEvent); -} - -void ScGridWindow::LogicMouseMove(const MouseEvent& rMouseEvent) -{ - MouseMove(rMouseEvent); -} - void ScGridWindow::MouseButtonDown( const MouseEvent& rMEvt ) { if (SfxLokHelper::getDeviceFormFactor() == LOKDeviceFormFactor::MOBILE) diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx index f1beddbc6bba..0464ad32e19e 100644 --- a/sd/source/ui/inc/Window.hxx +++ b/sd/source/ui/inc/Window.hxx @@ -198,12 +198,6 @@ protected: /// @see Window::LogicInvalidate(). void LogicInvalidate(const ::tools::Rectangle* pRectangle) override; - /// Same as MouseButtonDown(), but coordinates are in logic unit. - virtual void LogicMouseButtonDown(const MouseEvent& rMouseEvent) override; - /// Same as MouseButtonUp(), but coordinates are in logic unit. - virtual void LogicMouseButtonUp(const MouseEvent& rMouseEvent) override; - /// Same as MouseMove(), but coordinates are in logic unit. - virtual void LogicMouseMove(const MouseEvent& rMouseEvent) override; FactoryFunction GetUITestFactory() const override; }; diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index b637a1a01aa8..1ccd7461d7bc 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -1045,33 +1045,6 @@ void Window::LogicInvalidate(const ::tools::Rectangle* pRectangle) SfxLokHelper::notifyInvalidation(&rSfxViewShell, pResultRectangle); } -void Window::LogicMouseButtonDown(const MouseEvent& rMouseEvent) -{ - // When we're not doing tiled rendering, then positions must be passed as pixels. - assert(comphelper::LibreOfficeKit::isActive()); - - SetLastMousePos(rMouseEvent.GetPosPixel()); - mpViewShell->MouseButtonDown(rMouseEvent, this); -} - -void Window::LogicMouseButtonUp(const MouseEvent& rMouseEvent) -{ - // When we're not doing tiled rendering, then positions must be passed as pixels. - assert(comphelper::LibreOfficeKit::isActive()); - - SetLastMousePos(rMouseEvent.GetPosPixel()); - mpViewShell->MouseButtonUp(rMouseEvent, this); -} - -void Window::LogicMouseMove(const MouseEvent& rMouseEvent) -{ - // When we're not doing tiled rendering, then positions must be passed as pixels. - assert(comphelper::LibreOfficeKit::isActive()); - - SetLastMousePos(rMouseEvent.GetPosPixel()); - mpViewShell->MouseMove(rMouseEvent, this); -} - FactoryFunction Window::GetUITestFactory() const { if (get_id() == "impress_win") diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index a082aeff110d..e0cdb25505ec 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -730,7 +730,8 @@ namespace pFocusWindow->KeyUp(pLOKEv->maKeyEvent); break; case VclEventId::WindowMouseButtonDown: - pLOKEv->mpWindow->LogicMouseButtonDown(pLOKEv->maMouseEvent); + pLOKEv->mpWindow->SetLastMousePos(pLOKEv->maMouseEvent.GetPosPixel()); + pLOKEv->mpWindow->MouseButtonDown(pLOKEv->maMouseEvent); // Invoke the context menu if (pLOKEv->maMouseEvent.GetButtons() & MOUSE_RIGHT) { @@ -739,7 +740,8 @@ namespace } break; case VclEventId::WindowMouseButtonUp: - pLOKEv->mpWindow->LogicMouseButtonUp(pLOKEv->maMouseEvent); + pLOKEv->mpWindow->SetLastMousePos(pLOKEv->maMouseEvent.GetPosPixel()); + pLOKEv->mpWindow->MouseButtonUp(pLOKEv->maMouseEvent); // sometimes MouseButtonDown captures mouse and starts tracking, and VCL // will not take care of releasing that with tiled rendering @@ -748,7 +750,8 @@ namespace break; case VclEventId::WindowMouseMove: - pLOKEv->mpWindow->LogicMouseMove(pLOKEv->maMouseEvent); + pLOKEv->mpWindow->SetLastMousePos(pLOKEv->maMouseEvent.GetPosPixel()); + pLOKEv->mpWindow->MouseMove(pLOKEv->maMouseEvent); break; case VclEventId::ExtTextInput: case VclEventId::EndExtTextInput: diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 5095370a16f2..3b70464c8c27 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -6735,33 +6735,6 @@ void SwEditWin::LogicInvalidate(const tools::Rectangle* pRectangle) SfxLokHelper::notifyInvalidation(&m_rView, pRectangle); } -void SwEditWin::LogicMouseButtonDown(const MouseEvent& rMouseEvent) -{ - // When we're not doing tiled rendering, then positions must be passed as pixels. - assert(comphelper::LibreOfficeKit::isActive()); - - SetLastMousePos(rMouseEvent.GetPosPixel()); - MouseButtonDown(rMouseEvent); -} - -void SwEditWin::LogicMouseButtonUp(const MouseEvent& rMouseEvent) -{ - // When we're not doing tiled rendering, then positions must be passed as pixels. - assert(comphelper::LibreOfficeKit::isActive()); - - SetLastMousePos(rMouseEvent.GetPosPixel()); - MouseButtonUp(rMouseEvent); -} - -void SwEditWin::LogicMouseMove(const MouseEvent& rMouseEvent) -{ - // When we're not doing tiled rendering, then positions must be passed as pixels. - assert(comphelper::LibreOfficeKit::isActive()); - - SetLastMousePos(rMouseEvent.GetPosPixel()); - MouseMove(rMouseEvent); -} - void SwEditWin::SetCursorTwipPosition(const Point& rPosition, bool bPoint, bool bClearMark) { if (SdrView* pSdrView = m_rView.GetWrtShell().GetDrawView()) diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index 9fb3da476f9b..64c9f0c38ed9 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -281,12 +281,6 @@ public: /// @see Window::LogicInvalidate(). void LogicInvalidate(const tools::Rectangle* pRectangle) override; - /// Same as MouseButtonDown(), but coordinates are in logic unit. - virtual void LogicMouseButtonDown(const MouseEvent& rMouseEvent) override; - /// Same as MouseButtonUp(), but coordinates are in logic unit. - virtual void LogicMouseButtonUp(const MouseEvent& rMouseEvent) override; - /// Same as MouseMove(), but coordinates are in logic unit. - virtual void LogicMouseMove(const MouseEvent& rMouseEvent) override; /// Allows adjusting the point or mark of the selection to a document coordinate. void SetCursorTwipPosition(const Point& rPosition, bool bPoint, bool bClearMark); /// Allows starting or ending a graphic move or resize action. diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index a37c8741d1da..09fb464e662e 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -488,19 +488,4 @@ Control::GetUnzoomedControlPointFont() const return aFont; } -void Control::LogicMouseButtonDown(const MouseEvent& rEvent) -{ - MouseButtonDown(rEvent); -} - -void Control::LogicMouseButtonUp(const MouseEvent& rEvent) -{ - MouseButtonUp(rEvent); -} - -void Control::LogicMouseMove(const MouseEvent& rEvent) -{ - MouseMove(rEvent); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */