From 3db1ce30ab235ad22aed71c22e4f6f52b7b88829 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Tue, 6 Dec 2016 00:42:58 -0500 Subject: Lok: improved tile invalidation compression Handle corner cases better and eliminate invalid rects and out-of-bounds coordinates. Change-Id: Ib9247ae4f0306cf68937cd2678f6386fe7710eec Reviewed-on: https://gerrit.libreoffice.org/31665 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- include/sfx2/lokhelper.hxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx index 0c118fbca896..a6de41cb880d 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -42,6 +42,10 @@ public: static void notifyOtherView(SfxViewShell* pThisView, SfxViewShell* pOtherView, int nType, const OString& rKey, const OString& rPayload); /// Emits a LOK_CALLBACK_INVALIDATE_TILES, but tweaks it according to setOptionalFeatures() if needed. static void notifyInvalidation(SfxViewShell* pThisView, const OString& rPayload); + + /// A special value to signify 'infinity'. + /// This value is chosen such that sal_Int32 will not overflow when manipulated. + static const long MaxTwips = 1e9; }; template -- cgit v1.2.3