From c337011d2052ec3ddb80e61bcc4b0574b4e898ba Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Thu, 16 Jun 2016 07:28:58 -0400 Subject: LOK: tile rendering regression fix Calc fast rendering requires us to offset the are being rendered and shift all bitmaps accordingly. This however is breaking Impress rendering since the offseting logic is common (in svx and vcl). This adds new API to enable or disable this local rendering (as opposed to rendering a full document as was previously done. The new flag is then set by Calc to enable the offseting logic in isolation without affecting other applications. In one case isolation was achieved by checking the MapModeUnit. Change-Id: Ia0aadfc3f6df7c1a891b97dc731f5897414c9420 Reviewed-on: https://gerrit.libreoffice.org/26367 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian (cherry picked from commit 60fdcda65bad242f99895cb453182578250fbdea) Reviewed-on: https://gerrit.libreoffice.org/26378 Tested-by: Jenkins --- include/comphelper/lok.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/comphelper/lok.hxx') diff --git a/include/comphelper/lok.hxx b/include/comphelper/lok.hxx index 79fa115e6585..8afd3d82a77d 100644 --- a/include/comphelper/lok.hxx +++ b/include/comphelper/lok.hxx @@ -36,6 +36,18 @@ COMPHELPER_DLLPUBLIC void setStatusIndicatorCallback(void (*callback)(void *data // Check whether the code is running as invoked through LibreOfficeKit. COMPHELPER_DLLPUBLIC bool isActive(); +/// Shift the coordinates before rendering each bitmap. +/// Used by Calc to render each tile separately. +/// This should be unnecessary (and removed) once Calc +/// moves to using 100MM Unit. +COMPHELPER_DLLPUBLIC void setLocalRendering(bool bLocalRendering = true); +COMPHELPER_DLLPUBLIC bool isLocalRendering(); + +/// Check whether clients register a callback for each view. +COMPHELPER_DLLPUBLIC bool isViewCallback(); +/// Set whether clients register a callback for each view. +COMPHELPER_DLLPUBLIC void setViewCallback(bool bViewCallback); + // Status indicator handling. Even if in theory there could be several status indicators active at // the same time, in practice there is only one at a time, so we don't handle any identification of // status indicator in this API. -- cgit