diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-19 20:52:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-20 16:53:41 +0100 |
commit | e04eb83b7fb5668f9d2fc56f58abc4f396635866 (patch) | |
tree | 355052c93139d254b50ea441041d4c6aef92289d /sc/source | |
parent | 51e87c0e27ef85bdc47674a8b8f0e7ce0f431528 (diff) |
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@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
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)); } |