kit/ChildSession.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
New commits: commit c7e5874effc0c9b148a557e8d3d30074faefc4ff Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Dec 4 23:45:26 2016 -0500 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/31616 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index dc825cd..3022344 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -1115,8 +1115,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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits