[Libreoffice-commits] online.git: Branch 'libreoffice-5-3' - kit/ChildSession.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Mon Mar 27 01:18:25 UTC 2017
kit/ChildSession.cpp | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
New commits:
commit d559fce02bba5f2b96bb95778e99de1b396c8bce
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sun Dec 4 23:45:26 2016 -0500
tdf#106600 loolwsd: invalidate all parts when document size changes
This is a stop-gap until Core sends these invalidations
with more precision. Otherwise, we may be wasting valuable
cache data here.
This fixes showing incorrect tiles when slides are
inserted/removed from a doc.
Change-Id: I7a02c6fb96ff27223afe71d891db639ab5b2cfae
Reviewed-on: https://gerrit.libreoffice.org/35358
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 56a63b3e..c34bead8 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -1084,8 +1084,26 @@ void ChildSession::loKitCallback(const int nType, const std::string& rPayload)
sendTextFrame("searchresultselection: " + rPayload);
break;
case LOK_CALLBACK_DOCUMENT_SIZE_CHANGED:
- getStatus("", 0);
- getPartPageRectangles("", 0);
+ {
+ //TODO: clenaup and merge.
+
+ std::unique_lock<std::mutex> lock(_docManager.getDocumentMutex());
+ const int parts = getLOKitDocument()->getParts();
+ for (int i = 0; i < parts; ++i)
+ {
+ sendTextFrame("invalidatetiles:"
+ " part=" + std::to_string(i) +
+ " x=0" +
+ " y=0" +
+ " width=" + std::to_string(INT_MAX) +
+ " height=" + std::to_string(INT_MAX));
+ }
+
+ lock.unlock();
+
+ getStatus("", 0);
+ getPartPageRectangles("", 0);
+ }
break;
case LOK_CALLBACK_SET_PART:
sendTextFrame("setpart: " + rPayload);
More information about the Libreoffice-commits
mailing list