vcl: Pass Window::PaintToDevice outdev param by ref

This makes clear that this is always non-null.

Change-Id: I4452fa69ac5869b1654771b8a38781e57fe89194
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205348
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This commit is contained in:
Michael Weghorn
2026-05-20 00:38:26 +02:00
parent 22604baa49
commit d1245f5ca9
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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();
}
+5 -5
View File
@@ -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;