diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-09-29 12:49:23 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-09-29 12:53:02 +0200 |
commit | d5263c2c564c88e3dafe4c1ab8d3d9c1c48ede73 (patch) | |
tree | 191b3c39c3c78b3766a7d6c5ebf6b1d1dda5d3c3 /sc | |
parent | 785eb0ed14cde731c2795f68f004f0b811cfe387 (diff) |
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
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/tabview3.cxx | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index fa3cbd1bcf69..b650fc4a293e 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -31,6 +31,7 @@ #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <comphelper/lok.hxx> +#include <sfx2/lokhelper.hxx> #include <svx/svdview.hxx> #include "tabvwsh.hxx" @@ -1154,7 +1155,7 @@ void ScGridWindow::LogicInvalidate(const Rectangle* pRectangle) } ScTabViewShell* pViewShell = pViewData->GetViewShell(); - pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr()); + SfxLokHelper::notifyInvalidation(pViewShell, sRectangle); } void ScGridWindow::SetCellSelectionPixel(int nType, int nPixelX, int nPixelY) diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index b7e3e5cc64ac..b3a2219642ba 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -65,6 +65,7 @@ #include <formula/FormulaCompiler.hxx> #include <comphelper/lok.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> +#include <sfx2/lokhelper.hxx> #include <com/sun/star/chart2/data/HighlightedRange.hpp> @@ -340,13 +341,13 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew ) // Only invalidate if spreadsheet extended to the right if (aNewColArea.getWidth()) { - aViewData.GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, aNewColArea.toString().getStr()); + SfxLokHelper::notifyInvalidation(aViewData.GetViewShell(), aNewColArea.toString()); } // Only invalidate if spreadsheet extended to the bottom if (aNewRowArea.getHeight()) { - aViewData.GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, aNewRowArea.toString().getStr()); + SfxLokHelper::notifyInvalidation(aViewData.GetViewShell(), aNewRowArea.toString()); } } } |