From d5263c2c564c88e3dafe4c1ab8d3d9c1c48ede73 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 29 Sep 2016 12:49:23 +0200 Subject: LOK: conditionally include part number in invalidation payload Since desktop/ code queues, compresses and only emits callbacks on idle, it's possible that two invalidations are in the queue, and there was a setPart() call between them. In this case it's impossible to tell what part the invalidation was sent for. Fix this by conditionally including the part number in the invalidation payload. It's off by default, a new feature flag is added to request this behavior. gtktiledviewer enables this feature flag by default, though just to show the part number in the debug output. Android doesn't enable it. Change-Id: I73e6def848c0eb61d64e71026002c7a0e750aab4 --- comphelper/source/misc/lok.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx index a321260588f1..e1a099d04ea6 100644 --- a/comphelper/source/misc/lok.cxx +++ b/comphelper/source/misc/lok.cxx @@ -17,7 +17,7 @@ namespace LibreOfficeKit static bool g_bActive(false); -static bool g_bViewCallback(true); +static bool g_bPartInInvalidation(false); void setActive(bool bActive) { @@ -29,14 +29,14 @@ bool isActive() return g_bActive; } -void setViewCallback(bool bViewCallback) +void setPartInInvalidation(bool bPartInInvalidation) { - g_bViewCallback = bViewCallback; + g_bPartInInvalidation = bPartInInvalidation; } -bool isViewCallback() +bool isPartInInvalidation() { - return g_bViewCallback; + return g_bPartInInvalidation; } static bool g_bLocalRendering(false); -- cgit