diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 60d42293799c..00754d301f57 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7436,7 +7436,7 @@ static void doc_paintWindowForView(LibreOfficeKitDocument* pThis, unsigned nLOKW aMapMode.SetOrigin(Point(-(nX / fDPIScale), -(nY / fDPIScale))); pDevice->SetMapMode(aMapMode); - pWindow->PaintToDevice(pDevice.get(), Point(0, 0)); + pWindow->PaintToDevice(*pDevice, Point(0, 0)); #endif comphelper::LibreOfficeKit::setDialogPainting(false); diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index eef0cdc434fc..3b19da9c2842 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1407,7 +1407,7 @@ public: bool IsNativeWidgetEnabled() const; // a helper method for a Control's Draw method - void PaintToDevice( ::OutputDevice* pDevice, const Point& rPos ); + void PaintToDevice(OutputDevice& rDevice, const Point& rPos); // Keyboard access functions diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 0c33aa7d0c1c..72ad97ea85f4 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -2337,7 +2337,7 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) bool bOldNW =pWindow->IsNativeWidgetEnabled(); if( bOldNW ) pWindow->EnableNativeWidget(false); - pWindow->PaintToDevice( pDev, aP ); + pWindow->PaintToDevice(*pDev, aP); if( bOldNW ) pWindow->EnableNativeWidget(); } diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index b2ec44dde11c..c6681780f257 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1438,13 +1438,13 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP GetOutDev()->SetDPIY(nOldDPIY); } -void Window::PaintToDevice(OutputDevice* pDev, const Point& rPos) +void Window::PaintToDevice(OutputDevice& rDev, const Point& rPos) { if( !mpWindowImpl ) return; - SAL_WARN_IF( pDev->HasMirroredGraphics(), "vcl.window", "PaintToDevice to mirroring graphics" ); - SAL_WARN_IF( pDev->IsRTLEnabled(), "vcl.window", "PaintToDevice to mirroring device" ); + SAL_WARN_IF(rDev.HasMirroredGraphics(), "vcl.window", "PaintToDevice to mirroring graphics"); + SAL_WARN_IF(rDev.IsRTLEnabled(), "vcl.window", "PaintToDevice to mirroring device"); vcl::Window* pRealParent = nullptr; if( ! mpWindowImpl->mbVisible ) @@ -1462,9 +1462,9 @@ void Window::PaintToDevice(OutputDevice* pDev, const Point& rPos) mpWindowImpl->mbVisible = true; if( mpWindowImpl->mpBorderWindow ) - mpWindowImpl->mpBorderWindow->ImplPaintToDevice( pDev, rPos ); + mpWindowImpl->mpBorderWindow->ImplPaintToDevice(&rDev, rPos); else - ImplPaintToDevice( pDev, rPos ); + ImplPaintToDevice(&rDev, rPos); mpWindowImpl->mbVisible = bVisible;