From 91b98efc2a5cf41d9442f90d7cb37075721519e0 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Fri, 10 Jun 2022 12:33:53 +0200 Subject: make VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer() LOK-only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because it's used only for LOK, and SvpSalVirtualDevice::CreateSurface() otherwise wouldn't know whether to apply LOK DPI settings or not (since this might be called for LOK tiled painting, when it should, or it might be called from somewhere else while LOK is active, in which case this should be handled normally). Getting that mismatched can cause things like https://github.com/CollaboraOnline/online/issues/4834 . Change-Id: I1df7b8a169c8ef2e799731a6695a032948536582 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135588 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- desktop/source/lib/init.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'desktop') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index edc206cb4122..52fd35a23104 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3481,7 +3481,7 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, // Set background to transparent by default. pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); - pDevice->SetOutputSizePixelScaleOffsetAndBuffer( + pDevice->SetOutputSizePixelScaleOffsetAndLOKBuffer( Size(nCanvasWidth, nCanvasHeight), Fraction(1.0), Point(), pBuffer); @@ -5726,7 +5726,7 @@ unsigned char* doc_renderFontOrientation(SAL_UNUSED_PARAMETER LibreOfficeKitDocu memset(pBuffer, 0, nFontWidth * nFontHeight * 4); aDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); - aDevice->SetOutputSizePixelScaleOffsetAndBuffer( + aDevice->SetOutputSizePixelScaleOffsetAndLOKBuffer( Size(nFontWidth, nFontHeight), Fraction(1.0), Point(), pBuffer); @@ -5826,7 +5826,7 @@ static void doc_paintWindowForView(LibreOfficeKitDocument* pThis, unsigned nLOKW ScopedVclPtrInstance pDevice(DeviceFormat::DEFAULT); pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); - pDevice->SetOutputSizePixelScaleOffsetAndBuffer(Size(nWidth, nHeight), Fraction(1.0), Point(), pBuffer); + pDevice->SetOutputSizePixelScaleOffsetAndLOKBuffer(Size(nWidth, nHeight), Fraction(1.0), Point(), pBuffer); MapMode aMapMode(pDevice->GetMapMode()); aMapMode.SetOrigin(Point(-(nX / fDPIScale), -(nY / fDPIScale))); -- cgit