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 /sw/source/uibase/docvw | |
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 'sw/source/uibase/docvw')
-rw-r--r-- | sw/source/uibase/docvw/SidebarScrollBar.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControl.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/uibase/docvw/SidebarScrollBar.cxx b/sw/source/uibase/docvw/SidebarScrollBar.cxx index 40ddf08c9784..70c589b3dc9e 100644 --- a/sw/source/uibase/docvw/SidebarScrollBar.cxx +++ b/sw/source/uibase/docvw/SidebarScrollBar.cxx @@ -11,6 +11,7 @@ #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <comphelper/lok.hxx> +#include <sfx2/lokhelper.hxx> #include <SidebarWin.hxx> #include <view.hxx> @@ -57,7 +58,7 @@ void SidebarScrollBar::LogicInvalidate(const Rectangle* pRectangle) OString sRectangle = aRectangle.toString(); SwWrtShell& rWrtShell = m_rView.GetWrtShell(); - rWrtShell.GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr()); + SfxLokHelper::notifyInvalidation(rWrtShell.GetSfxViewShell(), sRectangle); } void SidebarScrollBar::MouseButtonUp(const MouseEvent& /*rMouseEvent*/) diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 77a49e0ae506..9a21fe6522c5 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -50,6 +50,7 @@ #include <editeng/flditem.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <comphelper/lok.hxx> +#include <sfx2/lokhelper.hxx> #include <uitool.hxx> #include <view.hxx> @@ -213,7 +214,7 @@ void SidebarTextControl::LogicInvalidate(const Rectangle* pRectangle) OString sRectangle = aRectangle.toString(); SwWrtShell& rWrtShell = mrDocView.GetWrtShell(); - rWrtShell.GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr()); + SfxLokHelper::notifyInvalidation(rWrtShell.GetSfxViewShell(), sRectangle); } void SidebarTextControl::KeyInput( const KeyEvent& rKeyEvt ) diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index ad44e7abeca6..bf319f586943 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -71,6 +71,7 @@ #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <comphelper/lok.hxx> +#include <sfx2/lokhelper.hxx> #include <editeng/acorrcfg.hxx> #include <SwSmartTagMgr.hxx> @@ -6406,7 +6407,7 @@ void SwEditWin::LogicInvalidate(const Rectangle* pRectangle) else sRectangle = pRectangle->toString(); - m_rView.libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr()); + SfxLokHelper::notifyInvalidation(&m_rView, sRectangle); } void SwEditWin::LogicMouseButtonDown(const MouseEvent& rMouseEvent) |