[Libreoffice-commits] online.git: loolwsd/ChildSession.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Sat Oct 8 04:42:11 UTC 2016


 loolwsd/ChildSession.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 23a2d2261eb3fe7d243ba16b83e79bd010cab6e0
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Fri Oct 7 18:19:56 2016 -0400

    loolwsd: fix regression in rendering of Writer
    
    Writer has only one part for rendering purposes (0).
    
    With the new API that includes the part number in
    the INVALIDATE_TILES event, the part number must
    be 0, otherwise, there will not be anything to render.
    
    Unfortunately Core issues part number == page number,
    which we overwrite with 0 in Online.
    
    Change-Id: I842fdd2f50021334dcd3fa47c0b1c9df34d8c5e1
    Reviewed-on: https://gerrit.libreoffice.org/29605
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp
index 5e085b9..9c68c62 100644
--- a/loolwsd/ChildSession.cpp
+++ b/loolwsd/ChildSession.cpp
@@ -999,7 +999,7 @@ void ChildSession::loKitCallback(const int nType, const std::string& rPayload)
                     y = std::stoi(tokens[1]);
                     width = std::stoi(tokens[2]);
                     height = std::stoi(tokens[3]);
-                    part = std::stoi(tokens[4]);
+                    part = (_docType != "text" ? std::stoi(tokens[4]) : 0); // Writer renders everything as part 0.
                 }
                 catch (const std::out_of_range&)
                 {


More information about the Libreoffice-commits mailing list