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 883c22e93ad9b9de62e35b55fb2f355494e56dee
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:26 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/+/141709
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    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 e7aa36d91cc8..68ab829d3656 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 f90bd046ac65..ca4b11c3dca7 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -227,21 +227,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 08c87993b65e..1d18d521b347 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1119,13 +1119,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 645ed286e140..afdbb7222c35 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -491,14 +491,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 3bdda8cf72fc..32573c92b8a2 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1654,21 +1654,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 9aab08583589..6ddbae1d169b 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -735,7 +735,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)
             {
@@ -744,7 +745,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
@@ -753,7 +755,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 1c9d6cf4ef69..c4d129250811 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -6646,33 +6646,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 5ec1942a17fd..e985b5dd4b09 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 00eb0035f1fd..aa157c146c0e 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -486,19 +486,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: */

Reply via email to