summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-06-10 12:33:53 +0200
committerLuboš Luňák <l.lunak@collabora.com>2022-06-13 10:36:35 +0200
commit91b98efc2a5cf41d9442f90d7cb37075721519e0 (patch)
tree581d27a0636057115ab2c15bbeb4f86c83fd4e6e /desktop
parentb7b06f28d5728c2c33c073df35ac0c3bcc51e583 (diff)
make VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer() LOK-only
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 <l.lunak@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx6
1 files changed, 3 insertions, 3 deletions
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<VirtualDevice> 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)));