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 --- sfx2/source/view/lokhelper.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sfx2') diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 619e48e61d22..4aa35af5edb8 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -17,6 +17,8 @@ #include #include #include +#include +#include #include @@ -136,4 +138,14 @@ void SfxLokHelper::notifyOtherViews(SfxViewShell* pThisView, int nType, const OS } } +void SfxLokHelper::notifyInvalidation(SfxViewShell* pThisView, const OString& rPayload) +{ + std::stringstream ss; + ss << rPayload.getStr(); + if (comphelper::LibreOfficeKit::isPartInInvalidation()) + ss << ", " << pThisView->getPart(); + OString aPayload = ss.str().c_str(); + pThisView->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, aPayload.getStr()); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit ion> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke
2018-04-15remove some unused comphelper includesJochen Nitschke
2018-02-05loplugin:useuniqueptr in OTableNoel Grandin
2018-01-12More loplugin:cstylecast: connectivityStephan Bergmann
2017-12-20inline typedefs in connectivity/StdTypeDefsNoel Grandin
2017-10-23loplugin:includeform: connectivityStephan Bergmann
2017-09-24tdf#96505 Get rid of cargo cult "long" integer literals66kesara99
2017-08-05refactor to remove the gotosCaolán McNamara
2017-08-02connectivity: partially merge OWriterTable and OCalcTableMiklos Vajna