summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-19 20:52:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-03-20 16:53:41 +0100
commite04eb83b7fb5668f9d2fc56f58abc4f396635866 (patch)
tree355052c93139d254b50ea441041d4c6aef92289d
parent51e87c0e27ef85bdc47674a8b8f0e7ce0f431528 (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>
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/gridwin4.cxx8
-rw-r--r--starmath/source/accessibility.cxx8
3 files changed, 9 insertions, 9 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));
}
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 )
{