[Libreoffice-commits] core.git: sc/source starmath/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Mar 20 15:54:36 UTC 2021


 sc/source/ui/view/gridwin.cxx     |    2 +-
 sc/source/ui/view/gridwin4.cxx    |    8 ++++----
 starmath/source/accessibility.cxx |    8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit e04eb83b7fb5668f9d2fc56f58abc4f396635866
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 19 20:52:27 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Mar 20 16:53:41 2021 +0100

    OutputDevice view is sufficient here
    
    Change-Id: I9aa02ccadeb343c9a90ef23d44c5c5621d60c358
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112785
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 585d46ff6cf0..de77ce84cb57 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2434,7 +2434,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
             const SvxFieldItem* pFld;
             if ( comphelper::LibreOfficeKit::isActive() )
             {
-                Point aLogicClick = pEditView->GetWindow()->PixelToLogic( aPos );
+                Point aLogicClick = pEditView->GetOutputDevice().PixelToLogic(aPos);
                 pFld = pEditView->GetField( aLogicClick );
             }
             else
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 0dd3c0b30b59..18adeb9af620 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1088,10 +1088,10 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
                             // So they need to be in the same coordinates/units. This is tied to the mapmode of the gridwin
                             // attached to the EditView, so we have to change its mapmode too (temporarily). We save the
                             // original mapmode and 'output area' and roll them back when we finish painting to rDevice.
-                            vcl::Window* pOtherWin = pOtherEditView->GetWindow();
+                            OutputDevice& rOtherWin = pOtherEditView->GetOutputDevice();
                             const tools::Rectangle aOrigOutputArea(pOtherEditView->GetOutputArea()); // Not in pixels.
-                            const MapMode aOrigMapMode = pOtherWin->GetMapMode();
-                            pOtherWin->SetMapMode(rDevice.GetMapMode());
+                            const MapMode aOrigMapMode = rOtherWin.GetMapMode();
+                            rOtherWin.SetMapMode(rDevice.GetMapMode());
 
                             // Avoid sending wrong cursor/selection messages by the 'other' view, as the output-area is going
                             // to be tweaked temporarily to match the current view's zoom.
@@ -1101,7 +1101,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
                             pOtherEditView->Paint(rDevice.PixelToLogic(aEditRect), &rDevice);
 
                             // Rollback the mapmode and 'output area'.
-                            pOtherWin->SetMapMode(aOrigMapMode);
+                            rOtherWin.SetMapMode(aOrigMapMode);
                             pOtherEditView->SetOutputArea(aOrigOutputArea);
                             rDevice.SetMapMode(MapMode(MapUnit::MapPixel));
                         }
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index ae21fd08bb1a..d6e5988b0220 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -807,7 +807,7 @@ bool SmViewForwarder::IsValid() const
 Point SmViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
 {
     EditView *pEditView = rEditAcc.GetEditView();
-    OutputDevice* pOutDev = pEditView ? pEditView->GetWindow() : nullptr;
+    OutputDevice* pOutDev = pEditView ? &pEditView->GetOutputDevice() : nullptr;
 
     if( pOutDev )
     {
@@ -824,7 +824,7 @@ Point SmViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMod
 Point SmViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const
 {
     EditView *pEditView = rEditAcc.GetEditView();
-    OutputDevice* pOutDev = pEditView ? pEditView->GetWindow() : nullptr;
+    OutputDevice* pOutDev = pEditView ? &pEditView->GetOutputDevice() : nullptr;
 
     if( pOutDev )
     {
@@ -1387,7 +1387,7 @@ bool SmEditViewForwarder::IsValid() const
 Point SmEditViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
 {
     EditView *pEditView = rEditAcc.GetEditView();
-    OutputDevice* pOutDev = pEditView ? pEditView->GetWindow() : nullptr;
+    OutputDevice* pOutDev = pEditView ? &pEditView->GetOutputDevice() : nullptr;
 
     if( pOutDev )
     {
@@ -1404,7 +1404,7 @@ Point SmEditViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMa
 Point SmEditViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const
 {
     EditView *pEditView = rEditAcc.GetEditView();
-    OutputDevice* pOutDev = pEditView ? pEditView->GetWindow() : nullptr;
+    OutputDevice* pOutDev = pEditView ? &pEditView->GetOutputDevice() : nullptr;
 
     if( pOutDev )
     {


More information about the Libreoffice-commits mailing list